/* ===========================================================
   不困漫剧 · 创作者中心
   视觉基线参考 shortdramas.com（抖音短剧创作者中心）
   深色 / 浅色双主题，语义变量驱动
   =========================================================== */

/* ---------- 深色（默认） ---------- */
:root{
  --bg:#060614;
  --bg-deep:#04040e;
  --surface:#1a1a1f;
  --surface-2:#202027;
  --surface-3:#26262e;

  --ink:#f6f6f6;
  --ink-2:rgba(255,255,255,.55);
  --ink-3:rgba(255,255,255,.32);
  --line:rgba(255,255,255,.07);

  --fill:rgba(255,255,255,.05);
  --fill-hover:rgba(255,255,255,.08);
  --fill-strong:rgba(255,255,255,.12);
  --thumb:#202027;

  --btn-bg:#f6f6f6;
  --btn-ink:#060614;
  --btn-bg-hover:#ffffff;

  --ghost-line:rgba(255,255,255,.16);
  --ghost-line-hover:rgba(255,255,255,.28);
  --ghost-bg-hover:rgba(255,255,255,.05);

  --active-bg:rgba(255,255,255,.06);
  --hover-bg:rgba(255,255,255,.04);

  --brand-tint-a:#25232f;
  --brand-tint-b:#1c1a29;
  --brand-tint-c:#241a2e;

  --accent:#7c5cff;
  /* --brand 是历史命名，统一指向 accent，避免两套名字各写各的 */
  --brand:var(--accent);
  --ok:#2bd576;
  --warn:#ffb020;
  --bad:#ff5d6c;

  --glow-1:rgba(124,92,255,.20);
  --glow-2:rgba(255,93,168,.12);

  --r-xl:36px;
  --r-lg:28px;
  --r-md:20px;
  --r-sm:12px;

  color-scheme:dark;
}

/* ---------- 浅色 ---------- */
html.light{
  --bg:#f4f4f7;
  --bg-deep:#ececf1;
  --surface:#ffffff;
  --surface-2:#f4f4f7;
  --surface-3:#e9e9ef;

  --ink:#14141a;
  --ink-2:rgba(0,0,0,.58);
  --ink-3:rgba(0,0,0,.38);
  --line:rgba(0,0,0,.07);

  --fill:rgba(0,0,0,.04);
  --fill-hover:rgba(0,0,0,.065);
  --fill-strong:rgba(0,0,0,.1);
  --thumb:#ececf1;

  --btn-bg:#16161a;
  --btn-ink:#f6f6f6;
  --btn-bg-hover:#000000;

  --ghost-line:rgba(0,0,0,.14);
  --ghost-line-hover:rgba(0,0,0,.28);
  --ghost-bg-hover:rgba(0,0,0,.04);

  --active-bg:rgba(0,0,0,.05);
  --hover-bg:rgba(0,0,0,.035);

  --brand-tint-a:#f1eefb;
  --brand-tint-b:#edeaf8;
  --brand-tint-c:#f6ecf3;

  --glow-1:rgba(124,92,255,.14);
  --glow-2:rgba(255,93,168,.10);

  color-scheme:light;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.65 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Source Han Sans SC","Noto Sans CJK SC",sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--ink-2)}
img{display:block}

/* ---------- 布局 ---------- */
.app{display:flex;min-height:100vh;background:var(--bg)}

.sidebar{
  width:216px;flex:0 0 216px;padding:26px 16px;
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;
}
.logo{display:flex;align-items:center;gap:11px;padding:0 8px 26px}
.logo-mark{
  width:34px;height:34px;border-radius:11px;flex:0 0 34px;
  background:var(--btn-bg);color:var(--btn-ink);
  display:grid;place-items:center;font-weight:800;font-size:15px;letter-spacing:-.5px;
}
.logo-text{font-weight:600;font-size:15px;letter-spacing:.2px;line-height:1.25}
.logo-text small{display:block;font-size:10px;color:var(--ink-3);font-weight:400;letter-spacing:2px;margin-top:3px}

.nav{display:flex;flex-direction:column;gap:2px;flex:1}
.nav-item{
  display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:99px;
  color:var(--ink-2);font-size:14px;transition:.16s;
}
.nav-item svg{width:18px;height:18px;flex:0 0 18px;opacity:.8}
.nav-item:hover{background:var(--hover-bg);color:var(--ink)}
.nav-item.active{background:var(--surface);color:var(--ink);font-weight:500}
.nav-item.active svg{opacity:1}

.side-foot{padding-top:14px;margin-top:10px;border-top:1px solid var(--line)}
.me{display:flex;align-items:center;gap:11px;padding:8px}
.avatar{
  width:32px;height:32px;border-radius:50%;flex:0 0 32px;
  background:var(--surface-2);color:var(--ink);
  display:grid;place-items:center;font-size:13px;font-weight:600;
}
.me-name{font-size:13px;line-height:1.3;color:var(--ink)}
.me-role{font-size:11px;color:var(--ink-3);margin-top:2px}
.logout{
  background:none;border:0;color:var(--ink-3);font-size:12px;cursor:pointer;
  padding:9px 10px;text-align:left;width:100%;border-radius:10px;
}
.logout:hover{color:var(--ink-2);background:var(--hover-bg)}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  height:76px;display:flex;align-items:center;justify-content:space-between;
  padding:0 40px;position:sticky;top:0;z-index:20;
  background:color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter:blur(14px);
}
.topbar h1{font-size:22px;font-weight:600;margin:0;letter-spacing:-.3px}
.topbar .crumb{font-size:12px;color:var(--ink-3);margin-top:3px}
.topbar-right{display:flex;align-items:center;gap:12px}
.content{padding:14px 40px 72px;max-width:1360px;width:100%}

