:root {
  --bg: #08090b;
  --bg-elev: #0e1015;
  --bg-card: #11141b;
  --bg-card-hover: #161a23;
  --bg-sunk: #0a0c10;
  --line: rgba(255, 255, 255, 0.082);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #f3f1ea;
  --muted: #989ca3;
  --faint: #626771;
  --volt: #d8ff3e;
  --volt-soft: rgba(216, 255, 62, 0.13);
  --volt-border: rgba(216, 255, 62, 0.48);
  --volt-ink: #0a0c06;
  --amber: #ffb84d;
  --ok: #2dd47a;
  --ok-soft: rgba(45, 212, 122, 0.14);
  --warn: #ffb84d;
  --warn-soft: rgba(255, 184, 77, 0.13);
  --bad: #ff645c;
  --bad-soft: rgba(255, 100, 92, 0.14);
  --font-display: "Syne", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 68px; }
body {
  background:
    radial-gradient(960px 420px at 14% -8%, rgba(216, 255, 62, 0.055), transparent 68%),
    radial-gradient(820px 380px at 88% -8%, rgba(86, 134, 255, 0.068), transparent 68%),
    var(--bg);
  color: var(--ink);
  font: 14px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}
/* 细腻暗房颗粒层 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%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");
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
body.readonly .admin-only { display: none !important; }
svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none;
}
svg.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 1.5px solid var(--volt); outline-offset: 2px; }

kbd {
  display: inline-block;
  font: 500 10.5px/1 var(--font-mono);
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.login-required {
  margin: 10px 0; padding: 10px 14px; border-radius: 10px;
  background: var(--bad-soft); border: 1px solid rgba(255, 100, 92, 0.35);
  color: #ffb4b0; font-size: 13px;
}
.login-required a { margin-left: 8px; color: var(--volt); text-decoration: underline; font-weight: 600; }

/* ========== 通用按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.12s, filter 0.14s;
}
.btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: var(--volt); border-color: transparent; color: var(--volt-ink); font-weight: 700;
}
.btn.primary:hover { filter: brightness(1.06); background: var(--volt); border-color: transparent; }
.btn.big { height: 38px; padding: 0 18px; font-size: 13px; }
.btn.small { height: 28px; padding: 0 11px; font-size: 12px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.icon-btn:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.1); }
.icon-btn svg { width: 16px; height: 16px; }

.text-btn, .link-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: 0; padding: 4px 6px;
  font-size: 13px; color: var(--muted);
  transition: color 0.14s;
}
.text-btn:hover, .link-btn:hover { color: var(--ink); }
.link-btn { text-decoration: underline; text-underline-offset: 3px; }
.text-btn.danger { color: #ff8c86; }
.text-btn.danger:hover { color: var(--bad); }

/* ========== 52px 单行暗玻璃顶栏 ========== */
.chrome {
  position: sticky; top: 0; z-index: 60;
  background: rgba(11, 13, 18, 0.94);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.topbar {
  max-width: 1560px; margin: 0 auto;
  height: 52px;
  padding: 0 clamp(14px, 2vw, 28px);
  display: flex; align-items: center; gap: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  white-space: nowrap; flex: none;
}
.brand-signal {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 11px rgba(216, 255, 62, 0.72);
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 800; font-size: 14.5px;
  letter-spacing: 0.055em; text-transform: uppercase;
}
.brand-count {
  font-family: var(--font-mono);
  font-size: 11px; color: #9ea5b3;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-tabs {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 4px;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  height: 100%; padding: 0 7px;
  background: transparent; border: 0;
  font-size: 12.5px; color: #c4c9d4;
  white-space: nowrap; flex: none;
  transition: color 0.15s;
}
.tab:hover { color: #ffffff; }
.tab .num { font-family: var(--font-mono); font-size: 10.5px; color: #8c94a3; }
.tab.active { color: #ffffff; font-weight: 600; }
.tab.active .num { color: var(--volt); }
.tab.active::after {
  content: ""; position: absolute; left: 7px; right: 7px; bottom: 0;
  height: 2px; background: var(--volt);
}
.tab.empty { opacity: 1; color: #7e8696; }
.tab.empty .num { color: #676f7f; }
.tab.empty:hover { color: #d6dbe6; }
.tab.empty:hover .num { color: #a1a9b8; }

.top-actions {
  display: flex; align-items: center; gap: 7px;
  flex: none;
}
.language-switch {
  flex: none; display: inline-flex; align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
  white-space: nowrap;
}
.language-switch a {
  display: grid; place-items: center; min-width: 30px; min-height: 30px;
  padding: 0 5px; color: #b5bdcc; font-size: 11px; font-weight: 700;
}
.language-switch a:hover, .language-switch a[aria-current="page"] { color: var(--volt); }
.language-switch a + a { border-left: 1px solid rgba(255, 255, 255, 0.12); }
.search-shell {
  display: flex; align-items: center; gap: 6px;
  width: 152px; height: 32px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: width 0.2s ease, border-color 0.16s, background 0.16s;
}
.search-shell:focus-within {
  width: 232px;
  border-color: var(--volt-border);
  background: rgba(255, 255, 255, 0.09);
}
.search-shell svg { color: #9aa2b1; width: 13.5px; height: 13.5px; }
.search-shell input {
  width: 100%; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 12px; color: var(--ink);
}
.search-shell input::placeholder { color: #959dac; }
.search-shell input::-webkit-search-cancel-button { cursor: pointer; }
.kbd {
  font-family: var(--font-mono); font-size: 10px; color: #a7afbe;
  padding: 1px 5px; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.05);
}

.filter-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px; color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}
.filter-trigger:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.11); }
.filter-trigger.has-active {
  border-color: var(--volt-border);
  background: var(--volt-soft);
  color: var(--volt);
}
.filter-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--volt); color: var(--volt-ink);
}

.btn-collect {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px;
  border-radius: 999px; border: 0;
  background: var(--volt); color: var(--volt-ink);
  font-size: 12.5px; font-weight: 700;
  white-space: nowrap;
  transition: transform 0.14s, filter 0.14s;
}
.btn-collect:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-collect .sc {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  opacity: 0.72;
}
.auth-logout {
  font-size: 12px; color: #a7afbe;
  padding: 0 6px; white-space: nowrap;
  transition: color 0.15s;
}
.auth-logout:hover { color: var(--ink); }

/* 浮动高级筛选抽屉 */
.filter-drawer {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #141821;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.86);
}
.filter-drawer-inner {
  max-width: 1560px; margin: 0 auto;
  padding: 18px clamp(14px, 2vw, 28px) 22px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px;
}
.fcol h4 {
  margin: 0 0 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #cdd3df;
}
.fchips { display: flex; flex-wrap: wrap; gap: 7px; }
.fchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  font-size: 12.5px; color: #eef0f5;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.fchip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.36);
  color: #ffffff;
}
.fchip.active {
  background: rgba(216, 255, 62, 0.18);
  border-color: rgba(216, 255, 62, 0.65);
  color: var(--volt);
  font-weight: 600;
}
.fchip .c { font-family: var(--font-mono); font-size: 11px; color: #aeb6c4; }
.fchip.active .c { color: var(--volt); }
.fchip.zero {
  opacity: 1;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.1);
  color: #939ba9;
}
.fchip.zero .c { color: #717988; }
.fchip.zero:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.24);
  color: #e4e7ee;
}
.fchip.zero:hover .c { color: #aeb6c4; }

.active-strip {
  max-width: 1560px; margin: 0 auto;
  padding: 10px clamp(14px, 2vw, 28px) 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.apill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--volt-soft);
  border: 1px solid rgba(216, 255, 62, 0.34);
  color: var(--volt); font-size: 11.5px;
}
.apill svg { width: 11px; height: 11px; }
.aclear {
  background: transparent; border: 0; color: var(--faint); font-size: 12px;
  text-decoration: underline; text-underline-offset: 3px;
}
.aclear:hover { color: var(--ink); }

/* ========== 主容器 ========== */
main {
  max-width: 1560px; margin: 0 auto;
  padding: 12px clamp(14px, 2vw, 28px) 48px;
}

/* ========== 上半区：暗房焦点舞台（左主银幕 + 右精选片单） ========== */
.spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 12px;
  height: 368px;
}

.stage-main {
  position: relative;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0d11;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.stage-media {
  position: absolute; inset: 0;
  background: #0b0d11;
}
.stage-media img,
.stage-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.stage-media img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.stage-main:hover .stage-media img { transform: scale(1.018); }
.stage-media video {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.stage-main.video-ready .stage-media video { opacity: 1; }

.stage-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(72% 64% at 14% 100%, rgba(8, 9, 11, 0.9) 0%, rgba(8, 9, 11, 0.44) 58%, transparent 100%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.45) 0%, rgba(8, 9, 11, 0.0) 24%, rgba(8, 9, 11, 0.12) 52%, rgba(8, 9, 11, 0.9) 100%);
}

.stage-top {
  position: absolute; left: 16px; right: 16px; top: 14px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  pointer-events: none;
}
.stage-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 26px; padding: 0 11px;
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.07em;
  color: var(--ink);
  white-space: nowrap; flex: none;
  pointer-events: auto;
}
.stage-pill .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 8px var(--volt);
}
.stage-pill .sep { opacity: 0.38; }
.stage-pill .tag-oss { color: var(--volt); }

