/* 游戏推广视频工作室 · 暗色电影感薄玻璃工作台
 * 设计原则：≤2 种字体（无衬线正文 + 等宽数字）、无黑粗描边、封面浮标统一单档毛玻璃、
 * 流光透明主按钮无厚重底唇、手机单手点击区 ≥44px、全尺寸零横向溢出。
 */

:root {
  --bg-base: #0b0e14;
  --bg-surface: #121722;
  --bg-card: #171d2a;
  --bg-card-hover: #1d2536;
  --bg-inset: rgba(8, 11, 17, 0.72);

  --text-primary: #f3f5f9;
  --text-secondary: #9ca7ba;
  --text-muted: #6f7b90;

  --line-subtle: rgba(255, 255, 255, 0.08);
  --line-normal: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);

  /* 统一浮层毛玻璃档位（所有叠在封面与视频上的浮标共用） */
  --glass-bg: rgba(12, 16, 24, 0.58);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(12px) saturate(135%);

  /* 克制的铂蓝强调色 + 语义色 */
  --accent: #7fb2ff;
  --accent-soft: rgba(127, 178, 255, 0.18);
  --accent-border: rgba(154, 198, 255, 0.42);

  --st-pending: #9bb5dc;
  --st-pending-bg: rgba(155, 181, 220, 0.16);
  --st-changes: #f09572;
  --st-changes-bg: rgba(240, 149, 114, 0.18);
  --st-approved: #59d6a3;
  --st-approved-bg: rgba(89, 214, 163, 0.18);
  --st-published: #b29cff;
  --st-published-bg: rgba(178, 156, 255, 0.18);
  --st-danger: #f27474;
  --st-danger-bg: rgba(242, 116, 116, 0.16);

  --font-sans: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.34);
  --shadow-glow: 0 6px 20px rgba(96, 152, 248, 0.22);

  --tap-min: 44px;
  --header-h: 60px;
  --max-width: 1380px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse 75% 42% at 50% -12%, rgba(114, 166, 255, 0.11), transparent 70%),
    radial-gradient(ellipse 50% 35% at 95% 10%, rgba(164, 134, 255, 0.06), transparent 72%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, video {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
}

/* ───────── 首屏加载占位 ───────── */

.boot-splash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.boot-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(138, 184, 255, 0.18), rgba(88, 138, 232, 0.08));
  border: 1px solid var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), var(--shadow-glow);
}

.boot-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.boot-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ───────── 通用按钮与流光玻璃控件 ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap-min);
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-normal);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line-strong);
}

.btn:active:not(:disabled) {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 浮光透明玻璃主按钮：顶部 1px 高光 + 轻盈边框，无厚重下唇 */
.btn-primary {
  background: linear-gradient(180deg, rgba(145, 192, 255, 0.30) 0%, rgba(92, 146, 236, 0.18) 100%);
  border: 1px solid var(--accent-border);
  color: #f6f9ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), var(--shadow-glow);
  backdrop-filter: blur(10px);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(160, 204, 255, 0.38) 0%, rgba(102, 156, 245, 0.25) 100%);
  border-color: rgba(182, 216, 255, 0.58);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--line-subtle);
}

.btn-icon {
  width: var(--tap-min);
  padding: 0;
}

.btn-sm {
  min-height: 38px;
  padding: 0 13px;
  font-size: 13px;
}

.btn-approve.is-active,
.btn-approve:hover:not(:disabled) {
  background: var(--st-approved-bg);
  border-color: rgba(89, 214, 163, 0.52);
  color: #a8f3d4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-changes.is-active,
.btn-changes:hover:not(:disabled) {
  background: var(--st-changes-bg);
  border-color: rgba(240, 149, 114, 0.52);
  color: #ffd0be;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-published.is-active,
.btn-published:hover:not(:disabled) {
  background: var(--st-published-bg);
  border-color: rgba(178, 156, 255, 0.52);
  color: #dfd4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  min-height: 36px;
  min-width: 36px;
  padding: 0 8px;
}

.btn-danger-ghost:hover:not(:disabled) {
  color: var(--st-danger);
  background: var(--st-danger-bg);
  border-color: rgba(242, 116, 116, 0.3);
}

/* 胶囊滑块分段控件 */
.seg-control {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-subtle);
  gap: 2px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

/* 输入框与下拉框 */
.input, .select {
  min-height: var(--tap-min);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-normal);
  background: var(--bg-inset);
  color: var(--text-primary);
  outline: none;
  min-width: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus, .select:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(127, 178, 255, 0.14);
}

.select option {
  background: #141925;
  color: var(--text-primary);
}

/* ───────── 顶部精简导航栏 ───────── */

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 20, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-subtle);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap-min);
  padding: 0 4px 0 0;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  text-align: left;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: linear-gradient(180deg, rgba(138, 184, 255, 0.22), rgba(88, 138, 232, 0.1));
  border: 1px solid var(--accent-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.brand-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-nav {
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.auth-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--st-approved);
}

.main-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 16px calc(32px + env(safe-area-inset-bottom));
  flex: 1;
}

