/* ============================================================
   影像库 · 明亮极简主题
   中文：思源黑体 Noto Sans SC / 英文与数字：JetBrains Mono
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f4f4f5;
  --line: #ececef;
  --line-strong: #d9d9df;
  --text: #09090b;
  --text-2: #55555f;
  --text-3: #8f8f99;
  --danger: #d92d20;
  --ok: #12805c;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05);
  --shadow-md: 0 8px 28px rgba(9, 9, 11, 0.09);
  --shadow-lg: 0 32px 80px rgba(9, 9, 11, 0.16);
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
  --font: "JetBrains Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

#app { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.page, .admin-page { flex: 1; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: #0a0a0b; color: #fff; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 布局 ---------- */
.wrap {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}
.header-spacer { flex: 1; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--text);
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
}
.brand .mark svg { width: 12px; height: 12px; fill: currentColor; margin-left: 1px; }
.brand .sub {
  font-weight: 400;
  color: var(--text-3);
  font-size: 12px;
  margin-left: 2px;
  letter-spacing: 0;
}

/* ---------- 控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, transform 0.12s, opacity 0.16s;
}
.btn:hover { background: var(--bg-subtle); border-color: #c2c2ca; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn svg { width: 15px; height: 15px; }
.btn.primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.btn.primary:hover { background: #26262a; border-color: #26262a; }
.btn.danger { color: var(--danger); border-color: #f1c9c5; }
.btn.danger:hover { background: #fef4f3; border-color: #e9a9a3; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--bg-muted); color: var(--text); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg-muted); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.06); }
select.input {
  appearance: none;
  padding-right: 32px;
  background-image: 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='%238f8f99' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.search {
  position: relative;
  width: min(300px, 40vw);
}
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bg-muted);
  font-size: 13px;
  outline: none;
  transition: background 0.16s, border-color 0.16s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { background: #fff; border-color: var(--line-strong); }

/* ---------- 首页 ---------- */
.page { padding: 44px 0 96px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.page-head .sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 26px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.16s;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.chip .num { font-size: 11px; opacity: 0.55; }
.chip.active .num { opacity: 0.7; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(276px, 1fr));
  gap: 34px 24px;
}

.card {
  cursor: pointer;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.25s;
}
.card:hover .thumb { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .thumb img { transform: scale(1.035); }
.card .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d3d3da;
}
.card .play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(9, 9, 11, 0.16);
  opacity: 0;
  transition: opacity 0.2s;
}
.card:hover .play-badge { opacity: 1; }
.card .play-badge span {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}
.card .play-badge svg { fill: var(--text); margin-left: 2px; }
.card .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(9, 9, 11, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.card .body {
  padding: 12px 2px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card .title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.012em;
  /* 预留两行高度，保证一行的标题也不会让下方信息错位 */
  min-height: 2.9em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .note {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-3);
  /* 固定两行高度：没有备注的卡片也占同样空间，整行卡片完全对齐 */
  min-height: 3.1em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta {
  margin-top: auto;
  padding-top: 10px;
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.card .meta .tag {
  padding: 1px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1.35;
}
/* 观看进度：贴在封面底边，不占文字排版高度 */
.card .progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.55);
}
.card .progress i { display: block; height: 100%; background: var(--text); }

/* 空状态 / 骨架 */
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 96px 20px;
  text-align: center;
}
.empty .ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--bg-muted);
  color: var(--text-3);
  margin-bottom: 4px;
}
.empty h3 { margin: 0; font-size: 15px; font-weight: 600; }
.empty p { margin: 0; font-size: 13px; color: var(--text-3); }
.empty p a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.skeleton {
  border-radius: 10px;
  background: linear-gradient(100deg, #f4f4f5 30%, #fbfbfc 50%, #f4f4f5 70%);
  background-size: 220% 100%;
  animation: shimmer 1.4s infinite linear;
  aspect-ratio: 16 / 9;
}
@keyframes shimmer { from { background-position: 140% 0; } to { background-position: -60% 0; } }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  font-size: 11.5px;
  color: var(--text-3);
}
.site-footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 播放器 ---------- */
.player-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(0px, 2vw, 26px);
  background: rgba(248, 248, 249, 0.86);
  backdrop-filter: blur(16px) saturate(160%);
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.player-shell {
  width: min(1120px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.24s var(--ease);
}
@keyframes popIn { from { transform: scale(0.98) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.player-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 20px;
  border-bottom: 1px solid var(--line);
}
.player-head .t {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-head .grow { flex: 1; }

.player-stage {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 250px);
  width: 100%;
  outline: none;
}
.player-stage video { width: 100%; height: 100%; background: #000; object-fit: contain; }

.stage-big-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
}
.stage-big-play span {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  transition: transform 0.18s var(--ease);
}
.stage-big-play:hover span { transform: scale(1.06); }
.stage-big-play svg { margin-left: 3px; }

.stage-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.stage-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.78);
  color: #f4d9d6;
  font-size: 13px;
  line-height: 1.7;
}
.stage-error a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.resume-toast {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  animation: fadeIn 0.2s;
}