.stage-top-right {
  display: flex; align-items: center; gap: 6px;
  pointer-events: auto; flex: none;
}
.stage-ctrl {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  background: rgba(8, 9, 11, 0.68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono); font-size: 10.5px; color: var(--ink);
  white-space: nowrap; flex: none;
  transition: border-color 0.15s, background 0.15s;
}
.stage-ctrl:hover { border-color: rgba(255, 255, 255, 0.34); background: rgba(16, 18, 24, 0.84); }
.stage-ctrl svg { width: 12px; height: 12px; }

.stage-bottom {
  position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
}
.stage-copy { min-width: 0; max-width: 660px; }
.stage-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: rgba(216, 255, 62, 0.9);
  text-transform: uppercase;
  margin-bottom: 5px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.stage-kicker .star-inline { color: var(--amber); }
.stage-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.35vw, 33px);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stage-one {
  margin: 6px 0 0;
  font-size: 13.5px; line-height: 1.45;
  color: rgba(243, 241, 234, 0.84);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.stage-cta {
  display: flex; align-items: center; gap: 8px;
  flex: none;
}
.cta-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px;
  border-radius: 999px; border: 0;
  background: var(--volt); color: var(--volt-ink);
  font-size: 13px; font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(216, 255, 62, 0.22);
  transition: transform 0.14s, filter 0.14s;
}
.cta-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cta-ghost {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 14px;
  border-radius: 999px;
  background: rgba(12, 14, 19, 0.66);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink); font-size: 12.5px; font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.cta-ghost:hover { border-color: rgba(255, 255, 255, 0.42); background: rgba(24, 28, 36, 0.86); }