/* ---------- 主题切换 ---------- */
.theme-toggle{
  width:40px;height:40px;border-radius:50%;border:0;cursor:pointer;
  background:var(--fill);color:var(--ink-2);
  display:grid;place-items:center;transition:.16s;flex:0 0 40px;
}
.theme-toggle:hover{background:var(--fill-hover);color:var(--ink)}
.theme-toggle svg{width:18px;height:18px}
.theme-toggle .i-sun{display:none}
html.light .theme-toggle .i-sun{display:block}
html.light .theme-toggle .i-moon{display:none}

/* ---------- 卡片 ---------- */
.card{background:var(--surface);border-radius:var(--r-lg);padding:28px}
.card h2{font-size:16px;font-weight:600;margin:0 0 20px;color:var(--ink);letter-spacing:-.2px}
.section-gap{margin-bottom:18px}

/* ---------- 数据卡 ---------- */
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
@media(max-width:1080px){.stats{grid-template-columns:repeat(2,1fr)}}
.stat{background:var(--surface);border-radius:var(--r-lg);padding:22px 24px}
.stat .k{font-size:12px;color:var(--ink-3);letter-spacing:.2px}
.stat .v{font-size:32px;font-weight:500;margin-top:10px;letter-spacing:-1.2px;line-height:1.1}
.stat .v small{font-size:12px;color:var(--ink-3);font-weight:400;margin-left:4px;letter-spacing:0}
.stat .delta{font-size:11px;color:var(--ink-3);margin-top:9px}
.stat.brand{
  background:linear-gradient(140deg,var(--brand-tint-a) 0%,var(--brand-tint-b) 45%,var(--brand-tint-c) 100%);
}
.stat.brand .k{color:var(--ink-2)}

/* ---------- 作品封面墙 ---------- */
.toolbar{display:flex;align-items:flex-end;justify-content:space-between;margin:26px 0 16px;gap:12px}
.toolbar h2{font-size:17px;margin:0;font-weight:600;letter-spacing:-.2px}
.toolbar .sub{font-size:12px;color:var(--ink-3);margin-top:4px}

.poster-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
@media(max-width:1240px){.poster-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:940px){.poster-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:640px){.poster-grid{grid-template-columns:repeat(2,1fr)}}

