/* =========================================================
   Photography Showcase Theme
   - 可主题化（CSS variables）
   - 顶部胶囊菜单 + 缩放下拉
   - 横版浮动风格菜单（滚动时固定在顶部）
   - 瀑布流图库 + 灯箱
   - 管理后台：登录 / 上传 / 菜单编辑 / 主题设置
   ========================================================= */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }

/* 斑驳纹理：SVG 分形噪点叠层，低透明度，营造纸张/墙面质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: .05;
  mix-blend-mode: multiply;
}
body[data-mode="dark"]::before { opacity: .04; mix-blend-mode: overlay; }
body {
  font-family: 'Inter', 'Noto Serif SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .5s ease, color .4s ease;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* admin-only 元素默认隐藏，登录后 body[data-admin="true"] 才显示 */
.admin-only { display: none !important; }
body[data-admin="true"] .admin-only { display: revert !important; }
/* theme-panel 必须保持 flex 布局，否则 tab-panels 高度塌陷导致内容不可见 */
body[data-admin="true"] .theme-panel { display: flex !important; }

/* ========== Tokens / 主题变量 ========== */
:root {
  --bg: #f1ede6;
  --bg-2: #e8e2d6;
  --text: #1a1a1a;
  --text-soft: #6b6358;
  --line: rgba(20,20,20,.08);

  --menu-bg: rgba(255,255,255,.55);
  --menu-border: rgba(255,255,255,.7);
  --menu-shadow: 0 10px 40px rgba(40,30,20,.12);
  --menu-blur: 18px;

  --card-bg: rgba(255,255,255,.7);
  --card-shadow: 0 14px 40px rgba(30,20,10,.08);

  /* 后台管理侧边抽屉宽度（抽屉展开时主内容整体右移这个距离） */
  --admin-panel-w: min(380px, 92vw);

  --accent: #b08968;
  --accent-soft: #ddc7b0;
  --serif: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --sans: 'Inter', system-ui, sans-serif;
}

/* 暗色主题 */
body[data-mode="dark"] {
  --bg: #181715;
  --bg-2: #100f0d;
  --text: #efeae0;
  --text-soft: #a8a094;
  --line: rgba(255,255,255,.10);
  --menu-bg: rgba(20,18,15,.55);
  --menu-border: rgba(255,255,255,.12);
  --menu-shadow: 0 14px 50px rgba(0,0,0,.45);
  --card-bg: rgba(30,26,22,.7);
  --card-shadow: 0 14px 40px rgba(0,0,0,.4);
  --accent: #d8b48a;
}

/* ========== 滚动后顶部实色背景条 ========== */
.topbar-spacer {
  position: fixed;
  top: 0; left: var(--page-inset-x); right: var(--page-inset-x);
  height: calc(var(--menu-top-dist, 36px) + 84px);
  background: linear-gradient(to bottom, var(--bg) 60%, rgba(0,0,0,0));
  z-index: 54;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, background .5s ease,
              left .38s cubic-bezier(.22,.61,.36,1);
}
body[data-scrolled="true"] .topbar-spacer {
  opacity: 1;
}

/* ========== 顶部浮动胶囊菜单 ========== */
.topbar {
  position: fixed;
  top: var(--menu-top-dist, 36px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: clamp(320px, min(880px, 92vw), 880px);
  max-width: calc(100vw - 2 * var(--page-inset-x) - 24px);
  /* 胶囊背景：与页面底色区分 */
  background: var(--menu-bg, var(--bg));
  border: 1px solid var(--menu-border, var(--line));
  border-radius: 999px;
  box-shadow: none;
  transition: background .4s ease,
              left .38s cubic-bezier(.22,.61,.36,1),
              width .35s cubic-bezier(.22,.61,.36,1), border-radius .35s cubic-bezier(.22,.61,.36,1),
              transform .35s cubic-bezier(.22,.61,.36,1), padding .35s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
}
.topbar:hover { box-shadow: none; }
body[data-mode="dark"] .topbar,
body[data-mode="dark"] .topbar:hover { box-shadow: none; }
/* 主导航栏下边线已取消 */
.topbar::after { display: none !important; }
.topbar__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 10px 18px 10px 14px;
  gap: 18px;
}
.topbar__logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .3s ease, transform .25s ease;
}
.topbar__logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.topbar__logo-mark img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.logo-mark {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.topbar__logo:hover { transform: rotate(-6deg) scale(1.04); }

.topbar__nav {
  display: flex; gap: 26px;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.topbar__nav::-webkit-scrollbar { display: none; }
.nav-item {
  font-size: 13.5px;
  color: var(--text-soft);
  padding: 6px 2px;
  position: relative;
  transition: color .25s ease;
  cursor: pointer;
}
.nav-item:hover { color: var(--text); }
.nav-item.is-active { color: var(--text); }
/* 激活/悬停下划线：由中心平滑展开，取代原来生硬的短横线 */
.nav-item::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 1px;
  width: 20px; height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .25s ease;
}
.nav-item:hover::after { transform: translateX(-50%) scaleX(.55); opacity: .4; }
.nav-item.is-active::after { transform: translateX(-50%) scaleX(1); opacity: 1; }

.topbar__actions {
  display: flex; gap: 4px; align-items: center;
}
.iconbtn {
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft);
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.iconbtn:hover { background: rgba(0,0,0,.06); color: var(--text); }
body[data-mode="dark"] .iconbtn:hover { background: rgba(255,255,255,.08); }

/* 下拉扩展 */
.topbar__expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
}
.topbar.is-expanded .topbar__expand { grid-template-rows: 1fr; }
.topbar__expand > .expand-row {
  overflow: hidden;
  padding: 0 18px;
  transition: padding .35s ease;
}
.topbar.is-expanded .topbar__expand > .expand-row { padding: 8px 18px 16px; }

.expand-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  position: relative;
  /* 注意：不要在此处加 border-top —— 折叠态（grid-template-rows:0fr）时边框仍会绘制，
     导致导航栏下方出现一条恒定的虚线。改用仅展开态显示的柔和渐变分隔线。 */
  padding-top: 0;
  margin-top: 0;
}
.expand-row::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--menu-border) 18%,
    var(--menu-border) 82%,
    transparent 100%);
  opacity: 0;
  transition: opacity .3s ease;
}
.topbar.is-expanded .expand-row {
  padding-top: 12px;
  margin-top: 6px;
}
.topbar.is-expanded .expand-row::after { opacity: 1; }
.searchwrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text-soft);
}
.searchwrap input {
  flex: 1; background: transparent; border: 0; outline: 0;
  font: inherit; color: var(--text);
  font-size: 13px;
}
.quickstyles {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.qstyle {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  transition: all .25s ease;
}
.qstyle:hover { color: var(--text); border-color: var(--text); }
.qstyle.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ========== 滚动后固定在顶部的标题（"探索" + 风格名） ========== */
.sticky-title {
  position: fixed;
  top: var(--menu-top-dist, 36px);
  left: 50%;
  transform: translate(-50%, -16px);
  z-index: 56;
  max-width: min(820px, calc(100% - 110px), calc(100vw - 2 * var(--page-inset-x) - 24px));
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--menu-bg);
  color: var(--menu-text);
  backdrop-filter: blur(var(--menu-blur));
  -webkit-backdrop-filter: blur(var(--menu-blur));
  border: 1px solid var(--menu-border);
  box-shadow: var(--menu-shadow);
  font-size: 13px;
  letter-spacing: .5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22,.61,.36,1),
              background .5s ease, left .38s cubic-bezier(.22,.61,.36,1);
  /* 收起时立刻消失，不做延迟 */
  transition-delay: 0s;
}
body[data-scrolled="true"] .sticky-title {
  opacity: 1;
  transform: translate(-50%, 0);
  /* 保留毛玻璃浮动效果 + 描边/阴影，形成层次；颜色随明暗自适应（暗色时 --menu-text 为浅色） */
  background: var(--menu-bg);
  border-color: var(--menu-border);
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(var(--menu-blur));
  -webkit-backdrop-filter: blur(var(--menu-blur));
  /* 等顶部导航栏 .35s 缩放动画完全结束后再淡入，避免两者叠在一起 */
  transition-delay: .42s;
}
.sticky-title__main {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  margin-right: 6px;
  letter-spacing: -.5px;
}
.sticky-title__sep {
  margin: 0 6px;
  color: var(--menu-text-soft);
  opacity: .5;
}
.sticky-title__sub {
  color: var(--menu-text-soft);
}

/* ========== 横版浮动风格菜单 ========== */
/* 首页首屏：内联显示在大图框架下方；滚动后或图库/关于视图：固定在底部 */
.floating {
  position: relative;
  z-index: 55;
  margin: 22px 0 36px;
  padding: 0;
  pointer-events: none;
  opacity: 1;
  transform: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,.61,.36,1),
              padding-left .38s cubic-bezier(.22,.61,.36,1);
}
/* 滚动后：浮动菜单固定到底部（仅首页视图；图库/关于视图下 #home 已隐藏，菜单不显示） */
body[data-scrolled="true"] .floating {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--float-bottom-off, 30px);
  margin: 0;
  padding: 0 64px 0;
  opacity: 1;
  transform: translateY(0);
}
/* 图库 / 关于 视图不显示风格选项菜单 */
body[data-view="gallery"]  .floating,
body[data-view="about"]    .floating { display: none !important; }
/* 浮动菜单的整体外观：默认无容器外观，与页面背景融为一体（首屏）；
   单个 .style-item 仍保留自身胶囊样式（hover / active 反馈）。 */
