/* ============================================================
   PHOTO WALL · 光与影的收藏
   深空夜画廊风: 照片是主角, 界面退到幕后
   字体: Fraunces(展示) · Noto Serif SC(中文衬线) · Geist(正文)
   ============================================================ */

:root {
  /* 颜色(深空夜画廊: 深蓝底 + 暖米白 + 金) */
  --bg:        #0a0f1e;     /* 深蓝近黑(深空底) */
  --bg-soft:   #11172a;
  --surface:   #151c32;     /* 卡片/面板背景 */
  --ink:       #ebe5d5;     /* 暖米白(主文字/拍立得底) */
  --ink-mute:  #9ca0b4;
  --ink-dim:   #5d6478;
  --line:      #2a3252;     /* 细边框 */
  --line-soft: #1e2644;
  --accent:    #d4a853;     /* 金(强调) */
  --accent-2:  #e9cf8f;
  --accent-3:  #b5899a;     /* 紫粉(点缀) */
  --danger:    #c9543a;

  /* 尺寸与圆角 */
  --radius: 12px;
  --radius-sm: 8px;
  --gap: 22px;
  --maxw: 1280px;

  /* 阴影(拍立得深影, 克制两层) */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-pop: 0 30px 80px rgba(0, 0, 0, 0.55), 0 6px 18px rgba(0, 0, 0, 0.35);

  /* 字体 */
  --font-display: "Fraunces", "Noto Serif SC", Georgia, serif;
  --font-body:    "Geist", "Noto Serif SC", system-ui, -apple-system, "Segoe UI",
                  "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-cn:      "Noto Serif SC", "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 浏览器默认 [hidden]{display:none} 会被任何 display:xxx 覆盖, 强制拉回来 */
[hidden] { display: none !important; }

html { color-scheme: dark; }

/* 深色主题滚动条: 细 + 金色滑块, 避免默认白条突兀 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 83, 0.35);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(212, 168, 83, 0.55); }
html { scrollbar-width: thin; scrollbar-color: rgba(212, 168, 83, 0.35) transparent; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 深空氛围: 冷蓝远光 + 金色暖点 */
  background-image:
    radial-gradient(1200px 700px at 50% -20%, rgba(77, 100, 200, 0.12), transparent 60%),
    radial-gradient(900px 600px at 100% 20%, rgba(212, 168, 83, 0.06), transparent 55%),
    radial-gradient(700px 500px at 0% 80%, rgba(181, 137, 154, 0.06), transparent 55%);
  background-attachment: fixed;
}

img { display: block; }

/* 星空 canvas: fixed 满屏, 最低层级, 不挡点击 */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* 内容层要盖在星空之上(星空 z-index:0, 普通流元素默认在它下面) */
.topbar,
.hero,
.stage,
.footer {
  position: relative;
  z-index: 2;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ---------- 顶部细栏 ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  padding: 10px 32px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-bottom: 1px solid var(--line-soft);
  transition: opacity 200ms ease;
}
.topbar__right { color: var(--ink-mute); }
.topbar__right #photoCount { color: var(--accent); font-variant-numeric: tabular-nums; }

/* 滚动后细栏轻微退隐, 让导航更突出 */
.topbar.scrolled { opacity: 0.4; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(10, 15, 30, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}

/* 滚动后导航浮起阴影 */
.nav.scrolled { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.65); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(212, 162, 74, 0.55);
  animation: pulse 3.5s ease-in-out infinite;
}
.brand__text {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.02em;
}
.brand__text em { font-style: italic; font-weight: 300; color: var(--accent-2); }

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-height: 40px;
  transition: all 0.25s ease;
}

.btn svg { width: 15px; height: 15px; }

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--ghost { color: var(--ink-mute); border-color: var(--line); background: transparent; }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-dim); }

.btn--solid { color: #1a1408; background: var(--accent); }
.btn--solid:hover { background: var(--accent-2); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(212, 162, 74, 0.25); }
.btn--solid:disabled { opacity: 0.55; cursor: progress; transform: none; box-shadow: none; }

/* 3D 空间入口: 金色描边, 与星渊画廊呼应 */
.btn--space { color: var(--accent); border-color: rgba(212, 168, 83, 0.4); }
.btn--space:hover { color: var(--accent-2); border-color: var(--accent); box-shadow: 0 0 20px -6px rgba(212, 168, 83, 0.5); }

/* 危险按钮(删除) */
.btn--danger { background: var(--danger); color: #fdf6f2; box-shadow: 0 4px 16px -6px rgba(201, 84, 58, 0.5); }
.btn--danger:hover { transform: translateY(-2px); background: #b4472f; box-shadow: 0 8px 24px -8px rgba(201, 84, 58, 0.65); }
.btn--danger:active { transform: scale(0.96); }

.btn-lg { padding: 13px 26px; font-size: 15px; }

.btn-block { width: 100%; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 32px 44px;
  position: relative;
}

/* Hero 与照片墙之间的渐隐金色装饰线 */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.4), transparent);
}