/* ───────── 统一状态徽标与封面毛玻璃浮标 ───────── */

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  color: #f5f7fb;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.st-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.st-pending .st-dot { background: var(--st-pending); }
.st-changes .st-dot { background: var(--st-changes); }
.st-approved .st-dot { background: var(--st-approved); }
.st-published .st-dot { background: var(--st-published); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-badge.st-pending { background: var(--st-pending-bg); color: #cde0fb; border-color: rgba(155, 181, 220, 0.3); }
.status-badge.st-changes { background: var(--st-changes-bg); color: #ffd0be; border-color: rgba(240, 149, 114, 0.35); }
.status-badge.st-approved { background: var(--st-approved-bg); color: #a7f3d4; border-color: rgba(89, 214, 163, 0.35); }
.status-badge.st-published { background: var(--st-published-bg); color: #dfd4ff; border-color: rgba(178, 156, 255, 0.35); }

/* ───────── 片库首页 ───────── */

.library-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.filter-pill.is-active {
  background: rgba(127, 178, 255, 0.16);
  border-color: var(--accent-border);
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.pill-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.filter-pill.is-active .pill-count {
  color: #cfe2ff;
}

.search-box {
  position: relative;
  width: 280px;
  max-width: 100%;
  flex-shrink: 0;
}

.search-box .search-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding-left: 38px;
  padding-right: 36px;
  border-radius: var(--radius-pill);
}

.search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

.search-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 13.5px;
  border: 1px solid var(--line-normal);
  background: var(--bg-surface);
}

.banner-error {
  background: var(--st-danger-bg);
  border-color: rgba(242, 116, 116, 0.35);
  color: #ffd3d3;
}

.banner-warn {
  background: rgba(240, 149, 114, 0.12);
  border-color: rgba(240, 149, 114, 0.32);
  color: #ffd9c7;
}

.project-group {
  margin-bottom: 28px;
}

.project-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.project-group-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.project-group-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.episode-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  text-align: left;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.episode-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.episode-poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: linear-gradient(155deg, #161d2c 0%, #0e131e 100%);
  overflow: hidden;
}

.episode-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.episode-card:hover .episode-poster-img {
  transform: scale(1.025);
}

.poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: var(--text-muted);
  background:
    radial-gradient(circle at 50% 35%, rgba(127, 178, 255, 0.12), transparent 65%),
    linear-gradient(160deg, #151c2a 0%, #0d111a 100%);
}

.poster-placeholder-dim {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.poster-scrim-top,
.poster-scrim-bottom {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.poster-scrim-top {
  top: 0;
  height: 62px;
  background: linear-gradient(180deg, rgba(6, 9, 14, 0.56) 0%, transparent 100%);
}

.poster-scrim-bottom {
  bottom: 0;
  height: 68px;
  background: linear-gradient(0deg, rgba(6, 9, 14, 0.68) 0%, transparent 100%);
}

.poster-overlay-top,
.poster-overlay-bottom {
  position: absolute;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.poster-overlay-top {
  top: 10px;
}

.poster-overlay-bottom {
  bottom: 10px;
}

.episode-card-body {
  padding: 12px 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.episode-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}

.episode-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.meta-sep {
  color: var(--text-muted);
}

.empty-card {
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-card h3 {
  margin: 4px 0 0;
  font-size: 16px;
  color: var(--text-primary);
}

.empty-card p {
  margin: 0;
  max-width: 440px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.skeleton-card {
  aspect-ratio: 9 / 19;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, #141a26 25%, #1d2638 45%, #141a26 65%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border: 1px solid var(--line-subtle);
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* ───────── 单期审片详情页 ───────── */

.detail-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-title-wrap {
  flex: 1;
  min-width: 0;
}

.detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.detail-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.version-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.version-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.version-chip:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.version-chip.is-active {
  background: rgba(127, 178, 255, 0.18);
  border-color: var(--accent-border);
  color: #f3f7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.chip-star {
  color: var(--st-approved);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.detail-layout.is-ab {
  grid-template-columns: minmax(460px, 640px) minmax(0, 1fr);
}

.stage-col {
  position: sticky;
  top: calc(var(--header-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.inspector-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

/* 单片 9:16 舞台 */
.player-stage {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: #07090d;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-status-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: rgba(8, 10, 16, 0.72);
  backdrop-filter: blur(8px);
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.player-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* A/B 同步对比面板 */
.ab-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: #0a0d14;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ab-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ab-selectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ab-select-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
  min-width: 0;
}

.ab-select-label .select {
  flex: 1;
  min-height: 40px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.ab-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ab-controls .btn {
  flex: 1;
  min-width: 96px;
}

.ab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.ab-deck {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ab-deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.ab-deck-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ab-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ab-deck-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 审片操作与按秒意见 */
.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-time-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(127, 178, 255, 0.14);
  border: 1px solid var(--accent-border);
  color: #dceaff;
  font-size: 13px;
}

.note-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.note-input-row .input {
  flex: 1;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.note-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-border);
  background: rgba(127, 178, 255, 0.14);
  color: #d7e8ff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.note-jump-btn:hover {
  background: rgba(127, 178, 255, 0.26);
}

.note-jump-btn.is-whole {
  border-color: var(--line-normal);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.note-body {
  flex: 1;
  min-width: 0;
}

.note-text {
  font-size: 13.5px;
  color: var(--text-primary);
  word-break: break-word;
}

.note-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 多平台发布辅助 */
.ai-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: rgba(240, 149, 114, 0.12);
  border: 1px solid rgba(240, 149, 114, 0.30);
  color: #ffd8c7;
  font-size: 13px;
}

.platform-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.platform-card {
  padding: 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-name {
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.platform-copy-box {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.platform-copy-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.platform-copy-text {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  font-size: 12px;
  color: #a9c8fa;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(127, 178, 255, 0.1);
}

.platform-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 已发打卡开关 */
.publish-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-normal);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  color: var(--text-secondary);
}

.publish-toggle.is-on {
  background: var(--st-published-bg);
  border-color: rgba(178, 156, 255, 0.48);
  color: #e2d7ff;
}

.toggle-track {
  width: 30px;
  height: 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  transition: background-color 150ms ease;
  flex-shrink: 0;
}

.publish-toggle.is-on .toggle-track {
  background: rgba(178, 156, 255, 0.65);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms ease;
}

.publish-toggle.is-on .toggle-thumb {
  transform: translateX(13px);
}

/* 分镜拼图与脚本摘要 */
.frames-img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  cursor: zoom-in;
}

.script-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-word;
}

/* ───────── 游戏与出片页 ───────── */

.games-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.game-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-subtle);
  background: var(--bg-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.game-card-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.game-card-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.script-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.script-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap-min);
  padding: 0 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
}

.script-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.script-pill.is-active {
  background: rgba(127, 178, 255, 0.16);
  border-color: var(--accent-border);
  color: #f3f7ff;
}

.shoot-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-label {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-card {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-subtle);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.job-title {
  font-size: 13.5px;
  font-weight: 600;
}

.job-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.job-status.st-queued { background: var(--st-pending-bg); color: #cde0fb; }
.job-status.st-running { background: rgba(127, 178, 255, 0.22); color: #dceaff; }
.job-status.st-done { background: var(--st-approved-bg); color: #a7f3d4; }
.job-status.st-failed { background: var(--st-danger-bg); color: #ffd0d0; }
.job-status.st-cancelled { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }

.job-summary {
  font-size: 12.5px;
  color: var(--text-secondary);
  word-break: break-word;
}

.job-error {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--st-danger-bg);
  color: #ffd3d3;
  font-size: 12.5px;
  word-break: break-word;
}

/* ───────── 公网口令登录墙 ───────── */

.login-wall {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 390px;
  border-radius: 22px;
  padding: 28px 24px 24px;
  background: rgba(19, 25, 37, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-normal);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.login-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
}

.login-sub {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-error {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--st-danger-bg);
  border: 1px solid rgba(242, 116, 116, 0.36);
  color: #ffd4d4;
  font-size: 13px;
}

/* ───────── 抽帧灯箱预览 ───────── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 8, 12, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-inner {
  position: relative;
  max-width: min(1100px, 95vw);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(90vh - 56px);
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-normal);
}

/* ───────── Toast 通知 ───────── */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: rgba(18, 24, 36, 0.92);
  border: 1px solid var(--line-normal);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 13.5px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  background: rgba(64, 24, 28, 0.94);
  border-color: rgba(242, 116, 116, 0.48);
  color: #ffe0e0;
}

.toast-ok {
  background: rgba(16, 46, 36, 0.94);
  border-color: rgba(89, 214, 163, 0.45);
  color: #ccfae6;
}

/* ───────── 响应式断点 ───────── */

@media (max-width: 1024px) {
  .detail-layout,
  .detail-layout.is-ab,
  .games-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-col {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    padding: 8px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .brand-text {
    font-size: 14px;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    display: flex;
  }

  .topbar-nav .seg-btn {
    flex: 1;
    min-height: 40px;
    padding: 0 10px;
  }

  .auth-pill {
    display: none;
  }

  .main-container {
    padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
  }

  .search-box {
    width: 100%;
  }

  .episode-grid,
  .skeleton-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .episode-card-body {
    padding: 10px 10px 12px;
  }

  .episode-card-title {
    font-size: 13px;
  }

  .poster-overlay-top,
  .poster-overlay-bottom {
    left: 7px;
    right: 7px;
  }

  .glass-pill {
    padding: 2px 7px;
    font-size: 11px;
  }

  .panel {
    padding: 13px;
  }

  .player-stage,
  .ab-panel {
    padding: 10px;
  }

  .decision-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .decision-grid .btn {
    padding: 0 8px;
    font-size: 13px;
  }

  .note-input-row {
    flex-direction: column;
  }

  .shoot-form-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ab-grid {
    gap: 8px;
  }

  .ab-controls .btn {
    min-width: 0;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .detail-header {
    justify-content: space-between;
    gap: 8px;
  }

  .detail-title-wrap {
    order: 3;
    flex: 1 0 100%;
  }

  .detail-title {
    font-size: 16.5px;
  }

  .player-frame {
    max-height: 54vh;
  }
}