.floating__inner {
  pointer-events: auto;
  max-width: min(1080px, 94vw, calc(100vw - 2 * var(--page-inset-x) - 24px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transition: gap .25s ease, padding .25s ease, background .3s ease, border-radius .3s ease, box-shadow .3s ease;
}
/* 下滑后（fixed 底部）：恢复白色弧形胶囊外观 */
body[data-scrolled="true"] .floating__inner {
  padding: 10px 18px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 999px;
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(var(--menu-blur));
  -webkit-backdrop-filter: blur(var(--menu-blur));
}
/* 模式：固定在底部（无论是否滚动都 fixed bottom + 始终白色胶囊） */
.floating[data-mode="fixed-bottom"] {
  position: fixed !important;
  left: 0; right: 0;
  bottom: var(--float-bottom-off, 30px) !important;
  margin: 0 !important;
  padding: 0 64px 0 !important;
  z-index: 50; /* 不超过 topbar(60) / 标题固定带(54) */
}
.floating[data-mode="fixed-bottom"] .floating__inner {
  padding: 10px 18px;
  background: var(--menu-bg);
  border: 1px solid var(--menu-border);
  border-radius: 999px;
  box-shadow: var(--menu-shadow);
  backdrop-filter: blur(var(--menu-blur));
  -webkit-backdrop-filter: blur(var(--menu-blur));
}
/* 模式：固定在网页中 —— 始终内联显示，取消浮动效果（无阴影/毛玻璃/圆角胶囊） */
.floating[data-mode="inline"] {
  position: relative !important;
  bottom: auto !important;
  left: auto !important; right: auto !important;
  margin: 22px 0 36px !important;
  padding: 0 !important;
  transform: none !important;
  z-index: auto;
}
.floating[data-mode="inline"] .floating__inner {
  padding: 10px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.floating[data-mode="inline"] .floating__inner:hover { animation: none; }

/* 鼠标滑过下方的风格菜单：轻微晃动 */
.floating__inner:hover { animation: floatWobble .7s ease; }
@keyframes floatWobble {
  0%   { transform: translateY(0) rotate(0); }
  25%  { transform: translateY(-3px) rotate(-.5deg); }
  55%  { transform: translateY(2px) rotate(.35deg); }
  80%  { transform: translateY(-1px) rotate(0); }
  100% { transform: translateY(0) rotate(0); }
}

/* 首页瀑布流：当前风格菜单对应图库相册图片 */
.home-masonry { margin-top: var(--gallery-title-gap, 44px); margin-bottom: 50vh; } /* 下方留白约半屏 */

/* 折叠态：变成一个干净的圆形 logo */
.topbar[data-collapsed="true"] {
  width: 56px !important;
  border-radius: 50% !important;
  overflow: hidden;
  transition: all .35s cubic-bezier(.22,.61,.36,1);
}
.topbar[data-collapsed="true"] .topbar__nav,
.topbar[data-collapsed="true"] .topbar__actions,
.topbar[data-collapsed="true"] .topbar__expand { display: none !important; }
.topbar[data-collapsed="true"] .topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
  grid-template-columns: none;
}
.topbar[data-collapsed="true"] .topbar__logo {
  width: 56px; height: 56px;
  background: transparent;
  border-color: var(--line);
}

/* ========== 页面布局 ========== */
/* 网页宽度：内容列居中时的左右留白，由 --page-max-width 推导（默认 100vw = 全屏） */
:root { --page-max-width: 100vw; }
html { --page-inset-x: max(0px, calc((100vw - var(--page-max-width)) / 2)); }
.page { padding-top: calc(var(--menu-top-dist, 36px) + 114px); max-width: var(--page-max-width); margin-inline: auto; }

/* ========== 视图切换：首页 / 图库 / 关于（图库为独立页面） ========== */
body[data-view="home"]    #gallery,
body[data-view="home"]    #about   { display: none; }
body[data-view="gallery"] #home,
body[data-view="gallery"] #about   { display: none; }
body[data-view="about"]   #home,
body[data-view="about"]   #gallery { display: none; }
/* 非首页视图不显示「探索 · 风格名」悬浮标题 */
body[data-view="gallery"] .sticky-title,
body[data-view="about"]   .sticky-title { display: none; }

/* ========== Hero / 精选大图 ========== */
.hero {
  padding: var(--hero-top-space, 56px) 64px 28px;
  min-height: calc(100vh - var(--menu-top-dist, 36px) - 114px);
  position: relative;
  transition: opacity .35s ease;
}
/* 滚动后：大图区域完全隐藏，不再展示滑动/轮播图 */
/* 滚动后 hero 仍保留，但不让轮播图透到导航/标题背后 */
body[data-scrolled="true"] .hero {
  /* 保持大图可见，不做 display:none */
}
.hero__viewport {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  background: var(--bg-2);
  cursor: grab;
  touch-action: pan-y;
}
.hero__viewport.is-dragging { cursor: grabbing; }
.hero__track {
  position: relative;
  width: 100%;
}
.hero__slide {
  display: none;
  position: relative;
}
.hero__slide.is-active { display: block; }
.hero__slide img {
  width: var(--hero-img-width, 100%);
  height: var(--hero-img-height, auto);
  max-height: 90vh;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  transform: scale(1.01);
  transition: transform .9s ease, opacity .45s ease;
}
/* 显式高度设置时取消 max-height 限制 */
body[data-hero-img-height-set="true"] .hero__slide img { max-height: none; }
.hero__slide.is-active img { transform: scale(1.04); }
.hero__slide.is-leaving { opacity: 0; }

/* 上一张 / 下一张：悬停大图时显示 */
.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 46px; height: 46px;
  background: transparent;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .3s ease, transform .2s ease, filter .2s ease;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.5));
}
.hero__viewport:hover .hero__nav { opacity: 1; }
.hero__nav:hover { filter: drop-shadow(0 1px 4px rgba(0,0,0,.7)); }
.hero__nav--prev { left: 18px; }
.hero__nav--next { right: 18px; }
.hero__nav--prev:active { transform: translateY(-50%) translateX(-2px); }
.hero__nav--next:active { transform: translateY(-50%) translateX(2px); }
.hero__badge {
  position: absolute;
  bottom: 22px; left: 22px;
  background: rgba(20,20,20,.55);
  color: #fff;
  font-size: 11px;
  letter-spacing: 1.5px;
  padding: 7px 12px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
}
.hero__badge strong {
  display: inline-block;
  margin-right: 8px;
  font-weight: 600;
}
.hero__badge span { opacity: .75; }

.hero__caption {
  margin-top: 36px;
  display: block;
  position: relative;
  z-index: 54;
}
/* 下滑跳过首屏大图后，标题固定在页面顶部（由 JS 切换 .is-fixed），瀑布流在下方继续滚动
   - 顶部直接对齐页面最高处（top:0，被 .topbar z=60 覆盖）
   - 背景渐变方向：顶部实色 → 底部透明（镂空在下方）
   - 标题左对齐，与 .hero padding-left 对齐（桌面 64 / 移动 24）
   - 宽度始终满屏（与背景融合）
   - --top-blank-height: 顶部额外留白（在 menu-top-dist 之上叠加）
   - --top-blank-width: 左右留白
   - --top-blank-gradient: 底部渐变高度 */
.hero__caption.is-fixed {
  position: fixed;
  top: 0;
  left: var(--page-inset-x);
  right: var(--page-inset-x);
  width: auto;
  margin: 0;
  padding: calc(var(--menu-top-dist, 36px) + 56px + var(--top-blank-height, 0px))
           var(--top-blank-width, 64px)
           var(--top-blank-gradient, 60px);
  background: linear-gradient(to bottom,
    var(--bg) 0,
    var(--bg) calc(100% - var(--top-blank-gradient, 60px)),
    transparent 100%);
  z-index: 54;
  pointer-events: none; /* 固定时不拦截下方瀑布流交互 */
  box-shadow: none;
}
@media (max-width: 720px) {
  .hero__caption.is-fixed { padding-left: 24px; padding-right: 24px; }
}
.hero__caption.is-fixed .hero__scroll { pointer-events: auto; }
.hero__caption.is-fixed .home-cols-btn { pointer-events: auto; }
.hero__caption.is-fixed .home-cols-group { pointer-events: auto; }

/* 桌面端：顶栏 LOGO 不显示文字（仅移动端显示 QX + studio） */
@media (min-width: 721px) {
  .topbar__logo-text { display: none; }
}
.hero__caption-spacer { height: 0; }
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  /* 默认跟随屏幕宽度：屏幕宽度的 2/5 = 40vw，网页端/手机端自动切换 */
  font-size: 40vw;
  margin: 0;
  letter-spacing: -1px;
  line-height: .95;
  transition: font-size .35s cubic-bezier(.22,.61,.36,1);
}
/* 标题固定置顶后缩小到合理尺寸，避免撑爆顶栏 */
.hero__caption.is-fixed .hero__title {
  font-size: clamp(22px, 5vw, 34px);
}
.hero__subtitle {
  font-size: 13px;
  color: var(--text-soft);
  margin: 8px 0 0;
  letter-spacing: .5px;
}
/* 大标题下方滚动提示（指向图库页） */
.hero__scroll {
  position: static;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 1px;
  cursor: pointer;
  transition: color .25s ease;
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll .dot {
  display: inline-block; width: 1px; height: 22px;
  background: var(--text-soft);
  position: relative;
}
.hero__scroll .dot::after {
  content: ""; position: absolute; bottom: 0; left: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-soft);
  animation: float 2.2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-8px); opacity: .4; }
}