.stage-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2.5px; z-index: 4;
  background: rgba(255, 255, 255, 0.12);
}
.stage-progress-fill {
  height: 100%; width: 0%;
  background: var(--volt);
  box-shadow: 0 0 10px rgba(216, 255, 62, 0.75);
}

/* 右侧精选片单导览列 */
.stage-rail {
  height: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  display: flex; flex-direction: column; gap: 7px;
  overflow: hidden;
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1px 4px 2px;
  flex: none;
}
.rail-title {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.rail-title .idx { color: var(--volt); }
.rail-nav { display: inline-flex; align-items: center; gap: 4px; }
.rail-arrow {
  width: 22px; height: 22px; padding: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.14s;
}
.rail-arrow:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.09); }
.rail-arrow svg { width: 12px; height: 12px; }

.rail-list {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.rail-item {
  position: relative;
  flex: 1 1 0; min-height: 54px; max-height: 66px;
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px 5px 7px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  overflow: hidden;
  transition: background 0.16s, border-color 0.16s;
}
.rail-item:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}
.rail-item.active {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(216, 255, 62, 0.42);
}
.rail-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--volt);
  box-shadow: 0 0 10px rgba(216, 255, 62, 0.6);
}
.rail-thumb {
  position: relative; flex: none;
  width: 90px; height: 50px;
  border-radius: 6px; overflow: hidden;
  background: #0a0c10;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.rail-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.25s ease;
}
.rail-item:hover .rail-thumb img { transform: scale(1.05); }
.rail-thumb .r-dot {
  position: absolute; left: 4px; top: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 6px rgba(216, 255, 62, 0.8);
}
.rail-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.rail-name {
  font-size: 12.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.25;
}
.rail-item.active .rail-name { color: #fff; }
.rail-sub {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px;
}
.rail-sub .st { color: var(--amber); }
.rail-sub .oss-t { color: rgba(216, 255, 62, 0.85); }
.rail-item-bar {
  position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0%;
  background: rgba(216, 255, 62, 0.65);
  pointer-events: none;
}

/* ========== 下半区：策展分组控制条 + 多图画廊 ========== */
.section-bar {
  margin: 16px 0 11px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
.sec-left {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.sec-title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--faint);
  display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap;
}
.sec-title::before {
  content: ""; width: 14px; height: 1px; background: var(--line-strong);
}
.seg-pills {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.seg-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 11px;
  border-radius: 999px; border: 0;
  background: transparent;
  font-size: 12px; color: #bfc5d1;
  white-space: nowrap;
  transition: all 0.14s;
}
.seg-pill:hover { color: #ffffff; }
.seg-pill .c { font-family: var(--font-mono); font-size: 10.5px; color: #8c94a3; }
.seg-pill.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff; font-weight: 600;
}
.seg-pill.active .c { color: var(--volt); }

.sec-right {
  display: flex; align-items: center; gap: 8px;
}
.sort-select {
  height: 28px; padding: 0 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px; color: #d8dce4;
  outline: none; cursor: pointer;
}
.sort-select:hover { border-color: rgba(255, 255, 255, 0.3); color: #ffffff; }
.sort-select option { background: #141821; color: var(--ink); }

.density-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.density-btn {
  display: inline-grid; place-items: center;
  width: 28px; height: 24px; padding: 0; border: 0; border-radius: 5px;
  background: transparent;
  color: #9ea5b3;
  transition: all 0.14s;
}
.density-btn svg { width: 14px; height: 14px; }
.density-btn:hover { color: #ffffff; }
.density-btn.active { background: rgba(255, 255, 255, 0.15); color: var(--volt); }

/* 多图画廊网格 */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.gallery.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48);
}
.card.is-spotlight {
  border-color: rgba(216, 255, 62, 0.32);
}
.card.flash {
  animation: card-flash 1.4s ease;
}
@keyframes card-flash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216, 255, 62, 0); }
  25% { box-shadow: 0 0 0 3px var(--volt), 0 0 28px rgba(216, 255, 62, 0.4); }
}