.player-controls { padding: 10px 16px 4px; background: #fff; }
.seek {
  position: relative;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.seek-track {
  position: relative;
  height: 4px;
  width: 100%;
  border-radius: 3px;
  background: #e9e9ee;
  transition: height 0.14s;
}
.seek:hover .seek-track, .seek.dragging .seek-track { height: 6px; }
.seek-buffer { position: absolute; inset: 0 auto 0 0; width: 0; background: #d5d5dc; border-radius: 3px; }
.seek-played { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--text); border-radius: 3px; }
.seek-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--text);
  transform: translateY(-50%) scale(0);
  transition: transform 0.14s;
}
.seek:hover .seek-thumb, .seek.dragging .seek-thumb { transform: translateY(-50%) scale(1); }

.ctrl-row { display: flex; align-items: center; gap: 2px; padding: 2px 0 6px; }
.ctrl-row .time {
  margin: 0 8px;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ctrl-row .grow { flex: 1; }
.ctrl-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text);
  transition: background 0.15s;
}
.ctrl-btn:hover { background: var(--bg-muted); }
.ctrl-btn svg { width: 17px; height: 17px; }
.ctrl-btn.text {
  width: auto;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  height: 26px;
  border-radius: 6px;
  margin: 0 4px;
}
.ctrl-btn.on { color: var(--text); background: var(--bg-muted); }

.player-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 12px 20px 18px;
  font-size: 11.5px;
  color: var(--text-3);
  border-top: 1px solid var(--line);
}
.player-meta .note {
  width: 100%;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.player-shell:fullscreen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  border: 0;
}
.player-shell:fullscreen .player-stage { aspect-ratio: auto; flex: 1; max-height: none; }
.player-shell:fullscreen .player-meta { display: none; }

/* ---------- 后台 ---------- */
.admin-page { padding: 28px 0 100px; display: grid; gap: 18px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel-head .count { font-size: 11.5px; color: var(--text-3); font-weight: 400; }
.panel-head .grow { flex: 1; }

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 34px 20px;
  text-align: center;
  background: var(--bg-subtle);
  transition: border-color 0.18s, background 0.18s;
}
.dropzone:hover { border-color: #bcbcc4; }
.dropzone.drag { border-color: var(--text); background: #f6f6f7; }
.dropzone .dz-ico {
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}
.dropzone .dz-ico svg { width: 18px; height: 18px; }
.dropzone p { margin: 0 0 4px; font-size: 13.5px; }
.dropzone p strong { font-weight: 600; }
.dropzone small { color: var(--text-3); font-size: 11.5px; }

.queue { display: grid; gap: 10px; margin-top: 16px; }
.q-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1.1fr) minmax(0, 1fr) 148px 128px 32px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.18s;
}
.q-item:hover { border-color: var(--line-strong); }
.q-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: var(--bg-muted);
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 10.5px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.q-item .field { display: grid; gap: 5px; min-width: 0; }
.q-item .field label {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.q-item .input { height: 32px; font-size: 12.5px; padding: 0 10px; border-color: var(--line); }
.q-status { display: grid; gap: 7px; font-size: 11px; color: var(--text-3); }
.q-bar { height: 4px; border-radius: 3px; background: var(--bg-muted); overflow: hidden; }
.q-bar i { display: block; height: 100%; width: 0; background: var(--text); transition: width 0.25s; }
.q-item.done .q-bar i { background: var(--ok); }
.q-item.done .q-status { color: var(--ok); }
.q-item.error { border-color: #f1c9c5; }
.q-item.error .q-status { color: var(--danger); }

.collection-list { display: flex; flex-wrap: wrap; gap: 8px; }
.collection-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px 0 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-subtle);
  font-size: 12.5px;
}
.collection-pill .n { color: var(--text-3); font-size: 11px; }
.collection-pill button {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  transition: background 0.15s, color 0.15s;
}
.collection-pill button:hover { background: #fff; color: var(--text); }

.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tools .input { width: 200px; height: 34px; font-size: 12.5px; }

.vlist-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 2px 12px;
}
.vlist-head .grow { flex: 1; }
.vlist-head .sel-count { font-size: 12px; color: var(--text-3); }
.batch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-actions select.input { width: 156px; height: 32px; font-size: 12.5px; }