/* ========== Gallery / 图库页 ========== */
.gallery {
  padding: 40px 64px 80px;
}

/* 图库顶栏（返回 + 管理员操作） */
.gallery__topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.gallery__topbar .gallery__admin-actions { margin-left: auto; }
.gal-btn--ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
  white-space: nowrap;
}
.gal-btn--ghost:hover { color: var(--text); border-color: var(--text); transform: translateY(-1px); }

/* 相册总览：封面网格 */
.gallery__index-title { margin-bottom: 6px; }
.gallery__index-title h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -.5px;
}
.gallery__index-title p { margin: 0; color: var(--text-soft); font-size: 14px; }

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
  margin-top: 26px;
}
.album-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: transform .35s ease, box-shadow .35s ease, border-color .25s ease;
}
.album-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(30,20,10,.16);
  border-color: var(--accent);
}
.album-card__cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  overflow: hidden;
}
.album-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
}
.album-card:hover .album-card__cover img { transform: scale(1.05); }
.album-card__cover--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-soft); font-size: 13px;
}
.album-card__name {
  padding: 14px 16px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.album-card__count {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-soft);
  flex-shrink: 0;
}
.album-card__scene {
  padding: 0 16px 12px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-soft);
  opacity: .7;
}
.gallery__album { margin-top: 8px; }

/* 二级分类：风格 Tab + 管理员操作 */
.gallery__tabs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.gallery__tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.gallery__tabs::-webkit-scrollbar { display: none; }
.gallery__tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all .25s ease;
  white-space: nowrap;
}
.gallery__tab:hover { color: var(--text); border-color: var(--text); }
.gallery__tab.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* 管理员操作按钮组 */
.gallery__admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.gal-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
  white-space: nowrap;
}
.gal-btn:hover { transform: translateY(-2px); }
.gal-btn--outline {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
}
.gal-btn--outline:hover { color: var(--text); border-color: var(--text); }
.gal-btn--solid {
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
}
/* 原「显示此相册」勾选框已移除，相册显隐统一在「相册管理」弹窗中设置 */
.gal-btn--danger {
  border: 1px solid rgba(200,60,60,.4);
  background: rgba(200,60,60,.08);
  color: #c44;
}
.gal-btn--danger:hover { background: rgba(200,60,60,.16); color: #b33; border-color: rgba(200,60,60,.6); }

.gallery__head {
  margin-bottom: 32px;
}
.gallery__head h2 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -.5px;
}
.gallery__head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  max-width: 520px;
}

/* 上传按钮 */
.upload-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  transition: transform .2s ease, opacity .2s ease;
}
.upload-btn:hover { transform: translateY(-2px); }

/* 空状态 */
.gallery__empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-soft);
}
.gallery__empty p { margin: 4px 0; font-size: 15px; }
.gallery__empty .small { font-size: 12px; opacity: .7; }

/* 瀑布流 */
.masonry {
  column-count: 3;
  column-gap: 18px;
}
@media (max-width: 900px) { .masonry { column-count: 2; } }
@media (max-width: 600px) { .masonry { column-count: 1; } }

.masonry__card {
  position: relative;
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  cursor: zoom-in;
  transition: transform .35s ease, box-shadow .35s ease;
}
.masonry__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(30,20,10,.14);
}
.masonry__card img {
  width: 100%;
  height: auto;
  transition: transform .8s ease;
}
.masonry__card:hover img { transform: scale(1.04); }
.masonry__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  color: #fff;
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.masonry__card:hover .masonry__cap {
  opacity: 1; transform: translateY(0);
}
.masonry__cap strong { font-weight: 600; letter-spacing: 1.5px; }
.masonry__cap small {
  display: block; opacity: .8; font-size: 11px;
  margin-top: 2px;
}

/* 删除按钮（管理员可见） */
.masonry__del {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
  z-index: 2;
}
.masonry__card:hover .masonry__del { opacity: 1; }
.masonry__del:hover { background: rgba(220,50,50,.8); }

/* ========== About ========== */
.about { padding: 100px 64px 140px; }
.about__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.about__inner h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 500;
  margin: 0 0 18px;
}
.about__inner p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-soft);
}
.about__info {
  margin: 26px auto 0;
  max-width: 520px;
  text-align: left;
  display: grid;
  gap: 10px;
}
.about__info-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--text-soft);
}
.about__info-label {
  flex-shrink: 0;
  width: 72px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text);
  opacity: .7;
}
.about__info-row a { color: var(--accent); }
.about__qr {
  margin: 22px auto 0;
  max-width: 520px;
  text-align: center;
}
.about__qr .about__info-label { display: block; width: auto; margin-bottom: 8px; }
.about__qr img {
  width: 160px; height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ========== 风格项 ========== */
.floating__scroll {
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
}
.floating__scroll::-webkit-scrollbar { display: none; }
.floating__list {
  list-style: none; margin: 0;
  /* 小 padding 让首尾不被裁切，但不推开首个菜单（左对齐） */
  padding: 0 12px;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.style-item {
  flex-shrink: 0;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-soft);
  border: 1px solid transparent;
  background: transparent;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
  line-height: 1.3;
}
.style-item__main {
  display: inline-flex; align-items: center; gap: 6px;
}
.style-item__label { font-size: 13px; }
.style-item__sub {
  font-size: 10px;
  letter-spacing: .5px;
  opacity: .6;
  margin-top: 1px;
}
.style-item:hover { background: rgba(0,0,0,.05); color: var(--text); }
body[data-mode="dark"] .style-item:hover { background: rgba(255,255,255,.06); }
.style-item.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.style-item__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
  flex-shrink: 0;
}

/* 浮动菜单：右侧"更多"按钮（溢出时显示）—— 仅箭头符号，无圆形背景 */
.floating__next {
  flex-shrink: 0;
  width: 22px; height: 30px;
  background: transparent;
  border: 0;
  color: var(--menu-text-soft);
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color .2s ease, transform .2s ease;
}
.floating__next.is-visible { display: inline-flex; }
.floating__next:hover { color: var(--menu-text); transform: translateX(2px); }

/* 浮动菜单：左侧"向左"按钮 —— 仅箭头符号，无圆形背景 */
.floating__prev {
  flex-shrink: 0;
  width: 22px; height: 30px;
  background: transparent;
  border: 0;
  color: var(--menu-text-soft);
  display: none;
  align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color .2s ease, transform .2s ease;
}
.floating__prev.is-visible { display: inline-flex; }
.floating__prev:hover { color: var(--menu-text); transform: translateX(-2px); }

/* 浮动菜单：悬停时显示的横向滚动条 —— 已取消显示 */
.floating__scrollbar { display: none !important; }
.floating__thumb {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  min-width: 24px;
  border-radius: 999px;
  background: var(--menu-text-soft);
  opacity: .7;
  cursor: grab;
}
.floating__thumb:active { cursor: grabbing; background: var(--menu-text); }

/* =========================================================
   滚动时：顶部导航栏缩小为右侧 logo，hover 展开
   ========================================================= */

/* 滚动时顶部导航缩小为右侧 logo */
body[data-scrolled="true"] .topbar {
  left: auto !important;
  right: calc(var(--page-inset-x) + 24px) !important;
  top: var(--menu-top-dist, 36px) !important;
  bottom: auto !important;
  transform: none !important;
  width: 56px !important;
  border-radius: 50% !important;
  padding: 0;
  overflow: visible; /* 允许下拉菜单溢出 */
}
body[data-scrolled="true"] .topbar__nav,
body[data-scrolled="true"] .topbar__expand {
  display: none !important;
}
/* 滚动后隐藏顶部操作区，账号/后台管理改由 hover 弹出的下拉菜单承载（#89） */
body[data-scrolled="true"] .topbar__actions {
  display: none !important;
}
/* 移动端滚动后仍显示搜索/菜单图标 */
@media (max-width: 720px) {
  body[data-scrolled="true"] .topbar__actions { display: flex !important; }
}
body[data-scrolled="true"] .topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
  padding: 0;
  gap: 0;
}
body[data-scrolled="true"] .topbar__logo {
  width: 56px; height: 56px;
  background: transparent;
  border-color: var(--line);
}
/* hover 时保持圆形 logo，不横向展开，改为向下弹出紧凑菜单 */
body[data-scrolled="true"] .topbar:hover {
  width: 56px !important;
  border-radius: 50% !important;
  left: auto !important;
  right: calc(var(--page-inset-x) + 24px) !important;
  transform: none !important;
  background: transparent !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* 下拉紧凑菜单（滚动后 hover 触发） */
.topbar__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.15);
  padding: 6px;
  z-index: 61;
  flex-direction: column;
  gap: 2px;
  animation: dropdownIn .2s ease;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 桥接 12px 间隙，避免鼠标移动到下拉菜单时 hover 丢失而缩回 */