/* 保留 .thumb 类名以兼容 bindHoverVideo 与测试契约 */
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0c10;
  overflow: hidden;
}
.thumb img,
.thumb video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.thumb img { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.card:hover .thumb img { transform: scale(1.03); }
.thumb video {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.thumb video.on { opacity: 1; }

.ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background-color: hsl(var(--h) 28% 12%);
  background-image:
    linear-gradient(hsl(var(--h) 45% 55% / 0.08) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--h) 45% 55% / 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  color: hsl(var(--h) 50% 78%);
  padding: 12px; text-align: center;
}
.ph-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--volt);
}
.ph-mark svg { width: 22px; height: 22px; }
.ph-title {
  font-weight: 700; font-size: 13px; max-width: 90%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rail-thumb .ph { padding: 4px; gap: 2px; }
.rail-thumb .ph-mark { width: 24px; height: 24px; border-radius: 6px; }
.rail-thumb .ph-mark svg { width: 13px; height: 13px; }
.rail-thumb .ph-title { display: none; }

.card-badge-oss {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(8, 9, 11, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono); font-size: 10px; color: var(--volt);
}
.card-badge-oss::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--volt);
}

.card-dur {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(8, 9, 11, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono); font-size: 10px; color: rgba(243, 241, 234, 0.9);
  transition: border-color 0.2s, color 0.2s;
}
.card:has(video.on) .card-dur {
  border-color: var(--volt-border);
  color: var(--volt);
}

.card-hover-cta {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--volt); color: var(--volt-ink);
  font-size: 11px; font-weight: 700;
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.18s, transform 0.18s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.card:hover .card-hover-cta,
.card:focus-visible .card-hover-cta { opacity: 1; transform: translateY(0); }

.card-body {
  padding: 10px 12px 11px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.gallery.cols-5 .card-body { padding: 9px 10px 10px; }
.card-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.card-title-wrap {
  display: flex; align-items: baseline; gap: 6px;
  min-width: 0; flex: 1;
}
.card-idx {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--faint);
  flex: none;
}
.card-top h3 {
  margin: 0; font-size: 13.5px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.gallery.cols-5 .card-top h3 { font-size: 12.5px; }
.card-stars {
  font-family: var(--font-mono); font-size: 11px; color: var(--amber);
  white-space: nowrap; flex: none;
}
.card-one {
  margin: 0;
  font-size: 12px; color: var(--muted); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery.cols-5 .card-one { font-size: 11.5px; }
.card-foot {
  margin-top: auto; padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--faint);
}
.card-specs { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-play-flag { color: var(--volt); font-weight: 600; white-space: nowrap; flex: none; }
.card-author { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }

div.empty {
  margin: 28px 0; padding: 52px 20px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
}
div.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 18px; font-weight: 700; }
div.empty p { margin: 0 0 16px; font-size: 13.5px; }

.foot-note {
  margin-top: 28px; padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  flex-wrap: wrap;
}
.foot-note b { color: var(--muted); font-weight: 600; }

/* ========== 暗房详情弹窗 ========== */
.modal {
  width: min(1140px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0f1116;
  color: var(--ink);
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.82);
}
.modal::backdrop { background: rgba(4, 5, 7, 0.78); backdrop-filter: blur(8px); }
.modal[open] { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); animation: pop 0.16s ease; }
@keyframes pop { from { opacity: 0; transform: scale(0.985); } }
.modal.no-media[open] { grid-template-columns: 1fr; width: min(760px, calc(100vw - 36px)); }
.modal.no-media .viewer { display: none; }
.modal .close { position: absolute; right: 16px; top: 16px; z-index: 5; }

