/* =============================================================================
   Ksana's Album — 极简黑白
   结构：设计变量 / 基础 / 抬头 / 两栏布局 / 文件夹 / 图片网格 / 灯箱 / 响应式
   ========================================================================== */

/* ---------------------------------------------------------------- 设计变量 */
:root {
  color-scheme: light;

  /* 版心与留白：桌面端左右保持合适边距，移动端收窄 */
  --max-w: 1180px;
  --pad-x: clamp(20px, 4.5vw, 64px);
  --pad-y: clamp(28px, 6vh, 60px);

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

  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  --paper: #fafafa;
  --ink: #0b0b0c;
  --ink-2: rgba(11, 11, 12, 0.62);
  --ink-3: rgba(11, 11, 12, 0.38);
  --line: rgba(11, 11, 12, 0.12);
  --line-2: rgba(11, 11, 12, 0.2);
  --ornament: rgba(11, 11, 12, 0.78);

  --chip-bg: rgba(11, 11, 12, 0.035);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-line: rgba(11, 11, 12, 0.1);
  --glass-inset: rgba(255, 255, 255, 0.95);
  --shadow-1: 0 1px 2px rgba(11, 11, 12, 0.05);
  --shadow-2: 0 14px 32px -16px rgba(11, 11, 12, 0.3), 0 2px 8px -4px rgba(11, 11, 12, 0.14);
  --skeleton: rgba(11, 11, 12, 0.04);
  /* 骨架扫光的高光色，配 .photo--loading::after 用 */
  --sheen: rgba(11, 11, 12, 0.075);

  /* 背景光晕：给 backdrop-filter 提供可模糊的内容 */
  --glow-1: rgba(11, 11, 12, 0.07);
  --glow-2: rgba(11, 11, 12, 0.05);
  --glow-3: rgba(11, 11, 12, 0.045);
}

[data-theme='dark'] {
  color-scheme: dark;

  --paper: #0b0b0c;
  --ink: #f4f4f5;
  --ink-2: rgba(244, 244, 245, 0.64);
  --ink-3: rgba(244, 244, 245, 0.38);
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.26);
  --ornament: rgba(255, 255, 255, 0.82);

  --chip-bg: rgba(255, 255, 255, 0.06);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-line: rgba(255, 255, 255, 0.2);
  --glass-inset: rgba(255, 255, 255, 0.16);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 20px 44px -18px rgba(0, 0, 0, 0.8), 0 2px 10px -4px rgba(0, 0, 0, 0.55);
  --skeleton: rgba(255, 255, 255, 0.05);
  --sheen: rgba(255, 255, 255, 0.085);

  --glow-1: rgba(255, 255, 255, 0.07);
  --glow-2: rgba(255, 255, 255, 0.05);
  --glow-3: rgba(255, 255, 255, 0.04);
}

/* -------------------------------------------------------------------- 基础 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Noto Sans SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--chip-bg);
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 60;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.24s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* 背景光晕层 */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(62vw 52vh at 10% -12%, var(--glow-1), transparent 68%),
    radial-gradient(48vw 46vh at 96% 6%, var(--glow-2), transparent 66%),
    radial-gradient(70vw 60vh at 50% 116%, var(--glow-3), transparent 70%);
}

.page {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: var(--pad-y) var(--pad-x) calc(var(--pad-y) + 8px);
}

/* -------------------------------------------------------------- 线条装饰 */
.divider {
  position: relative;
  height: 1px;
  background: var(--line);
}

/* 中间一小段实线，作为极简装饰 */
.divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--ornament);
}

.rule-mini {
  width: 28px;
  height: 1px;
  background: var(--line-2);
}

/* 面板四角的 L 形细线 */
.ticked {
  position: relative;
}

.ticked::before,
.ticked::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s var(--ease);
}

.ticked::before {
  top: -8px;
  left: -8px;
  border-top: 1px solid var(--ornament);
  border-left: 1px solid var(--ornament);
}

.ticked::after {
  right: -8px;
  bottom: -8px;
  border-right: 1px solid var(--ornament);
  border-bottom: 1px solid var(--ornament);
}

/* ------------------------------------------------------------------ 抬头 */
.masthead {
  margin-bottom: clamp(30px, 5vh, 52px);
}

.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.masthead__title {
  margin: 0;
  font-size: clamp(28px, 5.4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.15;
}

.masthead__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.masthead__dot {
  width: 4px;
  height: 4px;
  background: var(--ornament);
}

.masthead .divider {
  margin-top: clamp(20px, 3vh, 30px);
}

/* 圆形图标按钮：悬停时玻璃质感 */
.btn-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn-icon .icon {
  width: 19px;
  height: 19px;
}

[data-theme='light'] .icon--moon,
[data-theme='dark'] .icon--sun {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn-icon:hover {
    color: var(--ink);
    background: var(--glass);
    border-color: var(--glass-line);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-inset);
  }
}