.topbar__dropdown::before {
  content: "";
  position: absolute;
  top: -12px; left: 0; right: 0;
  height: 12px;
}
body[data-scrolled="true"] .topbar:hover .topbar__dropdown {
  display: flex;
}
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-soft);
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}
.dropdown-item:hover {
  background: rgba(0,0,0,.05);
  color: var(--text);
}
body[data-mode="dark"] .dropdown-item:hover { background: rgba(255,255,255,.06); }
.dropdown-item.is-active {
  color: var(--text);
  font-weight: 500;
  background: rgba(0,0,0,.04);
}
body[data-mode="dark"] .dropdown-item.is-active { background: rgba(255,255,255,.05); }
.dropdown-item--btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  font: inherit;
}
.dropdown-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 6px;
}/* 风格管理面板 */
.style-list-mgr {
  display: grid;
  gap: 8px;
}
.style-mgr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}
.style-mgr-item__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.style-mgr-item__name { font-weight: 600; }
.style-mgr-item__name small { font-weight: 400; opacity: .5; margin-left: 4px; }
.style-mgr-item__desc { font-size: 11px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.style-mgr-item__del {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(220,50,50,.1);
  color: #c44;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.style-mgr-item__del:hover { background: rgba(220,50,50,.25); }
.style-mgr-item__del:disabled { opacity: .25; cursor: not-allowed; }

/* 回到顶部 */
.back-to-top {
  position: fixed;
  right: 16px; bottom: 152px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  z-index: 70;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }

/* ========== 管理员登录弹窗 ========== */
.login-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 90;
  animation: fadeIn .2s ease;
}
.login-modal__card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 28px 24px;
  width: min(360px, calc(100% - 48px));
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.login-modal__card h3 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}
.login-modal__card input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease;
}
.login-modal__card input:focus { border-color: var(--accent); }
.login-modal__row {
  display: flex; gap: 10px;
  margin-top: 16px;
}
.login-modal__cancel,
.login-modal__confirm {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  transition: background .2s ease;
}
.login-modal__cancel {
  background: var(--bg-2);
  color: var(--text-soft);
}
.login-modal__cancel:hover { background: var(--line); }
.login-modal__confirm {
  background: var(--text);
  color: var(--bg);
}
.login-modal__confirm:hover { opacity: .85; }
.login-modal__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #c44;
  min-height: 16px;
}
.login-modal__remember {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 2px -2px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}
.login-modal__remember input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}
.login-modal__remember:hover { color: var(--text); }
.upload-target-select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  outline: none;
}
.upload-target-select:focus { border-color: var(--accent); }

/* ========== 相册管理弹窗 ========== */
.login-modal__card--wide { width: min(460px, calc(100% - 48px)); }

/* 搜索弹窗（点击 topbar 搜索图标弹出） */
.search-popup {
  position: fixed; inset: 0;
  z-index: 80;
  display: none;
  pointer-events: none;
}
.search-popup.is-open { display: block; pointer-events: auto; }
.search-popup__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0;
  transition: opacity .25s ease;
}
.search-popup.is-open .search-popup__backdrop { opacity: 1; }
.search-popup__panel {
  position: absolute;
  top: 84px; left: 50%;
  transform: translate(-50%, -10px);
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity .25s ease, transform .25s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
}
.search-popup.is-open .search-popup__panel { opacity: 1; transform: translate(-50%, 0); }
.search-popup__inputwrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  flex-shrink: 0;
}
.search-popup__inputwrap input {
  flex: 1; background: transparent; border: 0; outline: 0;
  font: inherit; color: var(--text);
  font-size: 14px;
}
.search-popup__inputwrap input::placeholder { color: var(--text-soft); }
.search-popup__close {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: transparent; border: 0;
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.search-popup__close:hover { background: var(--bg-2); color: var(--text); }
.search-popup__results {
  padding: 12px 6px 6px;
  overflow-y: auto;
}
.search-popup__hint {
  padding: 16px 14px;
  color: var(--text-soft);
  font-size: 12.5px; letter-spacing: .5px;
}
.search-popup__item {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}
.search-popup__item:hover { background: var(--bg-2); }
.search-popup__item-name { font-size: 14px; font-weight: 500; }
.search-popup__item-meta { font-size: 11.5px; color: var(--text-soft); margin-top: 2px; letter-spacing: .5px; }
.search-popup__group-title {
  padding: 12px 14px 6px;
  font-size: 11px; letter-spacing: 1.5px;
  color: var(--text-soft);
}
.album-mgr__tip {
  margin: -8px 0 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-soft);
}
.album-mgr__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 2px;
}
/* 相册行布局：勾选 | 名称框 | 场景框 | 张数标签 | × 删除 */
.album-mgr__row {
  display: flex; align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, opacity .2s ease;
}
.album-mgr__row:hover { border-color: var(--accent); }
/* 相册拖拽排序手柄：放在勾选框前面 */
.album-mgr__handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--text-soft);
  cursor: grab;
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.album-mgr__handle:hover { background: var(--bg-3, var(--bg-2)); color: var(--text); }
.album-mgr__handle:active { cursor: grabbing; }
.album-mgr__row.is-dragging { opacity: .5; border-style: dashed; }
.album-mgr__row.is-over { border-color: var(--accent); background: var(--bg-3, var(--bg-2)); }
/* 用 margin-left:auto 把"张数+删除"推到行尾，与左侧元素拉开距离 */
.album-mgr__row .album-mgr__count { margin-left: auto; }
.album-mgr__row input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px; height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
/* 名称框：明确上限，腾出空间给场景框与右侧 */
.album-mgr__name {
  font-size: 13.5px;
  color: var(--text);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.album-mgr__name-input {
  flex: 1 1 0;                 /* 与场景框统一宽度，并自适应行内剩余空间 */
  min-width: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
}
.album-mgr__name-input:focus { outline: none; border-color: var(--accent); }
/* 场景编号框：与名称框统一宽度（自适应） */
.album-mgr__scene-input {
  flex: 1 1 0;                 /* 与名称框等宽 */
  min-width: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
}
.album-mgr__scene-input:focus { outline: none; border-color: var(--accent); }
.album-mgr__scene-input::placeholder { color: var(--text-soft); opacity: .75; }  /* placeholder 不再隐藏 */
/* "N 张"独立小 box，避免和 × 视觉堆叠 */
.album-mgr__count {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
  white-space: nowrap;
}
.album-mgr__row.is-off { opacity: .5; }
.album-mgr__row.is-off .album-mgr__name { text-decoration: line-through; }
/* × 删除按钮：去掉圆形红底，纯文字+悬停变色 */
.album-mgr__del {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  background: transparent;        /* 透明背景 */
  color: var(--text-soft);       /* 默认浅色 */
  border: 0;
  border-radius: 0;              /* 不再 50% 圆形 */
  font-size: 16px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.album-mgr__del:hover {
  background: transparent;
  color: #c44;                   /* 悬停才显示红色文字 */
}
.album-mgr__del:disabled { opacity: .25; cursor: not-allowed; }

/* ===== 相册/图片批量管理 UI ===== */
.album-mgr__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.album-mgr__batch-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.album-mgr__sel-count {
  font-size: 12px; color: var(--text-soft);
  padding: 0 4px; white-space: nowrap;
}
/* 圆形选择框（相册批量模式） */
.album-mgr__check {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.album-mgr__check.is-on {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg);
}
.album-mgr__row.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
}
/* 图片批量工具栏 */
.gallery__album-batch {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.gallery__album-batch-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
/* 瀑布流卡片选择框 */
.masonry__select {
  position: absolute;
  top: 8px; left: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.9);
  background: rgba(0,0,0,.35);
  z-index: 2;
  transition: background .2s ease, border-color .2s ease;
}
.masonry__select.is-on {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.35);
}
.masonry__card.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
.masonry__card.is-selected img { transform: none; }
/* 危险操作按钮 */
.gal-btn--danger {
  background: #c0392b;
  color: #fff;
  border-color: transparent;
}
.gal-btn--danger:hover { filter: brightness(.92); }

/* 重命名按钮 + inline 输入 */
.album-mgr__rename {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.04);
  color: var(--text-soft);
  border: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.album-mgr__rename:hover { background: var(--bg-2); color: var(--text); }
.album-mgr__rename-input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 4px 8px;
  outline: none;
}
.album-mgr__empty {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
}

/* ========== 管理后台面板 ========== */

/* 抽屉展开时：主内容整体向右推移，避免被后台面板遮挡（push 式抽屉）
   注意：.topbar-spacer / .floating / .sticky-title / .topbar 的推移过渡已并入各自
   原有的 transition 声明中，此处不要再整体覆写它们的 transition，否则会顶掉原动画。 */
.page { transition: margin-left .38s cubic-bezier(.22,.61,.36,1); }
body[data-panel="open"] .page { margin-left: var(--admin-panel-w); }
body[data-panel="open"] .topbar-spacer { left: var(--admin-panel-w); }
body[data-panel="open"] .hero__caption.is-fixed { left: var(--admin-panel-w); }
/* 仅对滚动后的固定态浮动菜单做右推移，避免首页内联菜单被向右推导致显示错乱 */
body[data-panel="open"] body[data-scrolled="true"] .floating { padding-left: calc(64px + var(--admin-panel-w)); }
/* 顶部胶囊 / 滚动标题：重新居中到剩余可视区域，并按剩余宽度缩放 */
body[data-panel="open"] .topbar {
  left: calc(50% + var(--admin-panel-w) / 2);
  width: clamp(320px, calc(min(880px, 92vw) - var(--admin-panel-w)), 880px);
}
body[data-panel="open"] .sticky-title { left: calc(50% + var(--admin-panel-w) / 2); }
/* 后台打开时底部风格菜单按剩余可视宽度缩放，避免被抽屉遮挡 */
body[data-panel="open"] .floating__inner { max-width: clamp(280px, calc(94vw - var(--admin-panel-w)), 1080px); }
/* 滚动后导航栏贴右侧、抽屉在左侧，不会重叠，保持原位即可 */