.side {
  display: flex; flex-direction: column; gap: 14px;
  padding: 24px 16px 24px 24px;
  overflow-y: auto; max-height: calc(100vh - 48px); min-height: 0;
  background: rgba(255, 255, 255, 0.015);
  border-right: 1px solid var(--line);
}
.viewer {
  border-radius: 12px; overflow: hidden;
  background: #060709; border: 1px solid var(--line);
  flex: none;
}
.viewer-main { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; }
.viewer-main img, .viewer-main video { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; flex: none; }
.viewer-strip button {
  position: relative; aspect-ratio: 4 / 3; padding: 0;
  border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: #0a0c10; cursor: pointer;
  opacity: 0.72; transition: opacity 0.14s, border-color 0.14s;
}
.viewer-strip button:hover { opacity: 0.95; }
.viewer-strip button[aria-current="true"] { opacity: 1; border-color: var(--volt); }
.viewer-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewer-strip .badge.video {
  position: absolute; right: 5px; bottom: 5px;
  display: inline-flex; align-items: center; gap: 3px;
  height: 19px; padding: 0 6px; border-radius: 999px;
  background: rgba(8, 9, 11, 0.78); color: var(--ink);
  font-family: var(--font-mono); font-size: 10px;
}
.viewer-strip .badge.video svg { width: 9px; height: 9px; }