.hero__kicker {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
  animation: rise 0.8s ease both;
}
.hero__title {
  font-family: var(--font-cn);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  animation: rise 0.9s 0.1s ease both;
}
.hero__title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-2);
  margin-left: 0.1em;
}
.hero__sub {
  max-width: 540px;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
  animation: rise 0.9s 0.2s ease both;
}

/* ---------- 主体 ---------- */
.stage {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* 瀑布流: CSS 多列, 浏览器自动平衡列高 */
.wall {
  columns: 3;
  column-gap: var(--gap);
}
@media (max-width: 980px) { .wall { columns: 2; } }
@media (max-width: 560px) { .wall { columns: 1; } }

/* ---------- 照片卡片(拍立得) ---------- */
.card {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  background: var(--ink);            /* 米白底 = 拍立得相纸 */
  padding: 6px 6px 10px;
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  animation: fadeUp 400ms ease-out both;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-pop);
}

/* 已选进 3D 空间: 卡片一圈淡金描边, 一眼看出哪些进了 3D */
.card--selected {
  box-shadow:
    0 0 0 2px rgba(212, 168, 83, 0.45),
    var(--shadow-card);
}
.card--selected:hover {
  box-shadow:
    0 0 0 2px rgba(212, 168, 83, 0.55),
    var(--shadow-pop);
}

.card-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #cfc9b8;               /* 相纸上照片区占位(浅米灰) */
  cursor: zoom-in;
}

/* 骨架屏: 图片未加载时扫一道金光 */
.card-media:has(img:not(.loaded))::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(212, 168, 83, 0.25) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
  pointer-events: none;
}

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

.card-media img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 400ms ease-out, opacity 300ms ease;
  opacity: 0;                        /* 加载完成后淡入, 见 app.js onload */
}
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.03); }

/* 悬停角标: "点击看大图"提示 */
.view-hint {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 18, 10, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: scale(0.8) translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}
.view-hint svg { width: 14px; height: 14px; }
.card:hover .view-hint,
.card:focus-within .view-hint { opacity: 1; transform: scale(1) translateY(0); }

/* 星标: 点亮 = 放进 3D 空间 */
.star-3d {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 18, 10, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: scale(0.8) translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease,
              color 200ms ease, background-color 200ms ease, border-color 200ms ease;
  cursor: pointer;
}
.star-3d svg { width: 14px; height: 14px; }
.card:hover .star-3d,
.card:focus-within .star-3d { opacity: 1; transform: scale(1) translateY(0); }

/* 选中态: 金色常亮 */
.star-3d.active {
  opacity: 1;
  transform: none;
  color: #8a6420;
  background: rgba(212, 168, 83, 0.28);
  border-color: rgba(212, 168, 83, 0.6);
}
.star-3d:hover { color: var(--accent); }

/* 拍立得底部留白区: 时间 + 删除 */
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 2px;
}
.card-time {
  font-size: 11px;
  color: rgba(26, 20, 8, 0.55);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.card-delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  color: rgba(26, 20, 8, 0.6);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms ease, transform 200ms ease, background-color 200ms ease;
}
.card:hover .card-delete,
.card-delete:focus-visible { opacity: 1; transform: none; }
.card-delete:hover { background: rgba(26, 20, 8, 0.08); }
.card-delete svg { width: 13px; height: 13px; }

/* 触屏(手机/平板)没有悬停: 删除按钮和星标必须常驻显示 */
@media (hover: none) {
  .card-delete { opacity: 1; transform: none; }
  .star-3d { opacity: 1; transform: none; }
}

/* 新上传卡片的入场动画错开一点 */
.card:nth-child(2)  { animation-delay: 40ms; }
.card:nth-child(3)  { animation-delay: 80ms; }
.card:nth-child(4)  { animation-delay: 120ms; }
.card:nth-child(5)  { animation-delay: 160ms; }
.card:nth-child(6)  { animation-delay: 200ms; }
.card:nth-child(7)  { animation-delay: 240ms; }
.card:nth-child(8)  { animation-delay: 280ms; }

/* ---------- 空状态 / 加载 / 错误 ---------- */
.state {
  padding: 80px 20px 120px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: fadeIn 400ms ease-out both;
}
.state h2 { font-family: var(--font-cn); font-size: 26px; font-weight: 700; }
.state p { color: var(--ink-mute); max-width: 420px; font-size: 14px; }

.empty-art {
  width: 92px;
  height: 112px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--ink);
  box-shadow: var(--shadow-card);
  animation: floatY 3.2s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.empty-art svg { width: 40px; height: 40px; }