.theme-panel {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--admin-panel-w);
  height: 100vh;
  height: 100dvh;
  max-height: none;
  background: var(--bg);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 0 60px rgba(0,0,0,.25);
  z-index: 75;
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: drawerIn .3s ease;
}
@keyframes drawerIn { from { opacity: 0; transform: translateX(-100%); } to { opacity: 1; transform: translateX(0); } }
.theme-panel header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head__actions {
  display: flex; align-items: center; gap: 8px;
}
.logout-btn {
  font-size: 12px;
  color: var(--text-soft);
  padding: 4px 10px;
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.logout-btn:hover { background: rgba(220,50,50,.1); color: #c44; }
/* 面板右上角的 × 关闭按钮已移除：与「退出」功能重复，面板开合统一由右下角管理按钮控制 */

.tabs {
  display: flex;
  flex-wrap: wrap;
  padding: 8px 10px 0;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: auto;
  max-height: 90px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-soft) transparent;
}
.tabs::-webkit-scrollbar { width: 6px; height: 6px; }
.tabs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.tab {
  flex-shrink: 0;
  padding: 8px 10px 10px;
  font-size: 12px;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.tab-panels {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.tab-panel {
  display: none;
  padding: 16px;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: auto;
  scrollbar-width: auto;
  scrollbar-color: var(--text-soft) transparent;
}
.tab-panel::-webkit-scrollbar { width: 10px; height: 10px; }
.tab-panel::-webkit-scrollbar-track { background: rgba(0,0,0,.03); border-radius: 5px; }
.tab-panel::-webkit-scrollbar-thumb { background: rgba(107, 99, 88, 0.4); border-radius: 5px; }
.tab-panel::-webkit-scrollbar-thumb:hover { background: var(--text); }
body[data-mode="dark"] .tab-panel::-webkit-scrollbar-track { background: rgba(255,255,255,.03); }
.tab-panel.is-active { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.preset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
  position: relative;
}
.preset:hover { transform: translateY(-2px); border-color: var(--text); }
.preset.is-active {
  border-color: var(--text);
  background: rgba(0,0,0,.03);
}
body[data-mode="dark"] .preset.is-active { background: rgba(255,255,255,.04); }
.preset__name {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}
.preset__swatch {
  display: flex; gap: 4px;
}
.preset__swatch span {
  flex: 1; height: 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

label {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 10px;
}
label input {
  display: block;
  margin-top: 4px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
}
.apply {
  margin-top: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.check input { accent-color: var(--text); }
.check.is-on { border-color: var(--text); }

hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ========== 灯箱 ========== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  z-index: 80;
  padding: 60px 40px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 92vw;
  max-height: 80vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lightbox__close {
  position: absolute; top: 24px; right: 28px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer;
  z-index: 2;
}
/* 灯箱底部导航栏：箭头 + 圆点指示器 */
.lightbox__bar {
  position: absolute;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 16px;
  z-index: 3;
}
.lightbox__bar-btn {
  width: 40px; height: 40px;
  border: 0; cursor: pointer;
  background: transparent;
  color: rgba(255,255,255,.7);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: color .2s ease, background .2s ease;
}
.lightbox__bar-btn:hover { color: #fff; background: rgba(255,255,255,.12); }
.lightbox__dots {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 60vw; overflow-x: auto; scrollbar-width: none;
}
.lightbox__dots::-webkit-scrollbar { display: none; }
.lightbox__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s ease, transform .2s ease;
}
.lightbox__dot.is-active {
  background: #fff;
  transform: scale(1.4);
}
@media (max-width: 720px) {
  .lightbox__bar { gap: 10px; bottom: 16px; }
  .lightbox__bar-btn { width: 36px; height: 36px; }
  .lightbox__dot { width: 6px; height: 6px; }
}
.lightbox__cap {
  position: absolute;
  bottom: 72px; left: 50%; transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  letter-spacing: 1px;
  background: rgba(0,0,0,.4);
  padding: 8px 14px;
  border-radius: 6px;
}

/* ========== 主题预设效果 ========== */
:root {
  --menu-text: var(--text);
  --menu-text-soft: var(--text-soft);
}

/* 风格切换图标（替代原来的"装修风格"文字） */
.floating__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 24px;
  color: var(--menu-text-soft);
  opacity: .85;
  transition: opacity .25s ease;
}
.floating__label:hover { opacity: 1; }
.floating__label svg { display: block; }

/* 浮动菜单/导航栏字体颜色随 preset 自适应，避免被全局明暗干扰 */
.floating__inner,
.topbar {
  color: var(--menu-text);
}
.floating__label,
.nav-item,
.iconbtn,
.style-item {
  color: var(--menu-text-soft);
}
.nav-item:hover,
.iconbtn:hover {
  color: var(--menu-text);
}
.style-item:hover { color: var(--menu-text); }
.style-item.is-active {
  background: var(--menu-text);
  color: var(--menu-bg);
  border-color: var(--menu-text);
}
.style-item:hover { background: rgba(0,0,0,.05); }
body[data-mode="dark"] .style-item:hover { background: rgba(255,255,255,.06); }
.iconbtn:hover { background: rgba(0,0,0,.06); }
body[data-mode="dark"] .iconbtn:hover { background: rgba(255,255,255,.08); }
.nav-item.is-active { color: var(--menu-text); }
.nav-item.is-active::after { background: var(--menu-text); }

body[data-menu-preset="cream"] {
  --menu-bg: rgba(255,253,247,.55);
  --menu-border: rgba(255,255,255,.7);
  --menu-blur: 18px;
  --menu-shadow: 0 10px 40px rgba(40,30,20,.12);
  --menu-text: #1a1a1a;
  --menu-text-soft: #6b6358;
}
body[data-menu-preset="ink"] {
  --menu-bg: rgba(20,18,15,.65);
  --menu-border: rgba(255,255,255,.10);
  --menu-blur: 22px;
  --menu-shadow: 0 14px 50px rgba(0,0,0,.45);
  --menu-text: #f3ece0;
  --menu-text-soft: #a8a094;
  --text: #f3ece0;
  --bg: #161310;
  --text-soft: #a8a094;
  --line: rgba(255,255,255,.10);
  --accent: #d8b48a;
}
body[data-menu-preset="frost"] {
  --menu-bg: rgba(255,255,255,.18);
  --menu-border: rgba(255,255,255,.35);
  --menu-blur: 26px;
  --menu-shadow: 0 14px 50px rgba(0,0,0,.18);
  --menu-text: #1a1a1a;
  --menu-text-soft: rgba(40,40,40,.7);
}
body[data-menu-preset="sand"] {
  --menu-bg: rgba(214,196,168,.7);
  --menu-border: rgba(120,80,40,.18);
  --menu-blur: 18px;
  --menu-shadow: 0 14px 40px rgba(120,80,40,.18);
  --menu-text: #3a2a18;
  --menu-text-soft: rgba(80,55,30,.7);
  --accent: #8b5a2b;
}

  /* 暗色主题：强制菜单（浮动栏 / 顶部胶囊 / 滚动标题）使用浅色文字 + 深色毛玻璃背景，
     与浅色 preset 解耦，保证暗色模式下对比清晰。该块位于所有 preset 规则之后，暗色时优先生效。 */
  body[data-mode="dark"] {
    --menu-bg: rgba(28,26,22,.72);
    --menu-border: rgba(255,255,255,.14);
    --menu-text: #f4ede0;
    --menu-text-soft: #b6ab9e;
  }

/* 图库页风格 */
body[data-gallery-preset="gallery-classic"] {
  --card-bg: rgba(255,255,255,.7);
  --card-shadow: 0 14px 40px rgba(30,20,10,.08);
}
body[data-gallery-preset="gallery-edge"] {
  background: var(--bg-2);
  --card-bg: transparent;
  --card-shadow: none;
}
body[data-gallery-preset="gallery-edge"] .masonry__card {
  border: 1px solid var(--line);
  box-shadow: none;
}
body[data-gallery-preset="gallery-polaroid"] {
  background: #efe8da;
}
body[data-gallery-preset="gallery-polaroid"] .masonry__card {
  background: #fff;
  padding: 10px 10px 26px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 18px 40px rgba(80,60,40,.12);
  font-family: var(--serif);
}
body[data-gallery-preset="gallery-polaroid"] .masonry__card img {
  border-radius: 4px;
}
body[data-gallery-preset="gallery-darkroom"] {
  background: #0d0c0a;
  --card-bg: #181614;
  --card-shadow: 0 14px 40px rgba(0,0,0,.6);
  --text: #f3ece0;
  --text-soft: #a8a094;
}

/* 响应式 */
/* 响应式：主导航栏随页面尺寸缩短长度（导航横向滚动保留） */
@media (max-width: 1180px) {
  .topbar { width: min(820px, calc(100vw - 36px)); }
}
@media (max-width: 1024px) {
  .topbar { width: min(720px, calc(100vw - 32px)); }
}
@media (max-width: 900px) {
  .topbar { width: min(620px, calc(100vw - 28px)); }
  .topbar__inner { gap: 12px; padding: 8px 12px 8px 10px; }
  .topbar__nav { gap: 14px; }
  .nav-item { font-size: 13px; }
}
@media (max-width: 760px) {
  .topbar { width: min(540px, calc(100vw - 24px)); }
  .topbar__inner { gap: 9px; padding: 7px 11px 7px 9px; }
  .topbar__nav { gap: 11px; }
  .nav-item { font-size: 12.5px; }
  .iconbtn { width: 34px; height: 34px; }
}
@media (max-width: 600px) {
  .topbar { top: 12px; width: calc(100vw - 16px); }
  .topbar__inner { gap: 7px; padding: 7px 10px; }
  .topbar__nav { gap: 9px; }
  .nav-item { font-size: 12px; }
  .iconbtn { width: 32px; height: 32px; }
  .topbar__logo { width: 34px; height: 34px; }
}
@media (max-width: 720px) {
  .hero, .gallery, .about { padding-left: 24px; padding-right: 24px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .gallery__admin-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .topbar__inner { gap: 5px; padding: 6px 9px; }
  .topbar__nav { gap: 7px; }
  .nav-item { font-size: 11.5px; }
  .iconbtn { width: 30px; height: 30px; }
}
@media (max-width: 420px) {
  .topbar__nav { gap: 5px; }
  .nav-item { font-size: 11px; padding: 6px 0; }
  .iconbtn { width: 28px; height: 28px; }
  .topbar__logo { width: 30px; height: 30px; }
}

/* =========================================================
   移动端：底部抽屉菜单（按用户截图设计）
   ========================================================= */
/* 移动端按钮默认隐藏，仅在 ≤720px 时显示 */
.topbar__mobile-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: rgba(0,0,0,.04);
  color: var(--text-soft);
  border: 1px solid transparent;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.topbar__mobile-toggle:hover { background: rgba(0,0,0,.08); color: var(--text); }
.topbar__mobile-toggle.is-on { background: rgba(220,80,80,.12); color: #c84a4a; border-color: rgba(220,80,80,.35); }

.mobile-sheet {
  display: none; /* 桌面隐藏 */
  position: fixed; inset: 0;
  z-index: 70;
  pointer-events: none;
}
.mobile-sheet.is-open { pointer-events: auto; }
.mobile-sheet__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-sheet.is-open .mobile-sheet__backdrop { opacity: 1; }
.mobile-sheet__panel {
  position: absolute;
  left: 12px; right: 12px; bottom: 12px;
  max-height: 78vh;
  background: var(--bg);
  border-radius: 22px;
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  transform: translateY(110%);
  transition: transform .38s cubic-bezier(.22,.61,.36,1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.mobile-sheet.is-open .mobile-sheet__panel { transform: translateY(0); }
.mobile-sheet__handle {
  width: 44px; height: 4px;
  margin: 10px auto 4px;
  border-radius: 2px;
  background: var(--line);
  flex-shrink: 0;
}
.mobile-sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 14px;
  flex-shrink: 0;
}
.mobile-sheet__brand {
  display: flex; align-items: center; gap: 10px;
}
.mobile-sheet__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text);
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  border: 1px solid var(--line);
}
.mobile-sheet__name {
  font-size: 14px; font-weight: 500; letter-spacing: 1px;
}
.mobile-sheet__menu-btn {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 11px; letter-spacing: 1.5px;
  cursor: pointer;
  transition: background .2s ease;
}
.mobile-sheet__menu-btn:hover { background: var(--bg-2); }

.mobile-sheet__nav {
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 18px 12px;
  flex-shrink: 0;
}
.mobile-sheet__nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-2);
  font-size: 16px; font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.mobile-sheet__nav-item:hover { background: var(--bg); border-color: var(--text-soft); }
.mobile-sheet__nav-item.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.mobile-sheet__nav-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 22px;
  border-radius: 6px;
  background: rgba(0,0,0,.05);
  color: var(--text-soft);
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  flex-shrink: 0;
}
body[data-mode="dark"] .mobile-sheet__nav-num { background: rgba(255,255,255,.08); }
.mobile-sheet__nav-item.is-active .mobile-sheet__nav-num { background: rgba(255,255,255,.15); color: rgba(255,255,255,.85); }

.mobile-sheet__section-title {
  padding: 4px 22px 8px;
  font-size: 11px; letter-spacing: 2px; color: var(--text-soft);
  flex-shrink: 0;
}
.mobile-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 18px 18px;
  overflow-y: auto;
}
.mobile-sheet__action {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  text-align: left;
}
.mobile-sheet__action:hover { background: var(--bg); border-color: var(--text-soft); }
.mobile-sheet__action--danger { color: #c84a4a; border-color: rgba(220,80,80,.35); }
.mobile-sheet__action--danger:hover { background: rgba(220,80,80,.08); }
.mobile-sheet__action svg { flex-shrink: 0; }

/* 仅在移动端启用抽屉 + 简化顶栏（按截图：左 LOGO 独立 + 右 搜索/菜单 图标） */
@media (max-width: 720px) {
  .topbar__nav,
  .topbar__expand,
  .topbar__dropdown { display: none !important; }
  .mobile-sheet { display: block; }

  /* 移动端独立搜索+菜单（在 topbar 外部，fixed 不受 topbar 干扰） */
  .mobile-topbar-actions {
    position: fixed;
    top: var(--menu-top-dist, 36px);
    right: 16px;
    z-index: 61;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
  }
  .mobile-topbar-actions .iconbtn {
    width: 36px; height: 36px;
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.04);
    border: 1px solid var(--line, rgba(0,0,0,.08));
    border-radius: 50%;
    box-shadow: none;
    color: var(--text-soft);
    cursor: pointer;
  }
  body[data-mode="dark"] .mobile-topbar-actions .iconbtn { background: rgba(255,255,255,.06); }
  /* 滚动后隐藏独立 actions（按钮已收入 topbar 胶囊） */
  body[data-scrolled="true"] .mobile-topbar-actions { display: none; }

  /* ===== 第一屏：LOGO 在左侧长条胶囊（左右大留空呈明显长条形），浅底+细边 ===== */
  .topbar {
    width: max-content !important;
    left: 16px !important;
    transform: none !important;
    padding: 6px var(--mobile-logo-capsule-pad-x, 24px) !important;
    background: rgba(0,0,0,.04) !important;
    border: 1px solid var(--line, rgba(0,0,0,.08)) !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    overflow: visible !important; /* 不裁剪 fixed 的菜单 */
    transition: left .55s cubic-bezier(.22,.61,.36,1),
                right .55s cubic-bezier(.22,.61,.36,1),
                padding .35s ease, width .35s ease,
                border-radius .35s ease, transform .35s ease;
  }
  body[data-mode="dark"] .topbar { background: rgba(255,255,255,.06) !important; }
  .topbar__inner {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0 !important;
  }
  .topbar__logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: auto !important; height: var(--mobile-logo-capsule-h, 36px) !important;
    padding: 0;
  }
  /* 第一屏显示 QX studio 文字 */
  .topbar__logo-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    gap: 2px;
    padding-right: 6px;
  }
  .topbar__logo-qx { font-family: var(--serif, Georgia, serif); font-size: 16px; font-weight: 600; color: var(--text); }
  .topbar__logo-studio { font-size: 9px; letter-spacing: 1.5px; color: var(--text-soft); text-transform: uppercase; }
  .topbar__logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: calc(var(--mobile-logo-capsule-h, 36px) - 8px); height: calc(var(--mobile-logo-capsule-h, 36px) - 8px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
  }
  .topbar__logo-mark img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

  /* 第一屏：隐藏 topbar 内的 actions（用独立的 mobile-topbar-actions 代替） */
  .topbar__actions { display: none !important; }

  /* ===== 滚动后：LOGO 变圆形，三图标并排收入新胶囊（仅底色） ===== */
  body[data-scrolled="true"] .topbar {
    left: auto !important;
    right: 16px !important;
    transform: none !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 0 !important;
    border-radius: 999px !important;
    padding: 5px var(--mobile-menu-capsule-pad-x, 14px) !important; /* 新胶囊左右 padding */
    overflow: visible !important;
    background: rgba(0,0,0,.04) !important;
    border: 1px solid var(--line, rgba(0,0,0,.08)) !important;
    box-shadow: none !important;
  }
  body[data-mode="dark"][data-scrolled="true"] .topbar { background: rgba(255,255,255,.06) !important; }
  body[data-scrolled="true"] .topbar__inner {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 8px !important;
    padding: 0 !important;
    justify-content: center !important;
    align-items: center;
    width: max-content !important;
  }
  body[data-scrolled="true"] .topbar__actions {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    z-index: auto;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    top: auto !important;
    right: auto !important;
  }
  body[data-scrolled="true"] .topbar__actions .iconbtn:not(#searchBtn):not(#mobileMenuBtn):not(#settingsBtn) { display: none; }
  /* 滚动后显示 #mobileMenuBtn（.topbar__mobile-toggle 默认 display:none，需强制开启） */
  body[data-scrolled="true"] .topbar__mobile-toggle { display: inline-flex !important; }
  /* 滚动后 #searchBtn 圆形背景（与其他图标一致） */
  body[data-scrolled="true"] #searchBtn {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    background: transparent !important;
    border-radius: 50% !important;
  }
  /* 滚动后 #settingsBtn 圆形背景（与其他图标一致，仅登录后显示） */
  body[data-admin="true"][data-scrolled="true"] #settingsBtn {
    display: inline-flex !important;
    align-items: center; justify-content: center;
    background: transparent !important;
    border-radius: 50% !important;
  }
  /* LOGO 变圆形 */
  body[data-scrolled="true"] .topbar__logo {
    width: var(--mobile-menu-capsule-h, 28px) !important;
    height: var(--mobile-menu-capsule-h, 28px) !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    padding: 0 !important;
  }
  body[data-scrolled="true"] .topbar__logo-mark {
    width: var(--mobile-menu-capsule-h, 28px) !important; height: var(--mobile-menu-capsule-h, 28px) !important;
  }
  body[data-scrolled="true"] .topbar__logo-text { display: none !important; }
  body[data-scrolled="true"] .topbar__actions .iconbtn,
  body[data-scrolled="true"] .topbar__mobile-toggle {
    width: var(--mobile-menu-capsule-h, 28px) !important; height: var(--mobile-menu-capsule-h, 28px) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    flex-shrink: 0;
  }
  body[data-scrolled="true"] .topbar__actions .iconbtn svg,
  body[data-scrolled="true"] .topbar__mobile-toggle svg { width: 14px; height: 14px; }
  body[data-scrolled="true"] .topbar:hover {
    width: max-content !important;
    border-radius: 999px !important;
  }
}