.cats {
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px 6px;
}
.cats h3 {
  margin: 0 0 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint);
}
.cat-row {
  display: grid; grid-template-columns: 18px 74px 1fr; gap: 8px;
  align-items: center; padding: 7px 0;
}
.cat-row + .cat-row { border-top: 1px solid var(--line); }
.cat-row > svg { width: 15px; height: 15px; color: var(--faint); }
.cat-row .k { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 25px; padding: 0 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); white-space: nowrap;
  transition: all 0.14s;
}
button.tag:hover { border-color: var(--volt-border); color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.tag.hl { background: var(--volt-soft); border-color: rgba(216, 255, 62, 0.34); color: var(--volt); }

.info {
  position: relative;
  padding: 26px 28px 22px 24px;
  overflow-y: auto; max-height: calc(100vh - 48px);
}
.info h2 {
  margin: 0 46px 0 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.22; font-weight: 800; color: #fff;
}
.info .one { color: var(--muted); margin: 8px 0 18px; font-size: 14.5px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.facts {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.fact { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink); }
.fact svg { width: 14px; height: 14px; color: var(--faint); }
.fact b { font-weight: 600; font-family: var(--font-mono); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact small { font-size: 11.5px; color: var(--faint); }

.sec { padding: 15px 0; border-bottom: 1px solid var(--line); }
.sec:last-of-type { border-bottom: 0; }
.sec h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.sec h4 svg { width: 15px; height: 15px; color: var(--volt); }
.sec h4 .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.sec p.body { margin: 0; color: rgba(243, 241, 234, 0.86); font-size: 13.5px; line-height: 1.72; }
.sec ul { margin: 0; padding-left: 18px; color: rgba(243, 241, 234, 0.86); font-size: 13.5px; line-height: 1.7; }
.sec li + li { margin-top: 3px; }
.sec li::marker { color: var(--volt); }
pre.prompt {
  margin: 0; padding: 12px 14px; max-height: 240px; overflow: auto;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 10px;
  font: 12px/1.6 var(--font-mono); white-space: pre-wrap; color: var(--ink);
}
details.src { margin-top: 12px; color: var(--faint); font-size: 12.5px; }
details.src summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.src p {
  white-space: pre-wrap; margin-top: 8px; padding: 10px 12px;
  border-radius: 8px; background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line); color: var(--muted); line-height: 1.65;
}
.admin-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.admin-btns { display: inline-flex; align-items: center; gap: 10px; }
.admin-btns i { width: 1px; height: 14px; background: var(--line-strong); }
.admin-row .date { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: 11.5px; }

/* ========== 暗房收集 / 编辑抽屉 ========== */
.scrim { position: fixed; inset: 0; background: rgba(4, 5, 7, 0.72); backdrop-filter: blur(4px); z-index: 70; }
.drawer {
  position: fixed; z-index: 80; top: 0; right: 0; bottom: 0;
  width: min(740px, 100vw); display: flex; flex-direction: column;
  background: #0f1116;
  border-left: 1px solid var(--line-strong);
  border-radius: 18px 0 0 18px;
  transform: translateX(104%); visibility: hidden;
  transition: transform 0.24s ease, visibility 0s linear 0.24s;
}
.drawer.open {
  transform: none; visibility: visible;
  transition: transform 0.24s ease;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.72);
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px 28px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #fff; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px 26px 28px; }

.url-row { display: flex; gap: 10px; }
.url-row .input-icon { flex: 1; }
.url-row .btn { height: 42px; border-radius: 10px; padding: 0 20px; font-size: 13.5px; }

.input-icon { position: relative; display: flex; align-items: center; min-width: 0; }
.input-icon > svg { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.input-icon input { padding-left: 38px !important; }
.input-icon .open {
  position: absolute; right: 6px;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  color: var(--muted);
}
.input-icon .open:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.input-icon.link-field input { padding-right: 38px !important; }

.url-row input,
.repo-fix input,
.form input[type="text"],
.form input[type="url"],
.form textarea {
  width: 100%; padding: 8px 12px; border-radius: 10px;
  background: var(--bg-sunk); border: 1px solid var(--line-strong);
  color: var(--ink); outline: none; font-size: 13.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.url-row input, .repo-fix input { height: 42px; }
.url-row input:focus,
.repo-fix input:focus,
.form input:focus,
.form textarea:focus {
  border-color: var(--volt-border);
  box-shadow: 0 0 0 3px rgba(216, 255, 62, 0.14);
}
.form input::placeholder,
.form textarea::placeholder,
.url-row input::placeholder,
.repo-fix input::placeholder { color: var(--faint); }
.form input:invalid:not(:placeholder-shown):not(:focus) { border-color: var(--bad); }
.form textarea { resize: vertical; min-height: 64px; line-height: 1.6; display: block; }
.form textarea.mono { font: 12px/1.6 var(--font-mono); }
.helper { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }

.steps {
  list-style: none; margin: 14px 0 0; padding: 4px 16px; display: grid;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.steps li {
  position: relative;
  display: grid; grid-template-columns: 22px 126px minmax(0, 1fr) auto;
  gap: 12px; align-items: center; min-height: 44px; padding: 7px 0; font-size: 13px;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li + li::before {
  content: ""; position: absolute; left: 10px; top: -12px; height: 22px; width: 2px;
  background: var(--line-strong);
}
.steps li.ok + li::before { background: var(--ok); }
.steps b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.steps small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .st {
  position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; color: #08090b;
}
.steps .st svg { width: 12px; height: 12px; stroke-width: 3; }
.steps .run .st {
  border: 2px solid var(--line-strong); border-top-color: var(--volt);
  background: #0f1116; animation: spin 0.8s linear infinite;
}
.steps .ok .st { background: var(--ok); }
.steps .warn .st { background: var(--warn); }
.steps .fail .st { background: var(--bad); color: #fff; }
.pill-st { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.ok .pill-st { background: var(--ok-soft); color: var(--ok); }
.run .pill-st { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.warn .pill-st { background: var(--warn-soft); color: var(--warn); }
.fail .pill-st { background: var(--bad-soft); color: var(--bad); }
@keyframes spin { to { transform: rotate(360deg); } }

.warns {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px;
  background: var(--warn-soft); border: 1px solid rgba(255, 184, 77, 0.32);
  color: #ffd99c; font-size: 13px;
}
.warns.bad { background: var(--bad-soft); border-color: rgba(255, 100, 92, 0.35); color: #ffb4b0; }
.warns-head { display: flex; gap: 9px; align-items: flex-start; }
.warns-head svg { margin-top: 2px; }
.warns ul { margin: 0; padding-left: 0; list-style: none; }
.warns li + li { margin-top: 2px; }
.warns .link-btn { color: var(--volt); margin-left: 24px; }
.repo-fix { display: flex; gap: 8px; margin-top: 10px; }
.repo-fix .input-icon { flex: 1; }
.repo-fix .btn { height: 42px; border-radius: 10px; }

.form { display: grid; gap: 12px; margin-top: 18px; }
.form .field { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: start; }
.form .lbl {
  display: flex; align-items: center; gap: 4px; min-height: 38px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.form .lbl .req { color: var(--bad); }
.form .lbl .hint { display: inline-grid; color: var(--faint); cursor: help; margin-left: 2px; }
.form .lbl .hint svg { width: 14px; height: 14px; }
.form input[type="text"], .form input[type="url"] { height: 38px; }

.media-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.media-pick .mp {
  position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--line); background: var(--bg-sunk); cursor: pointer;
}
.media-pick .mp img, .media-pick .mp video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-pick .mp.off img, .media-pick .mp.off video { opacity: 0.32; filter: grayscale(0.7); }
.media-pick .mp.cover { border-color: var(--volt); }
.media-pick .mp .lab {
  position: absolute; left: 5px; top: 5px;
  font-size: 10.5px; font-weight: 700; line-height: 20px; padding: 0 7px; border-radius: 5px;
  background: var(--volt); color: var(--volt-ink);
}
.media-pick .mp .check {
  position: absolute; right: 6px; top: 6px;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--volt); color: var(--volt-ink);
}
.media-pick .mp .check svg { width: 14px; height: 14px; stroke-width: 3; }
.media-pick .mp.off .check { background: rgba(8, 9, 11, 0.72); border: 1.5px solid rgba(255, 255, 255, 0.5); }
.media-pick .mp.off .check svg { opacity: 0; }
.media-pick .mp .vplay {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(8, 9, 11, 0.76); color: #fff;
}
.media-pick .mp .vplay svg { width: 13px; height: 13px; margin-left: 2px; }
.media-pick .mp .tools {
  position: absolute; right: 5px; bottom: 5px; display: flex; gap: 4px;
  opacity: 0; transition: opacity 0.12s;
}
.media-pick .mp:hover .tools, .media-pick .mp:focus-within .tools { opacity: 1; }
.media-pick .mp .tools button {
  border: 1px solid var(--line-strong); border-radius: 6px;
  font-size: 11px; font-weight: 600; padding: 2px 7px;
  background: rgba(8, 9, 11, 0.88); color: var(--ink);
}

.tag-picker {
  display: grid; padding: 6px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--bg-sunk);
}
.tag-picker .frow { display: grid; grid-template-columns: 72px 1fr; gap: 8px; padding: 6px 0; align-items: start; }
.tag-picker .frow + .frow { border-top: 1px solid var(--line); }
.tag-picker .frow > .k { font-size: 12px; line-height: 28px; color: #b4bac6; white-space: nowrap; }
.tag-picker .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-picker .chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 9px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px; color: #dce0e8;
  transition: all 0.12s;
}
.tag-picker .chip:hover { color: var(--ink); border-color: var(--line-strong); }
.tag-picker .chip .box {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid var(--line-strong); background: transparent;
}
.tag-picker .chip .box svg { width: 10px; height: 10px; opacity: 0; stroke-width: 3; }
.tag-picker .chip[aria-pressed="true"] {
  background: var(--volt-soft); border-color: var(--volt-border);
  color: var(--volt); font-weight: 600;
}
.tag-picker .chip[aria-pressed="true"] .box {
  background: var(--volt); border-color: var(--volt); color: var(--volt-ink);
}
.tag-picker .chip[aria-pressed="true"] .box svg { opacity: 1; }

.save-bar {
  position: sticky; bottom: 0; z-index: 2;
  margin: 12px 0 0; padding: 12px 14px 12px 16px;
  display: flex; gap: 10px; justify-content: flex-end; align-items: center;
  background: #14171f; border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.55);
}
.save-bar .note {
  display: inline-flex; align-items: center; gap: 7px;
  margin-right: auto; font-size: 12.5px; color: var(--muted); min-width: 0;
}
.save-bar .note svg { color: var(--volt); }
.save-bar .btn { height: 38px; border-radius: 10px; padding: 0 18px; }

.tools-box {
  margin-top: 20px; padding: 14px 16px;
  border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--muted); font-size: 12.5px;
}
.tools-box a.bm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  background: var(--volt); color: var(--volt-ink);
  font-weight: 700; cursor: grab; margin: 8px 0 0;
}
.tools-box a.bm svg { width: 14px; height: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 95;
  padding: 10px 18px; border-radius: 999px;
  background: var(--volt); color: var(--volt-ink);
  font-weight: 700; font-size: 13px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* ========== 响应式适配 ========== */
@media (max-width: 1180px) {
  .spotlight {
    grid-template-columns: 1fr;
    height: auto;
  }
  .stage-main { height: 360px; }
  .stage-rail { height: auto; }
  .rail-list {
    flex-direction: row;
    overflow-x: auto; scrollbar-width: none;
    gap: 8px;
  }
  .rail-list::-webkit-scrollbar { display: none; }
  .rail-item { flex: 0 0 230px; max-height: none; }
  .gallery, .gallery.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-drawer-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 16px; }
  .modal[open] { display: flex; flex-direction: column; overflow-y: auto; }
  .side { display: contents; border-right: 0; }
  .info { max-height: none; overflow: visible; padding: 16px 16px 8px; order: 3; flex: none; }
  .viewer { order: 1; margin: 12px 12px 0; }
  .viewer-strip { order: 2; margin: 10px 12px 0; }
  .cats { order: 4; margin: 0 12px 16px; flex: none; }
  .modal .close { position: sticky; top: 10px; align-self: flex-end; order: 0; margin: 10px 10px -44px 0; flex: none; }
  .drawer { border-radius: 0; border-left: 0; }
  .drawer-head { padding: 16px 16px 10px 18px; }
  .drawer-body { padding: 12px 16px 20px 18px; }
  .form .field { grid-template-columns: 1fr; gap: 4px; }
  .form .lbl { min-height: 0; }
  .steps li { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 0; }
  .steps li small { grid-column: 2 / 4; grid-row: 2; }
  .media-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tag-picker .frow { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar {
    height: auto; min-height: 46px;
    flex-wrap: wrap; padding: 7px 12px 0; gap: 6px;
  }
  .brand { margin-right: 0; gap: 6px; }
  .brand-count, .search-shell .kbd, .btn-collect .sc, .density-seg, .sec-title, #stageAutoText { display: none; }
  .brand-title { font-family: var(--font-body); font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; }
  .nav-tabs {
    order: 3; flex: 0 0 100%; height: 34px;
    margin: 5px -12px 0; padding: 0 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .top-actions { flex: 1; min-width: 0; justify-content: flex-end; gap: 6px; }
  .search-shell { flex: 1; width: auto; min-width: 0; max-width: 150px; height: 29px; padding: 0 8px; }
  .search-shell:focus-within { width: auto; max-width: 170px; }
  .filter-trigger { height: 29px; padding: 0 8px; }
  .filter-trigger > span:not(.filter-badge) { display: none; }
  .btn-collect { height: 29px; padding: 0 10px; font-size: 11.5px; }
  .auth-logout { font-size: 11px; padding: 0 2px; }

  main { padding: 10px 12px 40px; }
  .stage-main { height: 238px; border-radius: 12px; }
  .stage-top { left: 10px; right: 10px; top: 10px; gap: 6px; }
  .stage-pill { height: 23px; padding: 0 8px; font-size: 9.5px; gap: 5px; letter-spacing: 0.04em; }
  .stage-ctrl { height: 23px; padding: 0 7px; font-size: 9.5px; }
  .stage-bottom {
    left: 12px; right: 12px; bottom: 12px;
    flex-direction: column; align-items: flex-start; gap: 9px;
  }
  .stage-copy { width: 100%; max-width: 100%; }
  .stage-kicker { font-size: 10px; margin-bottom: 3px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
  .stage-copy h1 { font-size: 20px; width: 100%; }
  .stage-one { font-size: 11.5px; margin-top: 4px; }
  .cta-primary, .cta-ghost { height: 30px; padding: 0 12px; font-size: 11.5px; }

  .stage-rail { padding: 8px; border-radius: 12px; }
  .rail-item { flex: 0 0 205px; padding: 5px 7px; }
  .rail-thumb { width: 72px; height: 42px; }

  .section-bar { margin: 12px 0 10px; flex-wrap: nowrap; gap: 8px; }
  .sec-left { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .sec-left::-webkit-scrollbar { display: none; }
  .seg-pill { height: 23px; padding: 0 8px; font-size: 11px; }
  .sort-select { height: 27px; padding: 0 6px; font-size: 11px; flex: none; }

  .gallery, .gallery.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 8px 9px 9px; }
  .card-top h3 { font-size: 12.5px; }
  .card-one { display: none; }
  .card-idx { display: none; }
  .filter-drawer-inner { grid-template-columns: 1fr 1fr; }
  .viewer-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .repo-fix { flex-direction: column; }
  .save-bar { flex-wrap: wrap; }
  .save-bar .note { flex-basis: 100%; }
  .save-bar .btn { flex: 1; }
}

.gallery-faq {
  margin: 20px 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
}
.gallery-faq summary { cursor: pointer; font-weight: 600; }
.gallery-faq h2 { margin: 14px 0 4px; font-size: inherit; }
.gallery-faq p { margin: 0; color: var(--muted); }

.content-fields {
  min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--line);
  border-radius: 10px; display: grid; gap: 10px;
}
.content-fields legend { padding: 0 5px; font-size: 13px; font-weight: 600; }

@media (max-width: 420px) {
  .topbar { position: relative; }
  .topbar .language-switch { position: absolute; right: 12px; top: 7px; }
  .topbar .brand { min-height: 32px; }
  .top-actions { flex-basis: 100%; }
  .search-shell, .search-shell:focus-within { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