.btn-icon:active {
  transform: scale(0.94);
}

/* -------------------------------------------------------------- 两栏布局 */
.layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.panel {
  min-width: 0;
}

.panel__title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.panel--folders .rule-mini {
  margin: 12px 0 18px;
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel__meta {
  font-size: 12px;
  color: var(--ink-3);
}

.panel__note {
  margin: 18px 0 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
}

.panel__note[hidden] {
  display: none;
}

.panel--gallery {
  position: relative;
  padding-left: clamp(28px, 3.4vw, 48px);
  border-left: 1px solid var(--line);
}

/* -------------------------------------------------------------- 文件夹列表 */
.folder-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.folder-list:empty {
  display: none;
}

.folder-list::-webkit-scrollbar {
  width: 4px;
}

.folder-list::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 2px;
}

/* 玻璃质感圆角按钮（文件夹项 / 主题按钮 共用一套观感） */
.chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

/* 装饰小方块：悬停时变形成一条短线 */
.chip__mark {
  flex: none;
  width: 5px;
  height: 5px;
  background: var(--line-2);
  transition: width 0.32s var(--ease), height 0.32s var(--ease), background 0.32s var(--ease);
}

.chip__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip__count {
  flex: none;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.chip[aria-current='true'] {
  color: var(--ink);
  background: var(--chip-bg);
  border-color: var(--line);
}

.chip[aria-current='true'] .chip__mark {
  width: 14px;
  height: 1px;
  background: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    color: var(--ink);
    background: var(--glass);
    border-color: var(--glass-line);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-inset);
  }

  .chip:hover .chip__mark {
    width: 14px;
    height: 1px;
    background: var(--ink);
  }
}

.chip:active {
  transform: scale(0.985);
}

/* ---------------------------------------------------------------- 图片网格 */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.gallery:empty {
  display: none;
}

.photo {
  position: relative;
  display: block;
  padding: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--chip-bg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);

  /* 网格里可能有几百个格子。content-visibility 让浏览器直接跳过离屏格子的
     渲染（布局、绘制、以及它上面的动画都不发生），滚到哪算哪。
     宽度由 grid 轨道定、高度由 aspect-ratio 定，尺寸本来就是确定的，
     所以 contain-intrinsic-size 只是兜底，不会引起布局跳动。 */
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

/* 默认可见：JS 不可用时图片依然正常显示，动画只做锦上添花 */
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.photo img.is-entering {
  animation: photo-in 0.5s var(--ease);
}

@keyframes photo-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 正在下载的格子。扫光改用伪元素 + transform 动画 ——
   transform 会被提升到合成器，不触发主线程重绘。
   原来直接动 background-position，那是 paint 属性，几十个格子一起跑必掉帧。 */
.photo--loading {
  background: var(--skeleton);
}

.photo--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 28%, var(--sheen) 50%, transparent 72%);
  transform: translateX(-100%);
  animation: shimmer 1.4s linear infinite;
  will-change: transform;
  pointer-events: none;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* 悬停时：玻璃质感的小标签 + 轻微放大 */
.photo__badge {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 5px 10px;
  border: 1px solid var(--glass-line);
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-inset);
  color: var(--ink);
  font-size: 11.5px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  /* 关键：默认 hidden。
     backdrop-filter 在 opacity: 0 时依然会被浏览器建立成一层「实时背景模糊」，
     一张图每加载完成一次，下面几百个角标就得重新采样一次背景。
     visibility: hidden 让浏览器跳过绘制，这些渲染层根本不会创建；
     悬停时再打开，才有那一个角标带模糊。 */
  visibility: hidden;
  transform: translateY(6px);
  /* visibility 是离散属性：离场延迟到淡出结束再切（0.32s），
     入场不延迟（hover 那条规则里覆盖成 visibility 0s） */
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease),
    visibility 0s linear 0.32s;
}

@media (hover: hover) and (pointer: fine) {
  .photo:hover {
    border-color: var(--line-2);
    box-shadow: var(--shadow-2);
    transform: translateY(-2px);
  }

  .photo:hover img {
    transform: scale(1.045);
  }

  .photo:hover .photo__badge {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0s;
  }
}

/* -------------------------------------------------------------- 加载更多按钮 */
/* 网格里超过 BATCH_SIZE（25）张时出现在列表最下方，点一次追加一批 */
.gallery-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.gallery-more[hidden] {
  display: none;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--chip-bg);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease),
    box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn-more__icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--ease);
}

.btn-more__count {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  .btn-more:hover {
    color: var(--ink);
    background: var(--glass);
    border-color: var(--glass-line);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    box-shadow: var(--shadow-2), inset 0 1px 0 var(--glass-inset);
  }

  .btn-more:hover .btn-more__icon {
    transform: translateY(2px);
  }
}