/* 桌面端隐藏移动端独立 actions */
@media (min-width: 721px) {
  .mobile-topbar-actions { display: none !important; }
}

/* =========================================================
   面板扩展控件
   ========================================================= */

.section-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent, var(--text-soft));
  margin: 18px 0 8px;
  padding-left: 9px;
  border-left: 3px solid var(--accent, var(--line));
  text-transform: uppercase;
  font-weight: 700;
}
.section-label:first-child { margin-top: 0; }
/* 设置模块大标题（每个设置页顶部） */
.module-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent, var(--line));
}

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-group button {
  flex: 1;
  min-width: 56px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  color: var(--text-soft);
  transition: all .2s ease;
  text-align: center;
}
.btn-group button:hover { color: var(--text); border-color: var(--text); }
.btn-group button.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}
.thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  background: var(--bg-2);
  transition: border-color .2s ease, transform .2s ease;
}
.thumb:hover { transform: translateY(-2px); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-selected { border-color: var(--accent); }
.thumb.is-selected::after {
  content: "✓";
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}
.switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  transition: background .25s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.is-on { background: var(--text); }
.switch.is-on::after { transform: translateX(16px); }

.range-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--text);
}
.range-row .val {
  font-size: 12px;
  color: var(--text-soft);
  min-width: 48px;
  text-align: right;
}