.poster{display:block;border-radius:var(--r-md);overflow:hidden;background:var(--surface);transition:.2s}
.poster:hover{transform:translateY(-4px);background:var(--surface-2)}
.poster .thumb{
  aspect-ratio:3/4;position:relative;display:grid;place-items:center;
  font-size:38px;font-weight:700;color:var(--ink-3);letter-spacing:-1px;
  background:var(--thumb);
}
.poster .thumb img{width:100%;height:100%;object-fit:cover}
.poster .state{
  position:absolute;top:10px;left:10px;font-size:11px;padding:3px 10px;border-radius:99px;
  background:rgba(0,0,0,.55);backdrop-filter:blur(8px);color:#fff;
}
.poster .ep{
  position:absolute;bottom:10px;right:10px;font-size:11px;color:#fff;
  background:rgba(0,0,0,.55);backdrop-filter:blur(8px);padding:3px 8px;border-radius:8px;
}
.poster .meta{padding:13px 14px 15px}
.poster .name{
  font-size:13px;font-weight:500;line-height:1.4;color:var(--ink);
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px;
}
.poster .tags{display:flex;gap:6px;margin-top:9px;flex-wrap:wrap}
.poster .tag{font-size:10px;color:var(--ink-3);padding:1px 0}

/* ---------- 徽章 ---------- */
.badge{
  display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:99px;
  font-size:11px;line-height:1.7;background:var(--fill);color:var(--ink-2);
}
.badge.ok{background:rgba(43,213,118,.13);color:#0f9d58}
html:not(.light) .badge.ok{color:#6fe3a4}
.badge.warn{background:rgba(255,176,32,.13);color:#b26a00}
html:not(.light) .badge.warn{color:#ffc45e}
.badge.bad{background:rgba(255,93,108,.13);color:#d32f3f}
html:not(.light) .badge.bad{color:#ff8f99}
.badge.info{background:rgba(124,92,255,.13);color:#5b3fd6}
html:not(.light) .badge.info{color:#b3a1ff}
.dot{width:5px;height:5px;border-radius:50%;background:currentColor;display:inline-block}

/* ---------- 表格 ---------- */
.table-wrap{overflow-x:auto;margin:0 -8px}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th,td{text-align:left;padding:15px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
th{color:var(--ink-3);font-weight:400;font-size:12px;padding-bottom:11px}
tbody tr:last-child td{border-bottom:0}
tbody tr{transition:.12s}
tbody tr:hover{background:var(--hover-bg)}
td.num{font-variant-numeric:tabular-nums;color:var(--ink-2)}
td.strong{font-weight:600;color:var(--ink)}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 26px;border-radius:99px;border:0;
  background:var(--btn-bg);color:var(--btn-ink);
  font-size:14px;font-weight:600;cursor:pointer;transition:.16s;letter-spacing:.2px;
}
.btn:hover{background:var(--btn-bg-hover);transform:translateY(-1px)}
.btn.ghost{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1px var(--ghost-line)}
.btn.ghost:hover{background:var(--ghost-bg-hover);box-shadow:inset 0 0 0 1px var(--ghost-line-hover)}
.btn.sm{padding:7px 16px;font-size:12.5px}
.btn.full{width:100%}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none}

/* ---------- 表单 ---------- */
.field{margin-bottom:20px}
label{display:block;font-size:13px;color:var(--ink-2);margin-bottom:9px;font-weight:400}
label .req{color:var(--bad);margin-left:3px}
input[type=text],input[type=password],input[type=number],input[type=file],select,textarea{
  width:100%;padding:13px 16px;border:1px solid transparent;border-radius:var(--r-sm);
  background:var(--fill);color:var(--ink);font:inherit;transition:.15s;
}
input::placeholder,textarea::placeholder{color:var(--ink-3)}
input:hover,select:hover,textarea:hover{background:var(--fill-hover)}
input:focus,select:focus,textarea:focus{
  outline:none;background:var(--fill-hover);
  border-color:rgba(124,92,255,.55);box-shadow:0 0 0 4px rgba(124,92,255,.12);
}
textarea{min-height:130px;resize:vertical;line-height:1.75}
select{
  appearance:none;cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--ink-3) 50%),linear-gradient(135deg,var(--ink-3) 50%,transparent 50%);
  background-position:calc(100% - 20px) 50%,calc(100% - 15px) 50%;
  background-size:5px 5px,5px 5px;background-repeat:no-repeat;
}
input[type=file]{padding:11px 16px;color:var(--ink-2);font-size:13px}
input[type=file]::file-selector-button{
  background:var(--fill-strong);border:0;color:var(--ink);padding:6px 14px;
  border-radius:99px;margin-right:12px;cursor:pointer;font-size:12px;
}
.hint{font-size:12px;color:var(--ink-3);margin-top:7px;line-height:1.7}
.err{font-size:12px;color:var(--bad);margin-top:7px}

.grid{display:grid;gap:18px}
.g2{grid-template-columns:repeat(2,1fr)}
.g3{grid-template-columns:repeat(3,1fr)}
.g4{grid-template-columns:repeat(4,1fr)}
@media(max-width:940px){.g2,.g3,.g4{grid-template-columns:1fr}}

.alert{padding:14px 20px;border-radius:var(--r-md);font-size:13.5px;margin-bottom:18px;line-height:1.7}
.alert.ok{background:rgba(43,213,118,.1);color:#0f9d58}
html:not(.light) .alert.ok{color:#7ee2a8}
.alert.bad{background:rgba(255,93,108,.1);color:#c62828}
html:not(.light) .alert.bad{color:#ff9aa4}

/* ---------- 分类 chip ---------- */
.chips{display:flex;flex-wrap:wrap;gap:9px}
.chip input{display:none}
.chip span{
  display:inline-block;padding:9px 20px;border-radius:99px;font-size:13px;
  background:var(--fill);color:var(--ink-2);cursor:pointer;transition:.15s;
}
.chip span:hover{background:var(--fill-hover);color:var(--ink)}
.chip.on span{background:var(--btn-bg);color:var(--btn-ink);font-weight:500}

/* ---------- 步骤条 ---------- */
.steps{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}
.step{
  display:flex;align-items:center;gap:9px;padding:9px 18px;border-radius:99px;
  background:var(--surface);font-size:12.5px;color:var(--ink-3);
}
.step b{
  width:19px;height:19px;border-radius:50%;background:var(--fill-strong);
  display:grid;place-items:center;font-size:10px;color:var(--ink-2);font-weight:500;
}
.step.active{background:var(--active-bg);color:var(--ink)}
.step.active b{background:var(--btn-bg);color:var(--btn-ink)}

/* ---------- 详情 ---------- */
.detail-head{display:flex;gap:28px;flex-wrap:wrap}
.detail-cover{
  width:168px;flex:0 0 168px;aspect-ratio:3/4;border-radius:var(--r-md);overflow:hidden;
  background:var(--thumb);display:grid;place-items:center;
  font-size:44px;font-weight:700;color:var(--ink-3);
}
.detail-cover img{width:100%;height:100%;object-fit:cover}
.detail-info{flex:1;min-width:260px}
.detail-info h2{font-size:26px;margin:12px 0 0;font-weight:600;letter-spacing:-.4px}
.kv{display:grid;grid-template-columns:92px 1fr;gap:11px 16px;font-size:13.5px;margin-top:18px}
.kv dt{color:var(--ink-3)}
.kv dd{margin:0;color:var(--ink-2)}
.divider{height:1px;background:var(--line);margin:24px 0}

.asset-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}
@media(max-width:940px){.asset-strip{grid-template-columns:repeat(3,1fr)}}
.asset{
  border:0;cursor:pointer;font:inherit;
  border-radius:var(--r-sm);overflow:hidden;aspect-ratio:3/4;background:var(--fill);
  display:grid;place-items:center;font-size:11px;color:var(--ink-3);text-align:center;padding:8px;
}
.asset img{width:100%;height:100%;object-fit:cover}

/* ---------- 空态 ---------- */
.empty{padding:64px 20px;text-align:center;color:var(--ink-3)}
.empty .big{font-size:40px;margin-bottom:16px;opacity:.35}
.empty h3{color:var(--ink-2);font-size:15px;margin:0 0 8px;font-weight:500}
.empty p{font-size:13px;margin:0 0 22px;line-height:1.7}

/* ---------- 登录 ---------- */
.auth-wrap{min-height:100vh;display:grid;place-items:center;padding:32px 20px;position:relative;overflow:hidden;background:var(--bg)}
.auth-wrap::before{
  content:"";position:absolute;width:760px;height:760px;border-radius:50%;
  background:radial-gradient(circle,var(--glow-1),transparent 62%);
  top:-300px;right:-200px;pointer-events:none;
}
.auth-wrap::after{
  content:"";position:absolute;width:620px;height:620px;border-radius:50%;
  background:radial-gradient(circle,var(--glow-2),transparent 65%);
  bottom:-280px;left:-180px;pointer-events:none;
}
.auth-card{
  width:100%;max-width:420px;background:var(--surface);border-radius:var(--r-xl);
  padding:40px 36px;position:relative;z-index:1;
}
.auth-brand{text-align:center;margin-bottom:30px}
.auth-brand .logo-mark{width:52px;height:52px;border-radius:16px;margin:0 auto 18px;font-size:22px}
.auth-brand h1{font-size:26px;margin:0 0 8px;font-weight:600;letter-spacing:-.4px}
.auth-brand p{font-size:13px;color:var(--ink-3);margin:0;line-height:1.6}
.auth-foot{text-align:center;margin-top:22px;font-size:13px;color:var(--ink-3)}
.auth-foot a{color:var(--ink);font-weight:500;border-bottom:1px solid var(--ghost-line);padding-bottom:1px}

.auth-theme{position:fixed;top:22px;right:22px;z-index:5}

/* ---------- 金额 ---------- */
.money{font-variant-numeric:tabular-nums;font-weight:600}
.money.big{font-size:34px;letter-spacing:-1.4px}
.money.pos{color:var(--ok)}

/* ---------- 响应式 ---------- */
@media(max-width:820px){
  .sidebar{position:fixed;left:-230px;z-index:50;transition:.22s;background:var(--bg-deep);border-radius:0 24px 24px 0}
  .sidebar.open{left:0}
  .topbar{padding:0 20px;height:68px}
  .content{padding:8px 20px 60px}
  .stat .v{font-size:26px}
}

/* ===========================================================
   自定义下拉（原生 select 太丑，全部增强）
   =========================================================== */
.native-select{display:none!important}

.sel{position:relative;width:100%}
.sel-trigger{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:13px 16px;border-radius:var(--r-sm);background:var(--fill);color:var(--ink);
  border:1px solid transparent;font:inherit;cursor:pointer;text-align:left;transition:.15s;
}
.sel-trigger:hover{background:var(--fill-hover)}
.sel.open .sel-trigger{
  background:var(--fill-hover);border-color:rgba(124,92,255,.55);
  box-shadow:0 0 0 4px rgba(124,92,255,.12);
}
.sel-trigger .val{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sel-trigger .val.ph{color:var(--ink-3)}
.sel-trigger .chev{width:14px;height:14px;color:var(--ink-3);transition:.2s;flex:0 0 14px}
.sel.open .chev{transform:rotate(180deg)}

.sel-menu{
  position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:60;
  background:var(--surface);border-radius:14px;padding:6px;
  box-shadow:0 18px 44px rgba(0,0,0,.35);
  max-height:264px;overflow:auto;display:none;
}
html.light .sel-menu{box-shadow:0 18px 44px rgba(0,0,0,.14);border:1px solid var(--line)}
.sel.open .sel-menu{display:block;animation:selIn .14s ease}
@keyframes selIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}

.sel-option{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:10px 12px;border-radius:9px;font-size:14px;color:var(--ink-2);
  cursor:pointer;transition:.12s;
}
.sel-option:hover{background:var(--fill-hover);color:var(--ink)}
.sel-option.on{background:var(--fill-strong);color:var(--ink);font-weight:500}
.sel-option .tick{width:14px;height:14px;opacity:0;flex:0 0 14px}
.sel-option.on .tick{opacity:1}

/* ===========================================================
   图片上传预览
   =========================================================== */
.cover-preview{
  margin-top:12px;width:118px;aspect-ratio:3/4;border-radius:12px;overflow:hidden;
  background:var(--thumb);display:grid;place-items:center;color:var(--ink-3);
  font-size:11px;text-align:center;padding:8px;line-height:1.5;
}
.cover-preview img{width:100%;height:100%;object-fit:cover}
.cover-preview.hongguo{aspect-ratio:7/10}

.file-preview{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.file-thumb{
  position:relative;width:88px;aspect-ratio:1;border-radius:10px;overflow:hidden;
  background:var(--thumb);display:grid;place-items:center;
  font-size:10px;color:var(--ink-3);text-align:center;padding:6px;line-height:1.4;
}
.file-thumb img{width:100%;height:100%;object-fit:cover}
.file-thumb .rm{
  position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;
  background:rgba(0,0,0,.6);color:#fff;border:0;cursor:pointer;font-size:13px;line-height:1;
  display:grid;place-items:center;opacity:0;transition:.15s;padding:0;
}
.file-thumb:hover .rm{opacity:1}
.file-more{
  display:grid;place-items:center;width:88px;height:88px;border-radius:10px;
  background:var(--fill);color:var(--ink-3);font-size:12px;
}

/* ===========================================================
   分集列表 / 上传预演 / 编辑弹窗
   =========================================================== */
.link-btn{
  background:none;border:0;padding:0;margin:0;color:var(--ink-2);
  font:inherit;font-size:13px;cursor:pointer;line-height:1.4;
}
.link-btn:hover{color:var(--ink);text-decoration:underline}

/* 卡片标题栏：标题在左，主操作在右 */
.card-head{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:16px;margin-bottom:16px;
}
.card-head h2{margin:0 0 4px}
.card-head .sub{font-size:12px;color:var(--ink-3);margin:0}
.card-head-actions{display:flex;align-items:center;gap:14px;flex-shrink:0}

/* 集数进度 */
.ep-meter{width:88px;height:6px;border-radius:99px;background:var(--fill);overflow:hidden}
.ep-meter-fill{height:100%;background:var(--brand);border-radius:99px;transition:width .3s ease}

/* 添加正片面板（点按钮才展开） */
.ep-upload-panel{margin-bottom:16px;animation:panelIn .18s ease}
.ep-upload-inner{background:var(--fill);border-radius:var(--r-md);padding:18px 20px}
@keyframes panelIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* 拖拽手柄：只在这块区域响应拖拽，避免误触 */
.drag-handle{
  cursor:grab;color:var(--ink-3);user-select:none;
  display:inline-flex;align-items:center;justify-content:center;
  width:24px;height:24px;flex:0 0 24px;
  -webkit-tap-highlight-color:transparent;
}
.drag-handle svg{width:14px;height:14px;display:inline-block;vertical-align:middle;opacity:.65}
.drag-handle:hover svg{opacity:1}
.drag-handle:active{cursor:grabbing}
tbody tr.dragging{opacity:.45;background:var(--fill-strong)}
tbody tr:hover .drag-handle svg{opacity:.9}

/* 拖拽期间：禁止选中文字，光标保持抓取态 */
body.is-dragging{user-select:none;cursor:grabbing}
body.is-dragging *{cursor:grabbing!important}

/* 长列表：桌面端冻住表头（手机保留横向滚动） */
@media(min-width:900px){
  .ep-table{overflow:visible;margin:0}
  .ep-table thead th{
    position:sticky;top:76px;z-index:4;
    background:var(--surface);
    box-shadow:0 1px 0 var(--line);
  }
}

/* 分集折叠 / 跳转 */
tbody tr.ep-folded{display:none}
.ep-fold-bar{margin-top:12px;text-align:center}
tbody tr.ep-flash{background:rgba(124,92,255,.14)}

.ep-jump input{
  width:88px;padding:7px 10px;font-size:12px;border-radius:8px;
}

/* 分集行：集号 | 标题/文件 | 时长+状态 | 操作 */
/* 分集行：集号 | 封面(3:4 竖版) | 标题 | 时长+状态 | 操作 */
.ep-thumb{width:58px;padding-right:0!important}
.ep-thumb-wrap{position:relative;width:42px;height:56px}
.ep-thumb-btn{
  width:42px;height:56px;border:0;padding:0;border-radius:8px;overflow:hidden;
  background:var(--fill);cursor:pointer;display:block;
}
.ep-thumb-btn img{width:100%;height:100%;object-fit:cover;display:block}
/* 空封面：图标必须看得见（否则像加载失败），但颜色压到次要层级 */
.ep-thumb-btn.empty{
  border:0;
  background:var(--fill);
  color:var(--ink-3);
  transition:background .15s, color .15s;
}
.ep-thumb-btn.empty svg{width:16px;height:16px}
tbody tr:hover .ep-thumb-btn.empty{background:var(--fill-strong);color:var(--ink-2)}
.ep-thumb-btn.empty:hover{background:var(--fill-strong);color:var(--brand)}
.ep-thumb-edit{
  position:absolute;right:-5px;bottom:-5px;width:20px;height:20px;border-radius:50%;
  border:0;background:var(--surface);color:var(--ink-2);
  display:grid;place-items:center;cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,.35);opacity:0;transition:opacity .15s;padding:0;
}
.ep-thumb-wrap:hover .ep-thumb-edit{opacity:1}
.ep-thumb-edit svg{width:11px;height:11px}
.ep-thumb-ph{display:block;width:42px;height:56px;border-radius:8px;background:var(--fill)}
.ep-no-cell{display:flex;align-items:center;gap:8px}
.ep-main{max-width:0}
.ep-title{font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-file{font-size:12px;color:var(--ink-3);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-meta{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.ep-stats{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--ink-3);font-variant-numeric:tabular-nums}
.ep-dur{font-size:12px;color:var(--ink-3);font-variant-numeric:tabular-nums;min-width:38px}
.ep-actions{display:flex;align-items:center;gap:4px;justify-content:flex-end}
.icon-btn{
  width:30px;height:30px;border-radius:9px;border:0;background:transparent;
  display:grid;place-items:center;cursor:pointer;color:var(--ink-3);padding:0;
  transition:background .15s,color .15s;
}
.icon-btn svg{width:16px;height:16px}
.icon-btn:hover{background:var(--fill-strong);color:var(--ink)}
.icon-btn.danger:hover{background:rgba(255,93,108,.12);color:var(--bad)}

/* 上传拖拽区：明确「可以多选」 */
.ep-drop{
  border:1.5px dashed var(--ghost-line);
  border-radius:var(--r-md);
  padding:30px 20px;text-align:center;cursor:pointer;
  transition:.15s;
}
.ep-drop:hover,.ep-drop.over{
  border-color:var(--brand);
  background:rgba(124,92,255,.06);
}
.ep-drop-icon{
  width:42px;height:42px;border-radius:50%;margin:0 auto 12px;
  display:grid;place-items:center;font-size:20px;line-height:1;
  background:var(--fill-strong);color:var(--ink-2);
}
.ep-drop.over .ep-drop-icon{background:var(--brand);color:#fff}
.ep-drop-title{font-size:14px;color:var(--ink);margin-bottom:6px}
.ep-drop-sub{font-size:12px;color:var(--ink-3)}

/* 列表底部操作条：滚到底也能直接添加 */
.ep-list-foot{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin-top:14px;padding-top:14px;border-top:1px solid var(--line);
}
.ep-list-foot .hint{margin:0}

/* 媒体预览弹窗 */
.media-dialog{
  border:0;border-radius:20px;padding:0;
  background:var(--surface);color:var(--ink);
  width:auto;max-width:min(1040px,94vw);max-height:92vh;
  box-shadow:0 30px 90px rgba(0,0,0,.5);
}
.media-dialog::backdrop{background:rgba(0,0,0,.78);backdrop-filter:blur(4px)}
.media-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 20px;border-bottom:1px solid var(--line);
  font-size:13px;color:var(--ink-2);
}
.media-body{display:grid;place-items:center;overflow:hidden;border-radius:0 0 20px 20px;background:#000}
.media-body img,.media-body video{
  display:block;max-width:min(1040px,94vw);max-height:80vh;margin:0 auto;
}

/* 上传前的「第 N 集 ← 文件名」对照表 */
.ep-map{
  max-height:300px;overflow:auto;border-radius:12px;
  background:var(--fill);padding:6px;
}
.ep-map-row{
  display:flex;align-items:center;gap:14px;padding:8px 12px;
  border-radius:8px;font-size:13px;
}
.ep-map-row:nth-child(even){background:var(--fill)}
.ep-map-no{flex:0 0 76px;color:var(--ink);font-weight:500}
.ep-map-name{flex:1;min-width:0;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ep-map-state{flex:0 0 96px;text-align:right;color:var(--ink-3);font-size:12px}

/* 编辑弹窗 */
.ep-dialog{
  border:0;border-radius:22px;padding:26px;
  background:var(--surface);color:var(--ink);
  width:min(580px,92vw);max-height:88vh;overflow:auto;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
}
.ep-dialog::backdrop{background:rgba(0,0,0,.55);backdrop-filter:blur(3px)}
.ep-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.ep-dialog-head h3{font-size:17px;margin:0;font-weight:600;letter-spacing:-.2px}
.ep-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}
.ep-dialog .cover-preview{width:96px}
.ep-dialog .field{margin-bottom:14px}
