/* ============================================================================
   全平台视频下载（运营板块）· 2026-09-16
   ----------------------------------------------------------------------------
   ⚠️ 三条约定（本项目踩过的事，别改）：
     1. **独立文件**，在 style.css 之后加载 —— 改别人的样式不要去动 style.css；
     2. **品牌主色不动**（--primary #f95901）：要的是质感/层次/间距的精修，不是换皮；
     3. 注释里**禁止出现连续 `*` + `/`**（历史上把 CSS 注释写坏导致整段样式失效）。
   ========================================================================== */

/* ---------------------------------------------------------------- 入口大卡 */
.ad-entry {
  /* 🔴 这一行不能删：它是 .ad-entry-glow（absolute）的包含块。
     漏掉 → glow 改为相对 body 定位，按 inset 的 right:-30% 跑出视口 117px，
     document 被撑到 507px 而 body 仍 390px → iOS 把整页缩成 77%、右侧一片留白（2026-09-16 事故）。
     注：overflow:hidden 只在「本元素自己是包含块」时才裁得到绝对定位子元素。
     老卡片（.combo-card.ip-entry 等）的 position:relative 都写在 style.css 里，新卡必须自带。 */
  position: relative;
  background: linear-gradient(128deg, #2b1a10 0%, #4a2a15 52%, #7a3a12 100%);
  overflow: hidden;
}
.ad-entry-glow {
  position: absolute; inset: auto -30% -60% auto; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(249, 89, 1, .55) 0%, rgba(249, 89, 1, 0) 68%);
  pointer-events: none;
}
.ad-entry-tag {
  display: inline-block; padding: 3px 9px; margin-bottom: 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  color: #ffd9bd; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
}
.ad-entry-name { font-size: 20px; font-weight: 800; letter-spacing: .3px; color: #fff; line-height: 1.28; }
.ad-entry-sub { margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, .74); }
.ad-entry-band { display: flex; align-items: center; gap: 7px; margin-top: 12px; flex-wrap: wrap; }
.ad-entry-band b {
  padding: 3px 8px; font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, .86); background: rgba(255, 255, 255, .10);
  border-radius: 8px; backdrop-filter: blur(2px);
}
.ad-entry-ico {
  position: relative; width: 58px; height: 58px; flex: 0 0 58px;
  display: grid; place-items: center; font-size: 27px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
}