.btn-more:active {
  transform: scale(0.985);
}

/* ------------------------------------------------------------------ 空状态 */
.empty {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: clamp(44px, 9vh, 84px) 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
}

.empty[hidden] {
  display: none;
}

.empty__frame {
  position: relative;
  width: 46px;
  height: 34px;
  margin-bottom: 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
}

.empty__frame::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 6px;
  width: 20px;
  height: 1px;
  background: var(--line-2);
  transform: translateY(-50%) rotate(-32deg);
  transform-origin: center;
}

.empty__frame::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 6px;
  width: 20px;
  height: 1px;
  background: var(--line-2);
  transform: translateY(-50%) rotate(-32deg);
}

.empty__title {
  margin: 0;
  font-size: 15px;
}

.empty__text {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* -------------------------------------------------------------------- 页脚 */
.site-foot {
  margin-top: clamp(48px, 8vh, 88px);
  text-align: center;
}

.site-foot .rule-mini {
  margin: 0 auto 16px;
}

.site-foot p {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* -------------------------------------------------------------------- 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(11, 11, 12, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.24s var(--ease);
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

/* 白色描边窗口：白底 + 内边距形成「描边」 */
.lightbox__frame {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  padding: 12px;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
  transform: scale(0.96);
  transition: transform 0.28s var(--ease);
}

.lightbox.is-open .lightbox__frame {
  transform: scale(1);
}

/* 保持原图比例，且长宽不超过当前视窗 */
.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--lb-space, 120px));
  max-height: calc(100dvh - var(--lb-space, 120px));
  border-radius: calc(var(--r-lg) - 8px);
  object-fit: contain;
  background: #f2f2f2;
  -webkit-user-drag: none;
  user-select: none;
}

/* 图片正下方的上传时间。说明会占高度，所以有说明时要把原图限高再收一档，
   否则「图 + 说明」的总高度会顶出视窗。
   注意：lightbox__frame 的白底是写死的（像相纸一样始终是白的），所以这里的颜色
   也不能用 --ink-2 / --ink-3 那些随主题翻转的变量 —— 深色模式下会变成白字压白底。
   和 .lightbox__close 一样用固定深色。 */
.lightbox__cap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em;
  margin: 10px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  color: rgba(11, 11, 12, 0.62);
  -webkit-user-select: none;
  user-select: none;
}

.lightbox__cap[hidden] {
  display: none;
}

.lightbox__cap-label {
  color: rgba(11, 11, 12, 0.38);
}

.lightbox__cap-time {
  font-variant-numeric: tabular-nums;
}

.lightbox.has-cap .lightbox__img {
  max-height: calc(100vh - var(--lb-space, 120px) - var(--lb-cap-h, 32px));
  max-height: calc(100dvh - var(--lb-space, 120px) - var(--lb-cap-h, 32px));
}

.lightbox__close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  transform: translate(34%, -34%);
  border: 1px solid rgba(11, 11, 12, 0.1);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #0b0b0c;
  cursor: pointer;
  transition: background 0.28s var(--ease), transform 0.28s var(--ease);
}

.lightbox__close svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .lightbox__close:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: translate(34%, -34%) scale(1.06);
  }
}

.lightbox__close:active {
  transform: translate(34%, -34%) scale(0.94);
}

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  /* 左右分栏改为上下，竖线装饰取消 */
  .panel--gallery {
    padding-left: 0;
    padding-top: 26px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  /* 文件夹改为横向滚动的胶囊列表 */
  .folder-list {
    flex-direction: row;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    margin-inline: calc(var(--pad-x) * -1);
    padding-inline: var(--pad-x);
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .folder-list::-webkit-scrollbar {
    display: none;
  }

  .chip {
    width: auto;
    flex: none;
    white-space: nowrap;
    padding: 8px 14px;
    border-color: var(--line);
    background: var(--chip-bg);
    scroll-snap-align: start;
  }

  .panel--folders .rule-mini {
    margin-bottom: 14px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14.5px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
  }

  .photo {
    border-radius: var(--r-sm);
  }

  .ticked::before,
  .ticked::after {
    display: none;
  }
}

/* 移动端把关闭按钮放进窗口内部，避免超出屏幕被裁切 */
@media (max-width: 640px) {
  .lightbox {
    /* 遮罩内边距 16px×2 + 白色描边 10px×2 = 52px，留一点余量 */
    --lb-space: 64px;
    --lb-cap-h: 30px;
  }

  .lightbox__frame {
    padding: 10px;
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
    transform: none;
  }
}

@media (max-width: 640px) and (hover: hover) and (pointer: fine) {
  .lightbox__close:hover {
    transform: scale(1.06);
  }
}

@media (max-width: 640px) {
  .lightbox__close:active {
    transform: scale(0.94);
  }
}

/* 尊重系统的「减少动态效果」 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