/* 错误状态: 红色调, 图标复用 empty-art 框 */
.empty-art--error {
  color: var(--danger);
  background: rgba(201, 84, 58, 0.08);
  border: 1px solid rgba(201, 84, 58, 0.3);
  animation: none;
}
.empty-art--error svg { width: 36px; height: 36px; }

.state-loading .spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 800ms linear infinite;
}

/* ---------- 底部 ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 32px 40px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}
.footer__dot { color: var(--line); }

/* ---------- 拖拽上传遮罩 ---------- */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(6px);
  animation: fadeIn 150ms ease-out both;
}
.drop-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 72px;
  border: 2px dashed var(--accent);
  border-radius: 18px;
  background: rgba(212, 168, 83, 0.08);
  color: var(--ink);
  animation: popIn 200ms ease-out both;
}
.drop-box svg { width: 52px; height: 52px; color: var(--accent); }
.drop-box p { font-size: 1.15rem; font-weight: 600; font-family: var(--font-cn); }
.drop-box span { font-size: 0.85rem; color: var(--ink-mute); }

/* ---------- Lightbox 大图 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 18, 0.94);
  backdrop-filter: blur(10px);
  animation: fadeIn 200ms ease-out both;
}
.lightbox-figure {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 8px;
  box-shadow: var(--shadow-pop);
  animation: popIn 250ms ease-out both;
}
.lightbox-figure figcaption {
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  transition: background-color 200ms ease, transform 150ms ease, color 200ms ease;
}
.lightbox-close:hover { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.lightbox-close:active { transform: scale(0.94); }

body.no-scroll { overflow: hidden; }

/* ---------- 登录门禁(整站私有, 不透明遮罩) ---------- */
.lock {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(181, 137, 154, 0.15), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(77, 100, 200, 0.12), transparent 55%),
    var(--bg);
  animation: fadeIn 300ms ease-out both;
}
.lock-card {
  width: 100%;
  max-width: 360px;
  padding: 34px 30px 28px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: popIn 250ms ease-out both;
}
.lock-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.3);
}
.lock-icon svg { width: 26px; height: 26px; }
.lock-card h2 { font-family: var(--font-cn); font-size: 1.2rem; font-weight: 700; }
.lock-desc { font-size: 0.85rem; color: var(--ink-mute); }
.lock-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.lock-input::placeholder { color: var(--ink-dim); }
.lock-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.15);
}
.lock-error {
  font-size: 0.82rem;
  color: var(--danger);
  animation: fadeIn 200ms ease-out both;
}

/* ---------- 删除确认弹窗 ---------- */
.confirm {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 15, 30, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 200ms ease-out both;
}
.confirm-card {
  width: 100%;
  max-width: 340px;
  padding: 30px 28px 26px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: popIn 240ms ease-out both;
}
.confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--danger);
  background: rgba(201, 84, 58, 0.12);
  border: 1px solid rgba(201, 84, 58, 0.35);
}
.confirm-icon svg { width: 24px; height: 24px; }
.confirm-card h2 { font-family: var(--font-cn); font-size: 1.15rem; font-weight: 700; }
.confirm-desc {
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.confirm-actions .btn { flex: 1; justify-content: center; }

/* ---------- 回到顶部按钮 ---------- */
.btn-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 250ms ease, transform 250ms ease,
              color 200ms ease, border-color 200ms ease;
}
.btn-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.btn-top:hover { color: var(--accent); border-color: rgba(212, 168, 83, 0.4); }
.btn-top:active { transform: scale(0.94); }
.btn-top svg { width: 20px; height: 20px; }

/* ---------- Toast 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 300;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  animation: toastIn 250ms ease-out both;
}
.toast.toast-error {
  color: #f3c9be;
  border-color: rgba(201, 84, 58, 0.5);
}
.toast.toast-success { border-color: rgba(212, 168, 83, 0.5); }

/* ---------- 动画 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.82); opacity: 0.7; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 减少动效偏好: 尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 窄屏(手机) ---------- */
@media (max-width: 640px) {
  .topbar { padding: 8px 18px; font-size: 10px; }
  .nav { padding: 12px 18px; }
  .hero { padding: 48px 18px 32px; }
  .stage { padding: 0 18px 60px; }
  .footer { padding: 24px 18px; flex-wrap: wrap; }
  .card { margin-bottom: 16px; }
  .btn { padding: 9px 14px; font-size: 12px; }
  .btn--space span { display: none; }
  .btn--space { padding: 9px 12px; }
  .btn-logout { font-size: 0; padding: 9px 12px; }
  .btn-logout svg { width: 16px; height: 16px; }
  .drop-box { padding: 40px 32px; }
}