.tip-bar {
  font-size: 11px;
  color: var(--text-soft);
  background: rgba(0,0,0,.03);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 10px;
  line-height: 1.5;
}
body[data-mode="dark"] .tip-bar { background: rgba(255,255,255,.04); }

/* =========================================================
   菜单尺寸 / 位置 / 大图高度 / 图库密度
   ========================================================= */
body[data-menu-size="compact"] .topbar__inner { padding: 6px 12px 6px 10px; gap: 14px; }
body[data-menu-size="compact"] .topbar__nav { gap: 16px; }
body[data-menu-size="compact"] .nav-item { font-size: 12px; }
body[data-menu-size="compact"] .topbar__logo { width: 32px; height: 32px; }
body[data-menu-size="compact"] .iconbtn { width: 30px; height: 30px; }
body[data-menu-size="compact"] .iconbtn svg { width: 15px; height: 15px; }

body[data-menu-size="wide"] .topbar__inner { padding: 14px 26px 14px 20px; gap: 24px; }
body[data-menu-size="wide"] .topbar__nav { gap: 36px; }
body[data-menu-size="wide"] .nav-item { font-size: 15px; }
body[data-menu-size="wide"] .topbar__logo { width: 44px; height: 44px; }
body[data-menu-size="wide"] .iconbtn { width: 40px; height: 40px; }
body[data-menu-size="wide"] .iconbtn svg { width: 20px; height: 20px; }

body[data-menu-pos="top-center"] .topbar {
  left: 50%; right: auto; top: var(--menu-top-dist, 36px); bottom: auto;
  transform: translateX(-50%);
}
body[data-menu-pos="top-left"] .topbar {
  left: 24px; right: auto; top: var(--menu-top-dist, 36px); bottom: auto;
  transform: none;
  width: auto; max-width: calc(100% - 48px);
}
body[data-menu-pos="top-right"] .topbar {
  left: auto; right: 24px; top: var(--menu-top-dist, 36px); bottom: auto;
  transform: none;
  width: auto; max-width: calc(100% - 48px);
}
body[data-menu-pos="bottom-center"] .topbar {
  left: 50%; right: auto; top: auto; bottom: 22px;
  transform: translateX(-50%);
}
body[data-menu-pos="bottom-center"] .page { padding-top: 24px; }

body[data-hero-size="short"] .hero__slide img { max-height: 46vh; }
body[data-hero-size="tall"]   .hero__slide img { max-height: 84vh; }
body[data-hero-size="full"]   .hero__slide img { max-height: 98vh; }

body[data-gallery-density="cozy"]  .masonry { column-count: 2; column-gap: 12px; }
body[data-gallery-density="loose"] .masonry { column-count: 4; column-gap: 22px; }
@media (max-width: 900px) {
  body[data-gallery-density="loose"] .masonry { column-count: 2; }
}

/* =========================================================
   首页大图鼠标视差效果
   ========================================================= */
.hero__slide img {
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
.hero__viewport {
  cursor: grab;
}

/* =========================================================
   textarea 样式（后台面板）
   ========================================================= */
label textarea {
  display: block;
  margin-top: 4px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  resize: vertical;
  outline: none;
}
label textarea:focus { border-color: var(--accent); }

/* =========================================================
   响应式补充
   ========================================================= */
@media (max-width: 720px) {
  body[data-scrolled="true"] .floating { padding: 0 16px 0; }
  .floating__label { display: none; }
  /* 关键：滚动后 topbar 宽度由内容决定（max-content），不强制 48px，
     避免 LOGO+菜单溢出右侧画面。padding 增大让胶囊能容纳 3 个图标 */
  body[data-scrolled="true"] .topbar,
  body[data-scrolled="true"] .topbar:hover {
    width: max-content !important;
    max-width: calc(100vw - 32px) !important;
    padding: 5px 14px !important;
  }
}

/* =========================================================
   浮动菜单尺寸（管理后台控制）
   ========================================================= */
body[data-float-size="compact"] .floating__inner { padding: 6px 14px; gap: 10px; }
body[data-float-size="compact"] .style-item { padding: 5px 10px; font-size: 12px; }
body[data-float-size="wide"] .floating__inner { padding: 14px 24px; gap: 18px; }
body[data-float-size="wide"] .style-item { padding: 9px 18px; font-size: 14px; }

/* =========================================================
   页面底部留白给固定的浮动栏
   ========================================================= */
.page { padding-bottom: 92px; }

/* =========================================================
   v16 新增：后台缩回 / 关于图片墙 / 导航添加拖动 / 标题样式 /
   下滑固定大图 / 列数切换 / 取消回到顶部
   ========================================================= */

/* 大图高度：按图片调整（自适应，不限制高度） */
body[data-hero-size="fit"] .hero__slide img { max-height: none; }

/* ---- 后台面板缩回（collapsed 贴边） ---- */
body[data-panel="collapsed"] .theme-panel {
  width: 46px;
  border-right: 1px solid var(--line);
}
body[data-panel="collapsed"] .theme-panel header,
body[data-panel="collapsed"] .theme-panel .tabs,
body[data-panel="collapsed"] .theme-panel .tab-panel { display: none; }
body[data-panel="collapsed"] .page { margin-left: 46px; }
body[data-panel="collapsed"] .topbar-spacer { left: 46px; }
body[data-panel="collapsed"] .topbar {
  left: calc(50% + 23px);
  width: min(880px, calc(100vw - 46px - 40px));
}
body[data-panel="collapsed"] .sticky-title { left: calc(50% + 23px); }
body[data-panel="collapsed"] .floating__inner { max-width: calc(100vw - 46px - 48px); }

.panel-toggle-btn {
  display: none;
  position: fixed;
  top: 18px;
  z-index: 78;
  left: calc(var(--admin-panel-w, 380px));
  transform: translateX(-50%);
  align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-soft);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  cursor: pointer;
  transition: left .38s cubic-bezier(.22,.61,.36,1), background .2s ease, color .2s ease, transform .2s ease;
}
.panel-toggle-btn:hover { background: var(--text); color: var(--bg); }
.panel-toggle-btn__chev { transition: transform .3s ease; }
/* 面板展开态：贴在面板右外边框（与面板右缘对齐，跟随面板移动） */
body[data-panel="open"] .panel-toggle-btn { display: inline-flex; }
/* 面板缩回态(46px)：贴在缩回条右外边框，箭头翻转指向展开方向 */
body[data-panel="collapsed"] .panel-toggle-btn { display: inline-flex; left: 46px; }
body[data-panel="collapsed"] .panel-toggle-btn__chev { transform: rotate(180deg); }

