/* =========================================================
   Seven 图床 — 浅色极简 + 玻璃拟态
   ========================================================= */

:root {
  --ink: #0e1526;
  --ink-soft: #2a3348;
  --muted: #667085;
  --muted-2: #8b94a7;
  --line: rgba(15, 23, 42, 0.075);
  --line-strong: rgba(15, 23, 42, 0.12);

  --brand: #5b5bf0;
  --brand-2: #8b5cf6;
  --brand-ink: #4a45e0;
  --ok: #0ea472;
  --danger: #e5484d;

  --glass: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62));
  --glass-border: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 18px 40px -22px rgba(15, 23, 42, 0.22);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --nav-h: 64px;
  --max: 1120px;

  --ease: cubic-bezier(0.22, 0.9, 0.24, 1);
}

* { box-sizing: border-box; }

/* 关键：作者样式里的 display 会覆盖 UA 的 [hidden]，这里强制兜底 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  display: flex; flex-direction: column; min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f6f7fb;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(99, 102, 241, 0.18); }

/* ---------- 背景光斑 ---------- */
.orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55;
  animation: drift 22s var(--ease) infinite alternate;
}
.orb-a { width: 44rem; height: 34rem; left: -12rem; top: -16rem; background: #cdd9ff; }
.orb-b { width: 34rem; height: 30rem; right: -10rem; top: -8rem; background: #e6d9ff; animation-delay: -6s; }
.orb-c { width: 30rem; height: 26rem; right: 6rem; bottom: -14rem; background: #c9f3e4; animation-delay: -11s; opacity: 0.42; }
.orb-d { width: 26rem; height: 22rem; left: 10rem; bottom: -12rem; background: #ffe3d0; animation-delay: -16s; opacity: 0.35; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(2rem, 1.5rem, 0) scale(1.08); }
}

/* ---------- 玻璃 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding: 14px 20px 0;
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; height: var(--nav-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.64));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 16px 32px -24px rgba(15, 23, 42, 0.3);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
}

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-mark {
  display: block;
  width: 36px; height: 36px; border-radius: 11px; overflow: hidden; flex: none;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95), 0 6px 16px -8px rgba(59, 130, 246, 0.8);
  background: #e8f1ff;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 17px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 12px 26px -12px rgba(59, 130, 246, 0.75); }
.brand-name { font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--muted); font-weight: 550; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  padding: 7px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 520;
  color: var(--muted); transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: var(--ink); background: rgba(15, 23, 42, 0.045); }
.nav-links a.active { color: var(--ink); background: rgba(15, 23, 42, 0.055); }
.nav-admin { opacity: 0.72; }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-slot { display: flex; align-items: center; gap: 8px; }

.quota { display: flex; align-items: center; gap: 8px; min-width: 0; }
.quota-bar {
  width: 74px; height: 5px; border-radius: 99px; overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}
.quota-bar i {
  display: block; height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.6s var(--ease);
}
.quota-text { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.lang-toggle {
  display: inline-flex; align-items: center; height: 30px; padding: 3px;
  border-radius: 999px; cursor: pointer; flex: none;
  background: rgba(15, 23, 42, 0.045);
  border: 1px solid var(--line);
  transition: background 0.18s, border-color 0.18s;
}
.lang-toggle:hover { background: rgba(15, 23, 42, 0.07); }
.lang-toggle:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.45); outline-offset: 2px; }
.lang-opt {
  display: grid; place-items: center; min-width: 30px; height: 24px; padding: 0 8px;
  border-radius: 999px; font-size: 11.5px; font-weight: 620; letter-spacing: 0.01em;
  color: var(--muted-2); transition: color 0.18s, background 0.2s, box-shadow 0.2s;
  user-select: none;
}
.lang-opt.is-on {
  color: var(--ink-soft); background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12), 0 1px 1px rgba(15, 23, 42, 0.04);
}

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font-size: 12.5px; font-weight: 650; color: #fff;
  background: linear-gradient(135deg, #6d6df3, #a06cf7);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 10px -4px rgba(99, 102, 241, 0.7);
}
.user-name { font-size: 13.5px; font-weight: 540; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid transparent; background: transparent;
  font-size: 13.5px; font-weight: 560; cursor: pointer; white-space: nowrap;
  transition: transform 0.14s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s, color 0.18s;
}
.btn:active { transform: scale(0.975); }
.btn:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.55); outline-offset: 2px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px -10px rgba(99, 102, 241, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primary:hover { box-shadow: 0 12px 26px -10px rgba(99, 102, 241, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn-ghost:hover { background: #fff; border-color: rgba(15, 23, 42, 0.2); }

.btn-danger { background: rgba(229, 72, 77, 0.08); color: #c92a2f; border-color: rgba(229, 72, 77, 0.18); }
.btn-danger:hover { background: rgba(229, 72, 77, 0.14); }

.btn-sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn-block { width: 100%; height: 44px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }

.spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 主容器 ---------- */
main { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px 60px; }
.view { animation: fade-up 0.5s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px;
  align-items: center; padding: 54px 0 36px;
}
.hero-copy { max-width: 640px; min-width: 0; }

.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 320px; }

.mock-card {
  border-radius: 22px; padding: 12px; transform: rotate(-2.5deg);
  animation: float 7s ease-in-out infinite;
}
.mock-thumb {
  height: 150px; border-radius: 14px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 120% at 15% 15%, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(135deg, #c7d2fe 0%, #ddd6fe 45%, #bae6fd 100%);
  display: grid; place-items: center;
}
.mock-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
  background-size: 22px 22px; opacity: 0.5;
  -webkit-mask-image: radial-gradient(90% 90% at 50% 50%, #000 20%, transparent 78%);
  mask-image: radial-gradient(90% 90% at 50% 50%, #000 20%, transparent 78%);
}
.mock-thumb span {
  position: relative; z-index: 1;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: #4f46e5;
  padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.mock-body { padding: 13px 8px 6px; }
.mock-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.mock-meta { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; font-variant-numeric: tabular-nums; }
.mock-chips { display: flex; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.chip {
  font-size: 11px; font-weight: 540; color: var(--muted);
  padding: 3px 9px; border-radius: 999px;
  background: rgba(15, 23, 42, 0.045); border: 1px solid transparent;
}
.chip.is-on { color: var(--brand-ink); background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.16); }

.mock-pill {
  position: absolute; right: -6px; bottom: -18px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: 11.5px; font-weight: 560; color: #0a7d5a;
  transform: rotate(-2.5deg);
  animation: float 7s ease-in-out infinite reverse;
}
.mock-pill svg { color: var(--ok); }

@keyframes float {
  0%, 100% { transform: rotate(-2.5deg) translateY(0); }
  50% { transform: rotate(-2.5deg) translateY(-7px); }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding: 40px 0 28px; }
  .hero-visual { display: none; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  height: 28px; padding: 0 12px 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 560; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(14, 164, 114, 0.16);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(14, 164, 114, 0.06); } }

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.14; letter-spacing: -0.035em; font-weight: 700;
}
.grad-text {
  background: linear-gradient(100deg, #4f46e5 0%, #7c3aed 42%, #0ea5e9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 15px; line-height: 1.75; color: var(--muted); max-width: 560px; }
kbd {
  display: inline-block; padding: 1px 6px; margin: 0 1px;
  font-family: inherit; font-size: 12px; font-weight: 560; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 6px;
}

/* ---------- 拖拽区 ---------- */
.dropzone {
  position: relative; margin-bottom: 26px; border-radius: var(--r-xl);
  padding: 40px 24px; cursor: pointer; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.dropzone::before {
  content: ""; position: absolute; inset: 10px; border-radius: 18px;
  border: 1.5px dashed rgba(99, 102, 241, 0.28); pointer-events: none;
  transition: border-color 0.25s, background 0.25s;
}
.dropzone:hover { transform: translateY(-2px); box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 26px 50px -26px rgba(99, 102, 241, 0.4); }
.dropzone:hover::before { border-color: rgba(99, 102, 241, 0.5); }
.dropzone:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.28); }

.dz-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.dz-icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  color: var(--brand-ink); margin-bottom: 6px;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.3s var(--ease);
}
.dropzone:hover .dz-icon { transform: translateY(-3px) scale(1.04); }
.dz-title { font-size: 17px; font-weight: 620; letter-spacing: -0.01em; }
.dz-sub { font-size: 12.8px; color: var(--muted-2); margin-bottom: 12px; }

.dz-hover {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(99, 102, 241, 0.1);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.dz-hover span {
  padding: 9px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 26px -10px rgba(99, 102, 241, 0.9);
}
.dropzone.dragging::before { border-color: var(--brand); background: rgba(99, 102, 241, 0.06); }
.dropzone.dragging .dz-hover { opacity: 1; }

/* ---------- 上传队列 ---------- */
.queue { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }

.up-item {
  display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 14px 11px 11px; border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.76); border: 1px solid var(--line);
  box-shadow: 0 8px 20px -18px rgba(15, 23, 42, 0.4);
  animation: fade-up 0.35s var(--ease) both;
}
.up-thumb {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  background: rgba(15, 23, 42, 0.05); border: 1px solid var(--line);
}
.up-body { min-width: 0; }
.up-name {
  font-size: 13px; font-weight: 540; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; margin-bottom: 6px;
}
.up-track { height: 4px; border-radius: 99px; background: rgba(15, 23, 42, 0.08); overflow: hidden; }
.up-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width 0.2s linear;
}
.up-item.done .up-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.up-item.error .up-fill { background: var(--danger); }
.up-status { font-size: 11.5px; color: var(--muted-2); margin-top: 5px; font-variant-numeric: tabular-nums; }
.up-item.error .up-status { color: var(--danger); }
.up-copy { flex: none; }

/* ---------- 图库 ---------- */
.library {
  padding: 26px 0 0; border-top: 1px solid var(--line); margin-top: 10px;
  scroll-margin-top: 90px;
}
.lib-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lib-title { display: flex; align-items: baseline; gap: 9px; }
.lib-title h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.count {
  font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 999px; background: rgba(15, 23, 42, 0.05);
}
.lib-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line-strong); color: var(--muted-2);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search:focus-within { border-color: rgba(99, 102, 241, 0.5); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }
.search input {
  border: 0; background: transparent; outline: none; font: inherit;
  font-size: 13px; color: var(--ink); width: 148px;
}
.search input::placeholder { color: var(--muted-2); }

.select {
  height: 34px; padding: 0 30px 0 12px; border-radius: 999px;
  font: inherit; font-size: 13px; color: var(--ink-soft); cursor: pointer;
  background: rgba(255, 255, 255, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b94a7' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--line-strong);
  -webkit-appearance: none; appearance: none;
}
.select:focus-visible { outline: 2px solid rgba(99, 102, 241, 0.4); outline-offset: 1px; }

/* 瀑布流：按图片原始比例排列，横版截图不会被裁成方块 */
.grid { column-width: 214px; column-gap: 14px; }
.card {
  position: relative; display: block; width: 100%; margin: 0 0 14px;
  break-inside: avoid; -webkit-column-break-inside: avoid;
  border-radius: var(--r-lg); overflow: hidden; cursor: zoom-in;
  background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 12px 26px -20px rgba(15, 23, 42, 0.35);
  transition: transform 0.28s var(--ease), box-shadow 0.28s;
  animation: fade-up 0.4s var(--ease) both;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03), 0 22px 40px -22px rgba(15, 23, 42, 0.4); }
.card img {
  width: 100%; height: auto; max-height: 380px; object-fit: cover;
  transition: transform 0.5s var(--ease); background: rgba(15, 23, 42, 0.04);
}
.card:hover img { transform: scale(1.045); }
.card-veil {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 11px;
  background: linear-gradient(180deg, transparent, rgba(12, 18, 32, 0.72));
  opacity: 0; transition: opacity 0.24s;
}
.card:hover .card-veil { opacity: 1; }
.card-name {
  font-size: 12px; font-weight: 540; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta { font-size: 11px; color: rgba(255, 255, 255, 0.72); margin-top: 2px; }
.card-copy {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 9px; cursor: pointer;
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(12, 18, 32, 0.42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
}
.card:hover .card-copy { opacity: 1; transform: none; }
.card-copy:hover { background: rgba(12, 18, 32, 0.68); }

/* 骨架屏 */
.skeleton-grid { column-width: 214px; column-gap: 14px; }
.skeleton-grid i {
  display: block; margin-bottom: 14px; border-radius: var(--r-lg);
  height: 150px; break-inside: avoid;
  background: linear-gradient(100deg, rgba(15, 23, 42, 0.05) 30%, rgba(15, 23, 42, 0.09) 50%, rgba(15, 23, 42, 0.05) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
.skeleton-grid i:nth-child(3n) { height: 210px; }
.skeleton-grid i:nth-child(4n) { height: 118px; }
@keyframes shimmer { to { background-position: -220% 0; } }

/* 空状态 / 未登录 */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 52px 20px; color: var(--muted-2); }
.empty p { font-size: 13.5px; }

.locked {
  border-radius: var(--r-xl); padding: 44px 24px; margin-top: 4px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.locked-ico {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  color: var(--brand-ink); margin-bottom: 4px;
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.07));
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.locked h3 { font-size: 16px; font-weight: 620; }
.locked p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.load-more-wrap { display: flex; justify-content: center; padding: 26px 0 0; }

/* ---------- 登录 ---------- */
.signin-wrap { display: grid; place-items: center; min-height: 56vh; padding: 40px 0; }
.signin-card { width: 100%; max-width: 396px; border-radius: var(--r-xl); padding: 34px 30px 26px; }
.signin-head { text-align: center; margin-bottom: 22px; }
.signin-head .brand-mark { margin: 0 auto 14px; }
.signin-head h2 { font-size: 21px; font-weight: 660; letter-spacing: -0.02em; margin-bottom: 6px; }
.signin-head p { font-size: 13px; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 560; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  font: inherit; font-size: 14px; color: var(--ink);
  background: rgba(255, 255, 255, 0.86); border: 1px solid var(--line-strong);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input::placeholder { color: var(--muted-2); }
.field input:focus {
  outline: none; background: #fff; border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.13);
}
.form-error {
  font-size: 12.5px; color: var(--danger); margin: -4px 0 12px;
  padding: 8px 12px; border-radius: 9px; background: rgba(229, 72, 77, 0.08);
}
.signin-foot { text-align: center; font-size: 12.5px; color: var(--muted-2); margin-top: 16px; }
.link { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(74, 69, 224, 0.3); }
.link:hover { text-decoration-color: currentColor; }

/* ---------- 灯箱 ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 28px; }
.lb-backdrop {
  position: absolute; inset: 0; background: rgba(10, 15, 28, 0.55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: fade-in 0.25s ease both;
}
@keyframes fade-in { from { opacity: 0; } }
.lb-panel {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  width: min(1080px, 100%); max-height: calc(100vh - 56px);
  border-radius: var(--r-xl); overflow: hidden;
  animation: pop 0.32s var(--ease) both;
}
@keyframes pop { from { opacity: 0; transform: scale(0.97) translateY(8px); } }

.lb-stage { position: relative; display: grid; place-items: center; padding: 18px; background: rgba(12, 18, 32, 0.03); min-height: 320px; }
.lb-stage img { max-height: calc(100vh - 120px); width: auto; max-width: 100%; border-radius: 12px; object-fit: contain; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.5);
  transition: background 0.18s, transform 0.18s;
}
.lb-nav:hover { background: #fff; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; color: var(--ink-soft); background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-strong);
}
.lb-close:hover { background: #fff; }

.lb-side { padding: 22px 20px; display: flex; flex-direction: column; gap: 16px; border-left: 1px solid var(--line); overflow-y: auto; }
.lb-meta h3 { font-size: 14.5px; font-weight: 620; word-break: break-all; line-height: 1.4; margin-bottom: 6px; }
.lb-meta p { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.lb-links { display: flex; flex-direction: column; gap: 8px; }

.lb-formats { display: flex; flex-wrap: wrap; gap: 5px; }
.fmt {
  height: 26px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.72);
  font-size: 11.5px; font-weight: 560; color: var(--muted);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.fmt:hover { background: #fff; color: var(--ink-soft); }
.fmt.is-on {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.32);
  color: var(--brand-ink);
}

.up-actions { display: flex; align-items: center; gap: 6px; }
.up-actions .select-sm { height: 28px; font-size: 12px; padding: 0 24px 0 8px; }
.lb-link-row { display: flex; flex-direction: column; gap: 5px; }
.lb-link-row > span { font-size: 11.5px; font-weight: 560; color: var(--muted-2); }
.lb-link-box {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 11px; border-radius: 10px;
  background: rgba(15, 23, 42, 0.035); border: 1px solid var(--line);
}
.lb-link-box code {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-link-box button {
  flex: none; height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer;
  font-size: 11.5px; font-weight: 560; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line-strong);
  transition: background 0.18s, color 0.18s;
}
.lb-link-box button:hover { background: #fff; }
.lb-link-box button.copied { color: var(--ok); border-color: rgba(14, 164, 114, 0.3); background: rgba(14, 164, 114, 0.08); }

.lb-actions { margin-top: auto; display: flex; gap: 8px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 120; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 9px; align-items: flex-end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; padding: 10px 15px;
  border-radius: 12px; font-size: 13px; font-weight: 520; color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.92); border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04), 0 16px 34px -18px rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: toast-in 0.3s var(--ease) both; pointer-events: auto;
  max-width: 320px;
}
.toast.out { animation: toast-out 0.25s ease forwards; }
.toast .ti { width: 16px; height: 16px; flex: none; }
.toast.ok .ti { color: var(--ok); }
.toast.err .ti { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* ---------- 后台 ---------- */
.admin-head { padding: 40px 0 22px; }
.admin-head h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; }
.admin-head p { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { border-radius: 16px; padding: 15px 18px; }
.stat-label { font-size: 12px; color: var(--muted-2); }
.stat-value {
  display: block; font-size: 21px; font-weight: 680; margin-top: 6px;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tab {
  height: 32px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  font-size: 13px; font-weight: 560; color: var(--muted);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.tab:hover { background: rgba(15, 23, 42, 0.045); color: var(--ink-soft); }
.tab.is-on {
  background: #fff; color: var(--ink-soft); border-color: var(--line-strong);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.panel { border-radius: var(--r-lg); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.panel-count { margin-left: auto; font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 560; font-size: 11px; color: var(--muted-2);
  padding: 9px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.table td { padding: 9px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(15, 23, 42, 0.018); }
.col-actions { width: 1%; white-space: nowrap; }

.cell-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-thumb {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none;
  background: rgba(15, 23, 42, 0.05); border: 1px solid var(--line);
}
.cell-name { min-width: 0; }
.cell-name b {
  display: block; font-weight: 540; max-width: 250px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell-sub { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 560;
}
.badge.on { background: rgba(14, 164, 114, 0.1); color: #0a7d5a; }
.badge.off { background: rgba(229, 72, 77, 0.1); color: #c92a2f; }

.num-input, .select-sm {
  height: 30px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #fff; font: inherit; font-size: 12.5px; color: var(--ink); padding: 0 8px;
}
.num-input { width: 88px; font-variant-numeric: tabular-nums; }
.select-sm {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 24px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b94a7' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
}
.num-input:focus, .select-sm:focus { outline: none; border-color: rgba(99, 102, 241, 0.5); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }

.panel-foot { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border-top: 1px solid var(--line); }
.page-info { font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.admin-empty { padding: 44px 20px; text-align: center; color: var(--muted-2); font-size: 13px; }

/* ---------- 页脚 ---------- */
.foot {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 22px 24px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  font-size: 12px; color: var(--muted-2); text-align: center;
}
.foot-row, .foot-legal {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
}
.foot-legal { font-size: 11.5px; }
.foot-legal a {
  color: var(--muted-2); transition: color 0.18s;
  text-underline-offset: 2px;
}
.foot-legal a:hover { color: var(--ink-soft); text-decoration: underline; }
.beian-police { display: inline-flex; align-items: center; gap: 4px; }
.beian-police img { display: block; width: 14px; height: 15px; margin-top: -1px; }
.foot-dot { opacity: 0.5; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .lb-panel { grid-template-columns: 1fr; max-height: calc(100vh - 40px); }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); max-height: 44vh; }
  .lb-stage img { max-height: 46vh; }
}

@media (max-width: 680px) {
  .nav { padding: 10px 12px 0; }
  .nav-inner { height: 56px; gap: 10px; padding: 0 8px 0 10px; }
  .nav-links { display: none; }
  .quota { display: none; }
  .user-name { display: none; }
  main { padding: 0 16px 60px; }
  .hero { padding: 36px 0 26px; }
  .dropzone { padding: 30px 16px; }
  .lib-tools { width: 100%; margin-left: 0; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .grid, .skeleton-grid { column-width: 46vw; column-gap: 10px; }
  .card { margin-bottom: 10px; }
  .toasts { right: 12px; left: 12px; bottom: 12px; align-items: stretch; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