.vlist {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.vrow {
  display: grid;
  grid-template-columns: 20px 84px minmax(0, 1fr) 120px 104px 122px 72px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.vrow:last-child { border-bottom: 0; }
.vrow:hover { background: var(--bg-subtle); }
.vrow.checked { background: #f7f7f8; }
.vrow .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.vrow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.vrow .thumb .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-3);
  font-size: 10px;
}
.vrow .main { min-width: 0; }
.vrow .main .t {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vrow .main .n {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vrow .col { font-size: 11.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vrow .size { font-size: 11px; color: var(--text-3); }
.vrow .date { font-size: 11px; color: var(--text-3); }
.vrow .acts { display: flex; gap: 2px; justify-content: flex-end; }

.checkbox {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c9c9d1;
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.14s, border-color 0.14s;
  flex: none;
}
.checkbox:hover { border-color: var(--text-2); }
.checkbox:checked { background: var(--text); border-color: var(--text); }
.checkbox:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -1px);
}
.checkbox.indet::after { content: ""; width: 8px; height: 2px; background: #fff; }

/* 登录 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  width: min(392px, 100%);
  padding: 32px 28px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.login-card .mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--text);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 18px;
}
.login-card .mark svg { width: 16px; height: 16px; fill: currentColor; margin-left: 1px; }
.login-card h1 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.02em; }
.login-card p { margin: 0 0 22px; color: var(--text-3); font-size: 12.5px; }
.login-card .err { color: var(--danger); font-size: 12.5px; margin-top: 10px; min-height: 18px; }

/* 弹窗 */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 9, 11, 0.28);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.15s;
}
.modal {
  width: min(480px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: grid;
  gap: 14px;
}
.modal h3 { margin: 0; font-size: 15.5px; letter-spacing: -0.01em; }
.modal .field { display: grid; gap: 6px; }
.modal .field label { font-size: 11.5px; color: var(--text-3); letter-spacing: 0.03em; }
.modal textarea.input { min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.65; height: auto; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 2px; }

/* 提示 */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: grid;
  gap: 8px;
  justify-items: end;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
  box-shadow: var(--shadow-md);
  animation: slideIn 0.2s var(--ease);
  max-width: 380px;
}
.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  flex: none;
}
.toast.ok { border-color: #c9e6d9; }
.toast.ok::before { background: var(--ok); }
.toast.err { border-color: #f1c9c5; color: var(--danger); }
.toast.err::before { background: var(--danger); }
@keyframes slideIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.muted { color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .q-item { grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr) 130px 108px 30px; gap: 10px; }
  .vrow { grid-template-columns: 20px 74px minmax(0, 1fr) 104px 100px 68px; }
  .vrow .date { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 58px; gap: 10px; }
  .search { width: 100%; order: 5; margin-bottom: 10px; }
  .site-header { padding-bottom: 0; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; }
  .header-inner .search { flex-basis: 100%; }
  .brand .sub { display: none; }
  .page { padding: 26px 0 70px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 22px 12px; }
  .card .body { padding-top: 9px; }
  .card .title { font-size: 13px; }
  .card .note { display: none; }
  .card .meta { font-size: 10px; margin-top: 7px; gap: 6px; }
  .player-layer { padding: 0; }
  .player-shell { border-radius: 0; height: 100%; max-height: none; border: 0; }
  .player-stage { aspect-ratio: auto; flex: 1; max-height: none; }
  .panel { padding: 16px; }
  .q-item { grid-template-columns: 62px minmax(0, 1fr) 28px; row-gap: 6px; }
  .q-item .q-thumb { grid-area: 1 / 1 / 3 / 2; }
  .q-item .field-title { grid-area: 1 / 2 / 2 / 3; }
  .q-item .q-status { grid-area: 2 / 2 / 3 / 3; }
  .q-item [data-remove] { grid-area: 1 / 3 / 2 / 4; }
  .q-item .field-note, .q-item .field-collection { display: none; }
  .vrow { grid-template-columns: 18px 62px minmax(0, 1fr) 66px; gap: 10px; padding: 9px 11px; }
  .vrow .col, .vrow .size { display: none; }
  .tools { width: 100%; }
  .tools .input { flex: 1; width: auto; min-width: 120px; }
  .tools #search { flex-basis: 100%; }
}