/* ---- 导航项：添加模式 + 拖动排序 ---- */
.nav-items-box {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px;
}
.nav-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  font-size: 12.5px;
  color: var(--text);
  cursor: grab;
  user-select: none;
  transition: border-color .2s ease, background .2s ease, opacity .2s ease, transform .15s ease;
}
.nav-chip:hover { border-color: var(--accent); }
.nav-chip.is-dragging { opacity: .4; cursor: grabbing; }
.nav-chip.is-over { border-color: var(--text); transform: scale(1.04); }
.nav-chip__text { line-height: 1; }
.nav-chip__del {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.06);
  color: var(--text-soft);
  font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.nav-chip__del:hover { background: rgba(220,50,50,.15); color: #c44; }
.nav-add-row { display: flex; gap: 6px; align-items: center; margin-bottom: 10px; }
.nav-add-row input {
  flex: 1; min-width: 0;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--text);
}
.ghost-btn {
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--text-soft); font-size: 12px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--text); }

/* ---- 首页标题文字样式 ---- */
.color-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.color-row input[type="color"] {
  width: 42px; height: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer;
}

/* ---- 关于页图片墙 ---- */
.about__gallery {
  margin: 34px auto 0; max-width: 720px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.about__gallery.is-on { display: grid; }
.about-gallery-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 14px; box-shadow: var(--card-shadow);
  transition: transform .4s ease;
}
.about-gallery-img:hover { transform: translateY(-4px); }

/* 路书图片指引（关于页地图定位下方） */
.about__route-guide {
  margin: 24px auto 0; max-width: 720px;
}
.about__route-guide .about__info-label { display: block; margin-bottom: 10px; }
.about__route-guide__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.about__route-guide__grid .about-gallery-img {
  aspect-ratio: 4 / 3;
}
@media (max-width: 600px) {
  .about__route-guide__grid { grid-template-columns: 1fr; }
}
.about-images-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px;
}
.about-img-cell {
  position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
}
.about-img-cell img { width: 100%; height: 100%; object-fit: cover; }
.about-img-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.about-img-del:hover { background: rgba(220,50,50,.85); }

/* 关于页美化：标题下方分隔线 */
.about__inner h2 { position: relative; padding-bottom: 18px; }
.about__inner h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 56px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ---- 首页固定大图带（v16）已移除：改为 .hero__caption 下滑后 sticky 固定标题 ---- */

/* ---- 风格菜单左侧三点 → 下滑后变为向上小三角 ---- */
.floating__label .fl-up { display: none; }
body[data-scrolled="true"] .floating__label { cursor: pointer; }
body[data-scrolled="true"] .floating__label .fl-dots { display: none; }
body[data-scrolled="true"] .floating__label .fl-up { display: block; }

/* ---- 首页标题行：滚动提示文字 + 列数切换按钮（右侧无圆圈） ---- */
.hero__caption-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px;
  gap: 12px;
}
.home-cols-btn {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); background: transparent;
  border: none; cursor: pointer; padding: 0;
  transition: color .2s ease, transform .2s ease;
}
.home-cols-btn:hover { color: var(--text); transform: scale(1.12); }

/* 瀑布流列数完全由 data-home-cols 控制，所有屏幕尺寸都支持 1/2/3 列 */
body[data-home-cols="3"] .home-masonry { column-count: 3; }
body[data-home-cols="2"] .home-masonry { column-count: 2; }
body[data-home-cols="1"] .home-masonry { column-count: 1; }

/* 首页尾部模块 */
.home-footer {
  margin-top: 96px;
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: transparent;
}
.home-footer__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: center;
}
.home-footer__brand {
  display: flex; align-items: center; gap: 12px;
}
.home-footer__logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.home-footer__logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.home-footer__brand-text { display: flex; flex-direction: column; }
.home-footer__title {
  font-size: 15px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--text);
}
.home-footer__subtitle {
  font-size: 11px; letter-spacing: 1.5px; color: var(--text-soft);
  margin-top: 2px;
}
.home-footer__nav {
  display: flex; gap: 24px;
  justify-content: center;
}
.home-footer__link {
  font-size: 13px; color: var(--text-soft);
  text-decoration: none;
  letter-spacing: 1.5px;
  transition: color .2s ease;
}
.home-footer__link:hover { color: var(--text); }
.home-footer__meta {
  text-align: right;
  display: flex; flex-direction: column; gap: 4px;
}
.home-footer__row {
  font-size: 12px; color: var(--text);
  letter-spacing: 1px;
}
.home-footer__row--soft {
  font-size: 11px; color: var(--text-soft);
  letter-spacing: 1.5px;
}
.home-footer__icp {
  margin-top: 4px;
  font-size: 11px; color: var(--text-soft);
  letter-spacing: .5px;
}
.home-footer__icp:empty { display: none; }
.home-footer__icp a { color: var(--text-soft); text-decoration: none; }
.home-footer__icp a:hover { color: var(--text); }
@media (max-width: 720px) {
  .home-footer { margin-top: 64px; padding: 32px 0 24px; }
  .home-footer__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 24px;
    text-align: center;
  }
  .home-footer__brand { justify-content: center; }
  .home-footer__nav { justify-content: center; gap: 18px; }
  .home-footer__meta { text-align: center; }
}
/* 不再用 media query 覆盖列数，让用户在所有屏幕尺寸下都能自由切换 1/2/3 列 */

/* ---- 取消回到顶部按钮（下滑后不再显示） ---- */
.back-to-top { display: none !important; }

/* ---- 后台：服务器同步状态条 ---- */
.server-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: .2px;
  border: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.server-status__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
}
.server-status__txt { flex: 1 1 auto; min-width: 0; word-break: break-word; }

/* 全局浮层版：屏幕右下角，登录后任何界面都能看到 */
.server-status--floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  margin: 0;
  z-index: 9999;
  max-width: min(360px, calc(100vw - 32px));
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  cursor: default;
  user-select: none;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .35s ease;
}
.server-status--floating[hidden] { display: none !important; }
body[data-panel="open"] .server-status--floating { right: calc(var(--admin-panel-w, 380px) + 16px); }

.server-status[data-ok="true"] {
  color: #2f9e69;
  background: rgba(47, 158, 105, .10);
  border-color: rgba(47, 158, 105, .28);
}
.server-status[data-ok="false"] {
  color: #c9542f;
  background: rgba(201, 84, 47, .10);
  border-color: rgba(201, 84, 47, .28);
}
body[data-mode="dark"] .server-status[data-ok="true"] {
  color: #6cd49a;
  background: rgba(108, 212, 154, .12);
  border-color: rgba(108, 212, 154, .32);
}
body[data-mode="dark"] .server-status[data-ok="false"] {
  color: #ff8a66;
  background: rgba(255, 138, 102, .12);
  border-color: rgba(255, 138, 102, .32);
}
.server-status[data-ok="false"] .server-status__dot {
  animation: serverStatusPulse 1.8s cubic-bezier(.16, 1, .3, 1) infinite;
}
@keyframes serverStatusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(201, 84, 47, .55); }
  70%  { box-shadow: 0 0 0 6px rgba(201, 84, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 84, 47, 0); }
}
@keyframes serverStatusPulseDark {
  0%   { box-shadow: 0 0 0 0 rgba(255, 138, 102, .55); }
  70%  { box-shadow: 0 0 0 6px rgba(255, 138, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 138, 102, 0); }
}
body[data-mode="dark"] .server-status[data-ok="false"] .server-status__dot {
  animation: serverStatusPulseDark 1.8s cubic-bezier(.16, 1, .3, 1) infinite;
}
@media (prefers-reduced-motion: reduce) {
  .server-status[data-ok="false"] .server-status__dot,
  body[data-mode="dark"] .server-status[data-ok="false"] .server-status__dot { animation: none; }
}

/* ---- 顶栏：登录后的账号容器（账号名 + 齿轮） ---- */
.topbar__account {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar__account[hidden] { display: none !important; }
.topbar__account-name {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.topbar__account-name:hover {
  background: rgba(0,0,0,.05);
  border-color: var(--accent-soft, var(--line));
}
body[data-mode="dark"] .topbar__account-name:hover { background: rgba(255,255,255,.08); }
.topbar__settings { margin-left: 0; }

/* ---- 账号信息弹窗（点击账号名弹出） ---- */
.account-popup {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 9999;
}
.account-popup[hidden] { display: none !important; }
.account-popup__card {
  width: 220px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-glass, rgba(255,255,255,.9));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body[data-mode="dark"] .account-popup__card {
  background: rgba(30,28,26,.92);
  border-color: rgba(255,255,255,.12);
}
.account-popup__top { display: flex; align-items: center; gap: 10px; }
.account-popup__avatar {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent, #b08968);
  color: #fff;
  font-size: 18px; font-weight: 600;
}
.account-popup__name { font-size: 14px; font-weight: 600; color: var(--text); }
.account-popup__role { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.account-popup__logout {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.account-popup__logout:hover { background: rgba(201,84,47,.10); color: #c9542f; border-color: rgba(201,84,47,.3); }