/* ---------------------------------------------------------------- 子页骨架 */
.ad-top { position: relative; padding: 0 18px; }
.ad-hero {
  position: relative; margin: 0 0 16px; padding: 2px 0 22px;
  background: linear-gradient(170deg, #2b1a10 0%, #44260f 46%, #6d3611 100%);
  border-bottom-left-radius: 26px; border-bottom-right-radius: 26px;
  overflow: hidden;
}
.ad-hero::before {
  content: ''; position: absolute; top: -70px; right: -50px; width: 230px; height: 230px;
  background: radial-gradient(circle, rgba(249, 89, 1, .5) 0%, rgba(249, 89, 1, 0) 70%);
  pointer-events: none;
}
.ad-hero .sub-topbar { position: relative; }
.ad-hero .sub-title { color: #fff; }
.ad-hero .sub-back { color: rgba(255, 255, 255, .92); }
.ad-h1 { position: relative; margin: 12px 0 0; font-size: 23px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.ad-sub { position: relative; margin: 7px 0 0; font-size: 12.5px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.ad-sub b { color: #ffd0ac; }

/* 平台墙：一眼看出「哪些平台行」 */
.ad-wall { position: relative; display: flex; gap: 8px; margin-top: 15px; overflow-x: auto; padding-bottom: 3px; }
.ad-wall::-webkit-scrollbar { display: none; }
.ad-wall-chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: rgba(255, 255, 255, .90); background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px;
}
.ad-wall-chip i { font-style: normal; font-size: 13px; }
.ad-wall-chip.warn { opacity: .62; }

/* ---------------------------------------------------------------- 输入卡 */
.ad-inbox {
  position: relative; margin: -13px 16px 0; padding: 14px;
  background: #fff; border-radius: 20px;
  box-shadow: 0 14px 34px -18px rgba(90, 46, 12, .42), 0 2px 8px rgba(120, 70, 30, .06);
}
.ad-ta {
  width: 100%; min-height: 96px; padding: 12px 13px; box-sizing: border-box;
  font: 13.5px/1.65 -apple-system, 'PingFang SC', sans-serif; color: var(--text);
  background: #fbf7f4; border: 1.5px solid #f0e3d8; border-radius: 14px;
  resize: vertical; outline: none; transition: border-color .18s, box-shadow .18s;
}
.ad-ta::placeholder { color: #bda797; }
.ad-ta:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(249, 89, 1, .10); }
.ad-inbox-bar { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.ad-ghost {
  padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: #8a6f5c;
  background: #fbf4ee; border: 1px solid #f2e4d8; border-radius: 11px; cursor: pointer;
  transition: background .16s, transform .1s;
}
.ad-ghost:hover { background: #f7ece3; }
.ad-ghost:active { transform: scale(.98); }
.ad-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text2); }
.ad-count.on { color: var(--primary); }

.ad-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ad-picked span {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 4px 9px; font-size: 11.5px; color: #6f5747;
  background: #fdf3ea; border: 1px solid #f6e3d3; border-radius: 9px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.ad-go {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; padding: 14px; box-sizing: border-box;
  font-size: 15.5px; font-weight: 800; letter-spacing: .3px; color: #fff;
  background: var(--grad); border: 0; border-radius: 15px; cursor: pointer;
  box-shadow: 0 14px 26px -12px rgba(249, 89, 1, .62);
  transition: transform .12s, box-shadow .18s, filter .18s;
}
.ad-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(249, 89, 1, .72); }
.ad-go:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.ad-go:disabled { filter: grayscale(.45); opacity: .58; cursor: not-allowed; box-shadow: none; }
.ad-go small { font-size: 11.5px; font-weight: 600; opacity: .9; }

.ad-note { margin: 10px 18px 0; font-size: 11.5px; line-height: 1.7; color: var(--text2); }
.ad-note b { color: #8a6f5c; }

/* ---------------------------------------------------------------- 结果区 */
.ad-head { display: flex; align-items: center; gap: 8px; margin: 20px 18px 10px; }
.ad-head h2 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.ad-head .ad-n { font-size: 12px; font-weight: 600; color: var(--text2); }
.ad-head button {
  margin-left: auto; padding: 7px 12px; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff9a54, #f95901); border: 0; border-radius: 10px; cursor: pointer;
}
.ad-head button:disabled { filter: grayscale(.5); opacity: .5; cursor: not-allowed; }

.ad-list { display: flex; flex-direction: column; gap: 13px; padding: 0 16px 26px; }

.ad-card {
  position: relative; padding: 13px; background: #fff; border-radius: 18px;
  box-shadow: 0 10px 28px -18px rgba(90, 46, 12, .40), 0 1px 4px rgba(120, 70, 30, .05);
  border: 1px solid #f4e9df;
  animation: adIn .26s ease both;
}
@keyframes adIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.ad-card.run { border-color: #ffe3cc; }
.ad-card.bad { border-color: #f6d7d7; background: #fffdfd; }

.ad-row { display: flex; gap: 11px; }
.ad-thumb {
  position: relative; width: 92px; height: 92px; flex: 0 0 92px; overflow: hidden;
  background: linear-gradient(135deg, #f6ece2, #f0e2d5); border-radius: 13px;
}
.ad-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-thumb .ad-ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 26px; opacity: .5; }
.ad-thumb .ad-dur {
  position: absolute; right: 5px; bottom: 5px; padding: 2px 5px;
  font-size: 10px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .58); border-radius: 6px;
}
.ad-thumb .ad-kind {
  position: absolute; left: 5px; top: 5px; padding: 2px 6px; font-size: 10px; font-weight: 700;
  color: #fff; background: rgba(249, 89, 1, .88); border-radius: 6px;
}
.ad-meta { flex: 1; min-width: 0; }
.ad-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; margin-bottom: 6px;
  font-size: 10.5px; font-weight: 700; color: #fff; border-radius: 999px;
}
.ad-t {
  margin: 0; font-size: 13.5px; font-weight: 700; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-d {
  margin: 5px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--text2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ad-stat { display: flex; gap: 9px; margin-top: 7px; flex-wrap: wrap; }
.ad-stat span { font-size: 11px; color: #9b8271; }
.ad-stat span b { color: var(--primary); font-weight: 700; }

/* 进度（渐近，不假造终态） */
.ad-prog { margin-top: 11px; }
.ad-prog-top { display: flex; align-items: center; font-size: 11.5px; color: #8a6f5c; }
.ad-prog-top b { margin-left: auto; color: var(--primary); font-weight: 700; }
.ad-bar { height: 6px; margin-top: 7px; background: #f5e9de; border-radius: 999px; overflow: hidden; }
.ad-bar i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--grad); transition: width .5s ease;
}
.ad-bar i.sk { width: 32%; animation: adSk 1.25s ease-in-out infinite; }
@keyframes adSk {
  0% { margin-left: -32%; } 100% { margin-left: 100%; }
}

/* 动作按钮组 */
.ad-acts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.ad-acts a, .ad-acts button {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 11px; font-size: 12px; font-weight: 700; text-decoration: none;
  color: #7a3d12; background: #fff4ea; border: 1px solid #fbdcc2; border-radius: 11px; cursor: pointer;
  transition: background .16s, transform .1s;
}
.ad-acts a:hover, .ad-acts button:hover { background: #ffe9d6; }
.ad-acts a:active, .ad-acts button:active { transform: scale(.98); }
.ad-acts a.primary, .ad-acts button.primary {
  color: #fff; background: var(--grad); border-color: transparent;
  box-shadow: 0 10px 20px -12px rgba(249, 89, 1, .8);
}
.ad-acts a.ghost2, .ad-acts button.ghost2 { color: #6f5747; background: #fbf7f4; border-color: #f0e3d8; }

/* 文案区 */
.ad-script { margin-top: 11px; border-top: 1px dashed #f0e2d5; padding-top: 10px; }
.ad-script summary {
  font-size: 12px; font-weight: 700; color: #8a6f5c; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 5px;
}
.ad-script summary::-webkit-details-marker { display: none; }
.ad-script summary::after { content: '▾'; margin-left: auto; font-size: 11px; color: #c3ac9b; }
.ad-script[open] summary::after { content: '▴'; }
.ad-script p {
  margin: 9px 0 0; padding: 11px; font-size: 12.5px; line-height: 1.85; color: #5b4636;
  white-space: pre-wrap; word-break: break-word; background: #fbf8f5; border-radius: 11px;
  max-height: 320px; overflow: auto;
}

/* 图集 */
.ad-imgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 11px; }
.ad-imgs a { position: relative; padding-top: 100%; border-radius: 10px; overflow: hidden; background: #f5ece4; }
.ad-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 素材包 */
.ad-kit {
  margin-top: 12px; padding: 12px; border-radius: 15px;
  background: linear-gradient(180deg, #fffaf5, #fff5ec); border: 1px solid #f8e2cf;
}
.ad-kit h4 { margin: 0 0 9px; font-size: 12.5px; font-weight: 800; color: #8a4a14; display: flex; align-items: center; gap: 6px; }
.ad-kit .ad-kf { margin-bottom: 9px; }
.ad-kit .ad-kf:last-child { margin-bottom: 0; }
.ad-kit .ad-kf b { display: block; font-size: 11px; font-weight: 700; color: #b07a48; margin-bottom: 3px; }
.ad-kit .ad-kf div { font-size: 12.5px; line-height: 1.75; color: #4f3a2a; white-space: pre-wrap; }
.ad-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ad-tags span {
  padding: 3px 8px; font-size: 11px; font-weight: 600; color: #a4510a;
  background: #fff0e0; border: 1px solid #fbdcbd; border-radius: 999px;
}
.ad-warn {
  margin-top: 9px; padding: 8px 10px; font-size: 11.5px; line-height: 1.6;
  color: #a8500a; background: #fff6e8; border: 1px solid #fadfae; border-radius: 10px;
}
.ad-copy { margin-left: 4px; }

/* 失败卡 */
.ad-fail { display: flex; gap: 9px; align-items: flex-start; }
.ad-fail .ad-fi { font-size: 17px; line-height: 1.2; }
.ad-fail p { margin: 0; flex: 1; font-size: 12.5px; line-height: 1.7; color: #8a4b4b; }
.ad-fail button {
  margin-top: 9px; padding: 7px 12px; font-size: 12px; font-weight: 700; color: #fff;
  background: #ef8f8f; border: 0; border-radius: 10px; cursor: pointer;
}

/* 空态 / 历史 */
.ad-empty { padding: 26px 18px; text-align: center; font-size: 12.5px; color: var(--text2); }
.ad-hist { padding: 0 16px 30px; }
.ad-hist summary {
  display: flex; align-items: center; gap: 6px; padding: 12px 14px; font-size: 13px; font-weight: 700;
  color: #7a5a41; background: #fff; border: 1px solid #f4e9df; border-radius: 15px; cursor: pointer;
}
.ad-hist summary::-webkit-details-marker { display: none; }
.ad-hist summary::after { content: '▾'; margin-left: auto; font-size: 11px; color: #c3ac9b; }
.ad-hist[open] summary::after { content: '▴'; }
.ad-hitems { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ad-hitem {
  display: flex; gap: 9px; align-items: center; padding: 9px;
  background: #fff; border: 1px solid #f4e9df; border-radius: 13px; cursor: pointer;
}
.ad-hitem img { width: 46px; height: 46px; flex: 0 0 46px; object-fit: cover; border-radius: 9px; background: #f5ece4; }
.ad-hitem .ad-ht { flex: 1; min-width: 0; }
.ad-hitem .ad-ht b {
  display: block; font-size: 12.5px; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad-hitem .ad-ht span { font-size: 11px; color: var(--text2); }

/* 覆盖：hidden 会被 display:flex/grid 盖掉，必须显式兜住 */
.ad-wall[hidden], .ad-list[hidden], .ad-inbox[hidden], .ad-empty[hidden],
.ad-kit[hidden], .ad-prog[hidden], .ad-imgs[hidden], .ad-acts[hidden] { display: none !important; }

/* toast */
.ad-toast {
  position: fixed; left: 50%; bottom: 84px; z-index: 9999;
  max-width: 82vw; padding: 10px 16px; transform: translateX(-50%) translateY(8px);
  font-size: 13px; color: #fff; background: rgba(43, 26, 16, .94);
  border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.ad-toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------------------------------------------------------------- 内嵌播放器（移动端存相册的主路径） */
.ad-player { margin-top: 11px; }
.ad-player video {
  width: 100%; max-height: 400px; display: block; background: #000;
  border-radius: 14px; box-shadow: 0 8px 22px -14px rgba(60, 30, 10, .55);
}
.ad-player-tip { display: block; margin-top: 7px; font-size: 11.5px; line-height: 1.6; color: #9b8271; }

/* 微信内置浏览器的一次性引导（点之前就说清楚，别让用户白点） */
.ad-wxtip {
  margin: 0 16px 12px; padding: 11px 13px;
  font-size: 12px; line-height: 1.75; color: #8a4b0f;
  background: #fff7e8; border: 1px solid #f7dfae; border-radius: 13px;
}
.ad-wxtip b { color: #a4540a; }

/* ---------------------------------------------------------------- 图集多选（对齐同行：单选/多选/全选 → 批量存相册） */
.ad-gal { margin-top: 11px; }
.ad-gal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.ad-gal-n { font-size: 12px; font-weight: 600; color: var(--text2); }
.ad-gal-all {
  margin-left: auto; padding: 5px 10px; font-size: 11.5px; font-weight: 600;
  color: #8a6f5c; background: #fbf4ee; border: 1px solid #f2e4d8; border-radius: 9px; cursor: pointer;
}
.ad-gal-all:active { transform: scale(.97); }
.ad-gal-save {
  padding: 6px 13px; font-size: 11.5px; font-weight: 700; color: #fff;
  background: var(--grad); border: 0; border-radius: 9px; cursor: pointer;
  box-shadow: 0 8px 16px -10px rgba(249, 89, 1, .9);
}
.ad-gal-save:disabled { filter: grayscale(.5); opacity: .6; }
.ad-gal .ad-imgs { margin-top: 0; }
.ad-img {
  position: relative; display: block; padding-top: 100%;
  border-radius: 10px; overflow: hidden; background: #f5ece4;
}
.ad-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .16s; }
.ad-img:not(.sel) img { opacity: .42; }
.ad-img .ad-ck {
  position: absolute; right: 5px; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 255, 255, .82); border: 1.5px solid rgba(255, 255, 255, .95);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22); transition: background .16s, border-color .16s;
}
.ad-img.sel .ad-ck { background: #22b573; border-color: #22b573; }
.ad-img.sel .ad-ck::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff;
}

/* 历史条目：已过期的那条降透明度 + 占位块 */
.ad-hitem.off { opacity: .62; }
.ad-hph { width: 46px; height: 46px; flex: 0 0 46px; background: #f5ece4; border-radius: 9px; }

/* 运营工具网格里的图标卡：这个名字比别的卡多一个字，手机窄屏会折成两行
   （其余卡都是 4~6 字一行，折行会显得整格不齐）→ 单独收一点字号 + 禁止折行。
   只作用于这一张卡，不碰 style.css 里共享的 .func-name。 */
#view-ops .func-card[data-action="alldl"] .func-name {
  font-size: 12.5px;
  white-space: nowrap;
  letter-spacing: -.2px;
}
