/* TsRank 样式
   纸面灰底 + 墨色文字 + 荧光笔黄只用在“当前所在”和“第一名”上
   数字 编号 名次用 Archivo（窄体粗字 像榜单） 中文用系统字体 */

@font-face {
  font-family: 'Archivo';
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212;
}

:root {
  --paper: #eef0f3; --surface: #fff; --ink: #1c1e24; --ink-2: #3a3d46; --muted: #6b707c; --faint: #a0a5b0;
  --line: #dcdfe5; --line-2: #e8eaee; --marker: #ffd84d; --marker-weak: #fff4c7;
  --ok: #0f8a5f; --danger: #d64545; --warn: #8f5f00;
  --sans: 'Archivo', "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --num: 'Archivo', "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", monospace;
  --radius: 12px;
  /* 荧光笔：文字下半截的黄色 */
  --hl: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 90%, transparent 90%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font: 14px/1.6 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
code, .mono { font-family: var(--mono); font-size: .95em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 650; }
h3 { margin: 28px 0 6px; font-size: 15px; font-weight: 650; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; margin: 0 0 8px; }
.muted { color: var(--muted); }
.err { color: var(--danger); min-height: 22px; margin: 6px 0; }
.warn { color: var(--warn); margin: 6px 0; }
.ok { color: var(--ok); font-weight: 500; }
.ok code { color: var(--ink); }

/* ---------- 顶栏 ---------- */
header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  height: 56px; padding: 0 28px; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--num); font-weight: 750; font-stretch: 90%; font-size: 17px; letter-spacing: -.2px; color: var(--ink); }
.brand img { display: block; border-radius: 6px; }
.beta { font-size: 10px; font-weight: 600; font-stretch: 100%; letter-spacing: .2px; line-height: 14px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); align-self: flex-start; margin-top: 1px; }
.nav { display: flex; align-items: stretch; height: 100%; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 500; text-decoration: none; flex: none; }
.nav a:hover { color: var(--ink); }
.nav a span { padding: 0 2px; background: var(--hl) no-repeat left / 0 100%; transition: background-size .3s ease; }
.nav a.cur span { background-size: 100% 100%; }
.account { position: relative; flex: none; }
.avatar { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.avatar:hover { background: var(--ink-2); color: #fff; }
.menu {
  position: absolute; right: 0; top: 42px; width: 200px; padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(28,30,36,.12); animation: drop .16s ease-out;
}
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 8px; }
.menu-who span { color: var(--muted); font-size: 12px; }
.menu button { display: block; width: 100%; height: 34px; text-align: left; border: 0; background: none; padding: 0 10px; border-radius: 6px; }
.menu button:hover { background: var(--paper); color: var(--ink); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }

main { max-width: 960px; margin: 28px auto 48px; padding: 0 28px; }
main.wide { max-width: 1280px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* ---------- 表单元素 ---------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; outline: none;
}
input, select { height: 34px; padding: 0 12px; }
select { padding: 0 8px; }
textarea { padding: 8px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28,30,36,.08); }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; accent-color: var(--ink); }
input:disabled { background: var(--paper); color: var(--faint); }
button {
  font: inherit; height: 34px; padding: 0 16px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
button:hover { border-color: var(--ink); }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 500; }
button.primary:hover { background: var(--ink-2); }
button.small { height: 28px; padding: 0 10px; font-size: 13px; }
button.link { height: auto; padding: 2px 8px; border: 0; background: none; color: var(--ink-2); border-radius: 4px; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.link:hover { background: var(--paper); text-decoration-color: var(--ink); }
button.link.danger { color: var(--danger); }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); cursor: pointer; user-select: none; }

/* ---------- 登录 ---------- */
.login { max-width: 340px; margin: 18vh auto 0; display: grid; gap: 12px; }
.login h1 { margin: 0; }
.login h1 .brand { font-size: 30px; gap: 10px; }
.login h1 .brand img { width: 36px; height: 36px; border-radius: 9px; }
.login-sub { margin: -4px 0 12px; color: var(--muted); }
.login input[type=password] { width: 100%; height: 42px; font-size: 15px; }
.login button.primary { height: 42px; }
.login .err { margin: 0; min-height: 20px; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.toolbar .grow { flex: 1; }
.search { width: 220px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 26px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: #fff; font-weight: 500; }
.seg.plats button:not(:first-child) { width: 34px; padding: 0; display: inline-grid; place-items: center; }
.seg.plats img { display: block; width: 16px; height: 16px; }
.seg button.on img[src*="/x.svg"], .seg button.on img[src*="/tiktok.svg"] { filter: invert(1); }
.tool { height: 34px; }
button.tool { padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; }
button.dir { min-width: 92px; justify-content: center; }
.filter { position: relative; }
.filter .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.pop {
  position: absolute; z-index: 15; top: 40px; left: 0; width: 230px; padding: 14px; display: grid; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(28,30,36,.12); animation: drop .16s ease-out;
}
.pop label:not(.check) { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pop select { width: 100%; }

.tile-sub b { color: var(--ink-2); font-weight: 600; font-family: var(--num); }

/* ---------- 平铺 ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; }
.tiles > .empty { grid-column: 1 / -1; }
.tile { cursor: pointer; min-width: 0; border-radius: 8px; }
.tile-img { position: relative; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--line-2); }
.tile-img > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-img > .material-cover { height: 100%; }
.tile:hover .tile-img { box-shadow: 0 0 0 2px var(--ink); }
.tile.nodata .tile-img > img { filter: grayscale(.6); opacity: .75; }
.picons { position: absolute; left: 8px; bottom: 8px; display: inline-flex; gap: 5px; padding: 4px 6px; border-radius: 6px; background: rgba(255,255,255,.94); }
.picons img { display: block; }
.tile-info { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 8px; padding-top: 9px; }
.tile-info .rn { grid-row: span 2; align-self: start; }
.rn { font-family: var(--num); font-weight: 800; font-stretch: 72%; font-size: 26px; line-height: 1; letter-spacing: -.5px; min-width: 1ch; }
.tile-code { font-family: var(--num); font-weight: 650; font-size: 13.5px; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-sub { grid-column: 2 / 4; margin-top: 1px; color: var(--muted); font-size: 12px; display: flex; gap: 10px; overflow: hidden; white-space: nowrap; }
.tile-val { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.tile-val b { font-family: var(--num); font-weight: 700; font-size: 17px; line-height: 1.2; }
.tile-val span { color: var(--muted); font-size: 11px; }

/* ---------- 榜单 ---------- */
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { text-align: left; padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--line); }
td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td.num, th.num { text-align: right; white-space: nowrap; font-family: var(--num); }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.rank-table { table-layout: auto; min-width: 980px; }
.rank-table td, .rank-table th { padding: 8px 12px; white-space: nowrap; }
.rank-table tbody tr:last-child td { border-bottom: 0; }
.rank-table th.sortable { cursor: pointer; user-select: none; }
.rank-table th.sortable:hover, .rank-table th.on { color: var(--ink); }
.rank-table td.on { background: rgba(255,216,77,.13); font-weight: 600; }
.rank-table .rn { font-size: 18px; }
.rank-table .rn.top { background: var(--hl); padding: 0 3px; }
.rank-table .picons { position: static; background: none; padding: 0; }
.rrow { cursor: pointer; }
.rrow:hover td { background: #fafbfc; }
.rrow:hover td.on { background: rgba(255,216,77,.2); }
.code { font-family: var(--num); font-weight: 650; }
.sub-title { color: var(--muted); font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.empty { padding: 72px 0; text-align: center; color: var(--muted); }
.empty.small { padding: 28px 0; font-size: 13px; }
.foot-note { margin: 26px 0 0; color: var(--faint); font-size: 12px; text-align: center; }
.list-area.loading { opacity: .5; transition: opacity .2s; }

/* ---------- 对话框 / 抽屉 ---------- */
dialog { width: min(560px, 92vw); border: 0; border-radius: var(--radius); padding: 24px; color: var(--ink); box-shadow: 0 20px 60px rgba(28,30,36,.25); }
dialog::backdrop { background: rgba(28,30,36,.32); }
.rank-status-tag { display: inline-block; padding: 1px 6px; border-radius: 8px; background: #fff1c9; color: #684600; font-size: 11px; white-space: nowrap; }
.rank-status-tag.normal { background: var(--paper); color: var(--muted); }
.rank-table .rank-status-tag { margin-left: 6px; }
.rank-status-form { display: grid; gap: 10px; }
.rank-status-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.rank-status-form .rank-status-actions { justify-content: flex-end; }
.rank-doubts { margin-top: 20px; }
.rank-doubts:empty { display: none; }
.rank-doubts summary { cursor: pointer; }
.rank-hidden-row, .rank-warning-row { display: flex; align-items: center; gap: 8px; }
.rank-hidden-row { margin-top: 6px; }
.rank-warning-row .hot-row { flex: 1; min-width: 0; }
.rank-warning-row button { flex: none; }
.checkout-missing { color: var(--muted); font-size: 11px; font-weight: 500; }
.checkout-amount u { text-decoration: underline dotted; text-underline-offset: 3px; }
dialog label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
dialog label input { display: block; width: 100%; margin-top: 4px; }
dialog input[type=password] { width: 100%; margin-bottom: 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.dlg-actions .grow { flex: 1; }

dialog.drawer {
  inset: 0 0 0 auto; margin: 0; width: min(580px, 100vw); height: 100dvh; max-height: 100dvh;
  border-radius: 16px 0 0 16px; padding: 28px 28px 40px; overflow-y: auto; animation: slide .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer .x { position: absolute; top: 14px; right: 16px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); background: none; }
.drawer .x:hover { background: var(--paper); color: var(--ink); }
.detail-head { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: start; }
.detail-cover { aspect-ratio: 4 / 5; border-radius: 8px; }
.material-cover { position: relative; display: block; width: 100%; overflow: hidden; background: var(--line-2); }
.material-cover.thumb { width: 40px; height: 50px; border-radius: 5px; }
.material-cover > img { display: block; width: 100%; }
.tile-img > .material-cover > img, .pod-img .material-cover > img, .detail-cover > img, .material-cover.compact > img { height: 100%; object-fit: cover; }
.media-placeholder { display: grid; place-items: center; height: 100%; min-height: 120px; color: var(--muted); font-size: 12px; line-height: 1.35; text-align: center; white-space: nowrap; }
.media-placeholder small { display: block; font-size: 11px; }
.material-cover.compact .media-placeholder { min-height: 0; font-size: 9px; }
.material-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 40px; aspect-ratio: 1;
  border-radius: 50%; background: rgba(0, 0, 0, .64); color: #fff; font-size: 12px; pointer-events: none;
}
.material-play::before { content: ''; border-block: .55em solid transparent; border-left: .85em solid currentColor; margin-left: .18em; }
.material-cover.compact .material-play { width: 50%; font-size: 7px; }
.meta-enlarge { display: block; width: 100%; height: auto; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.meta-enlarge:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.meta-media-details { margin-block: 12px; }
.meta-media-details p { margin-block: 0 8px; }
.meta-preview-dialog { width: min(900px, calc(100% - 32px)); }
.meta-preview-dialog .material-cover > img { max-height: 65vh; object-fit: contain; }
.meta-lightbox { width: min(900px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 58px 16px 16px; }
.meta-lightbox > :is(img, video) { display: block; width: 100%; max-height: min(75dvh, calc(100dvh - 180px)); object-fit: contain; }
.meta-lightbox .dlg-actions { align-items: center; }
.meta-lightbox .dlg-actions .hint { margin: 0 auto 0 0; }
.meta-lightbox .dlg-actions button { flex: none; min-width: 76px; height: 36px; }
.meta-lightbox button:disabled { opacity: .55; cursor: default; }
.meta-lightbox-x { position: absolute; inset: 8px 8px auto auto; width: 36px; height: 36px; padding: 0; font-size: 24px; line-height: 1; }
.detail-meta { display: grid; gap: 4px; justify-items: start; padding-top: 4px; }
.detail-meta .hint { margin: 0; }
.detail-meta button { margin-top: 8px; }
.detail-code { font-family: var(--num); font-weight: 800; font-stretch: 85%; font-size: 32px; line-height: 1.1; letter-spacing: -.3px; }
.detail-title { font-size: 15px; color: var(--ink-2); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; margin: 22px 0 8px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics b { display: block; font-family: var(--num); font-weight: 700; font-size: 22px; letter-spacing: -.3px; line-height: 1.2; }
.metrics span { color: var(--muted); font-size: 12px; }
.creative { margin: 14px 0; }
details summary { cursor: pointer; margin-bottom: 8px; font-weight: 500; }
.prompt { white-space: pre-wrap; background: var(--paper); border-radius: 8px; padding: 10px 12px; font-size: 13px; max-height: 220px; overflow: auto; }
.detail-ads h3 { margin-top: 22px; }
.group { margin: 18px 0 4px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.sub { margin: 8px 0 2px; color: var(--muted); font-size: 12px; }
table.mini { table-layout: fixed; }
table.mini td { padding: 7px 6px; font-size: 13px; }
table.mini td.num { width: 92px; }
table.mini td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skeleton { height: 220px; border-radius: 10px; background: linear-gradient(90deg, var(--paper) 25%, #f7f8fa 50%, var(--paper) 75%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- 管理面板 ---------- */
.add { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.add input[name=name] { width: 200px; }
.add input[name=prefix] { width: 100px; text-transform: uppercase; }
col.c-name { width: 30%; } col.c-prefix { width: 12%; } col.c-state { width: 14%; }
tbody tr:hover { background: #fafbfc; }
tr.off td:not(:last-child) { color: var(--muted); }
td.actions { text-align: right; white-space: nowrap; }
td input { width: 100%; height: 30px; }
.badge { display: inline-block; padding: 0 8px; margin-left: 8px; border-radius: 10px; font-size: 12px; line-height: 20px; background: var(--marker-weak); color: var(--ink); }
.badge.gray { background: var(--paper); color: var(--muted); }
.badge.green { background: #e3f6ee; color: var(--ok); margin-left: 0; }
.keybox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; padding: 12px 14px; background: var(--marker-weak); border: 1px solid #f0d77a; border-radius: 8px; }
.keybox code { font-size: 15px; letter-spacing: .5px; user-select: all; }
.fxrow { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.fxrow input { width: 120px; }

/* ---------- 我的素材 ---------- */
.form { display: grid; gap: 12px; max-width: 560px; margin-bottom: 8px; }
.form label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.form input, .form textarea { width: 100%; font-size: 14px; }
details > label { margin-bottom: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigdrop {
  border: 1.5px dashed #c3c8d1; border-radius: 14px; padding: 40px 20px; text-align: center; cursor: pointer;
  background: var(--surface);
}
.bigdrop:hover { border-color: var(--ink); }
.bigdrop-t { font-size: 20px; font-weight: 650; margin-bottom: 6px; }
.bigcode { font-family: var(--num); font-size: 22px; font-weight: 750; letter-spacing: .2px; color: var(--ink); cursor: pointer; }
.bigcode:hover { background: var(--hl); }
.code-row { display: flex; align-items: center; gap: 8px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.recent-head h2 { margin: 0; }
.recent { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.rc { display: flex; align-items: center; gap: 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; animation: drop .2s ease-out; }
.rc.bad { border-color: #f2c4c4; background: #fdf5f5; color: var(--danger); }
.rc-img { width: 40px; height: 50px; object-fit: cover; border-radius: 5px; background: var(--line-2); }
.rc-main { flex: 1; min-width: 0; }
.rc-status { display: flex; align-items: center; gap: 12px; }
.rc-name { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tiles.mine .tile { cursor: default; }
.tiles.mine .tile-img { cursor: pointer; }
.tiles.mine .tile-info { display: block; }
.tiles.mine .bigcode { font-size: 18px; }
.overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(28,30,36,.9); color: #fff; border: 3px dashed var(--marker); }
.overlay .big { font-size: 32px; font-weight: 650; margin-bottom: 8px; }

/* ---------- 报表 / 广告 ---------- */
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.plat img { display: block; }
.tabs { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs button.on img[src*="/x.svg"], .tabs button.on img[src*="/tiktok.svg"] { filter: invert(1); }
.hintbox { background: var(--paper); border-radius: 8px; padding: 12px 16px; margin: 8px 0 16px; font-size: 13px; }
.hintbox ul { margin: 6px 0 0; padding-left: 20px; }
.hintbox li { margin: 2px 0; }
.drop { border: 1.5px dashed #c3c8d1; border-radius: 10px; padding: 18px; text-align: center; color: var(--muted); background: var(--surface); }
.drop.over { border-color: var(--ink); background: var(--marker-weak); }
.drop.big { padding: 36px 20px; cursor: pointer; margin: 8px 0 4px; }
.drop.big:hover { border-color: var(--ink); }
.drop-t { font-size: 18px; font-weight: 650; color: var(--ink); margin-bottom: 4px; pointer-events: none; }
.guide-tabs { margin-bottom: 10px; }
.guide-tabs button { height: 30px; }
.sum { display: flex; gap: 24px; flex-wrap: wrap; margin: 12px 0; }
.sum b { display: block; font-family: var(--num); font-size: 20px; }
.sum span { color: var(--muted); font-size: 12px; }
.list { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.list div { padding: 6px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.list div:last-child { border-bottom: 0; }
table.wide { table-layout: auto; }
.chip { display: inline-block; padding: 0 8px; margin-right: 4px; border-radius: 10px; font-size: 12px; line-height: 20px; background: var(--marker-weak); color: var(--ink); }
.chip.claim { background: #e3f6ee; color: var(--ok); }


/* ---------- 窄屏 ---------- */
@media (max-width: 1000px) {
}
@media (max-width: 700px) {
  header { padding: 0 16px; gap: 12px; }
  main { padding: 0 16px; margin-top: 20px; }
  .search { width: 100%; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 12px; }
  .rank-table .material-name .code { max-width: min(180px, 46vw); overflow: hidden; text-overflow: ellipsis; }
  .detail-head { grid-template-columns: 110px 1fr; }
  .meta-lightbox .dlg-actions button, .meta-lightbox-x { height: 44px; }
  .meta-lightbox-x { width: 44px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  dialog.drawer { border-radius: 0; padding: 24px 18px 36px; }
  .row2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 小动效：只在有操作时出现 ---------- */
/* 分段按钮：黑色滑块滑到选中项 */
.seg.slide { position: relative; }
.seg-ind { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 6px; background: var(--ink); opacity: 0;
  transition: transform .32s cubic-bezier(.3,1.3,.5,1), width .32s cubic-bezier(.3,1.3,.5,1); }
.seg-ind.ready { opacity: 1; }
.seg.slide button { position: relative; z-index: 1; transition: color .2s; }
.seg.slide button.on { background: none; }
.seg.slide img { transition: filter .2s, transform .2s; }
.seg.slide button:active img { transform: scale(.86); }
/* 按下时轻微回弹 */
button { transition: transform .12s ease, border-color .15s, background-color .15s, color .15s; }
button:active { transform: scale(.96); }
.seg button:active { transform: none; }
/* 排序方向：箭头翻转 */
button.dir { gap: 4px; }
.arrow { display: inline-block; transition: transform .3s cubic-bezier(.3,1.3,.5,1); }
.arrow.up { transform: rotate(180deg); }
/* 筛选有改动时的小圆点 */
.filter .dot:not([hidden]) { animation: popin .3s cubic-bezier(.3,1.6,.5,1); }
@keyframes popin { from { transform: scale(0); } }
.pop .field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.pop .field .seg { justify-self: start; }

/* ---------- 悬浮顶栏 ---------- */
header {
  top: 12px; width: calc(100% - 32px); max-width: 1240px; margin: 12px auto 0; height: 52px; padding: 0 10px 0 16px;
  border: 1px solid rgba(220,223,229,.9); border-radius: 14px; background: rgba(255,255,255,.78);
  backdrop-filter: saturate(170%) blur(14px); -webkit-backdrop-filter: saturate(170%) blur(14px);
  box-shadow: 0 2px 10px rgba(28,30,36,.04); transition: box-shadow .25s, background-color .25s;
}
header.scrolled { background: rgba(255,255,255,.9); box-shadow: 0 10px 30px rgba(28,30,36,.10); }
.nav { height: auto; gap: 2px; }
.nav a { height: 34px; border-radius: 8px; transition: background-color .15s, color .15s; }
.nav a:hover { background: var(--paper); }
main { margin-top: 24px; }
@media (max-width: 700px) {
  header { top: 8px; width: calc(100% - 16px); margin-top: 8px; padding: 0 8px 0 12px; }
}

/* 切换筛选后素材依次浮现（搜索打字时不播） */
.list-area.reveal .tile, .list-area.reveal .pod, .list-area.reveal .rrow {
  animation: floatIn .45s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--k, 0) * 28ms);
}
@keyframes floatIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 前缀字母格 ---------- */
.pfx { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: text; vertical-align: middle; }
.pfx-real { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; padding: 0; caret-color: transparent; cursor: text; }
.pfx-cells { display: inline-flex; gap: 6px; pointer-events: none; }
.pfx-cell {
  width: 44px; height: 50px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface);
  font-family: var(--num); font-weight: 750; font-size: 22px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.pfx-cell.filled { border-color: #b9bec8; }
.pfx-cell.cur { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28,30,36,.08); }
.pfx-cell.cur:empty::after { content: ""; width: 2px; height: 22px; background: var(--ink); animation: blink 1s steps(1) infinite; }
.pfx-cell.extra { animation: cellIn .22s cubic-bezier(.3,1.4,.5,1); }
.pfx-dash { font-family: var(--num); font-weight: 750; font-size: 22px; color: var(--muted); pointer-events: none; }
.pfx.small .pfx-cell { width: 32px; height: 34px; font-size: 16px; border-radius: 7px; }
.pfx.small .pfx-cell.cur:empty::after { height: 16px; }
.pfx.small .pfx-dash { font-size: 16px; }
.pfx.disabled { opacity: .45; pointer-events: none; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes cellIn { from { opacity: 0; transform: scale(.6); } }
.field-label { color: var(--muted); font-size: 13px; margin: 10px 0 6px; }

/* ---------- 产品导览 ---------- */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour.leaving { opacity: 0; transition: opacity .25s; }
.tour-block { position: absolute; inset: 0; pointer-events: auto; }
/* 高亮框：外面一圈超大阴影把其余部分压暗 */
.tour-spot {
  position: fixed; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(20,22,28,.58), 0 0 0 2px #fff inset;
  transition: top .42s cubic-bezier(.3,.9,.3,1), left .42s cubic-bezier(.3,.9,.3,1), width .42s cubic-bezier(.3,.9,.3,1), height .42s cubic-bezier(.3,.9,.3,1);
}
.tour-spot.pulse::after { content: ""; position: absolute; inset: -2px; border-radius: 12px; border: 2px solid #fff; animation: ring .9s ease-out .1s both; }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
.tour-pop {
  position: fixed; width: min(320px, calc(100vw - 24px)); padding: 16px 16px 12px; pointer-events: auto;
  background: var(--surface); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.28);
  transition: top .42s cubic-bezier(.3,.9,.3,1), left .42s cubic-bezier(.3,.9,.3,1), opacity .2s, transform .2s;
}
.tour-pop.moving { opacity: 0; transform: translateY(6px); }
.tour-arrow { position: absolute; width: 14px; height: 14px; background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.tour-pop[data-side=bottom] .tour-arrow { top: -6px; }
.tour-pop[data-side=top] .tour-arrow { bottom: -6px; }
.tour-pop[data-side=inside] .tour-arrow { display: none; }
.tour-body { position: relative; }
.tour-title { font-weight: 650; font-size: 15px; margin-bottom: 4px; }
.tour-text { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; }
.tour-text b { color: var(--ink); font-weight: 700; }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tour-foot .grow { flex: 1; }
.tour-count { font-family: var(--num); font-size: 12px; color: var(--faint); }
.tour-foot button.link { color: var(--muted); font-size: 13px; padding: 2px 4px; }

/* ---------- 上传报表：待上传队列 ---------- */
.rq { margin: 14px 0 4px; }
.rq-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rq-head .grow { flex: 1; }
.rq-list { display: grid; gap: 10px; }
.rq-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); animation: drop .2s ease-out; }
.rq-item.ask { border-color: #f0d77a; background: var(--marker-weak); }
.rq-item.error { border-color: #f2c4c4; background: #fdf5f5; }
.rq-item.done { background: #f6fbf8; border-color: #cfe9dc; }
.rq-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rq-top .grow { flex: 1; }
.rq-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.rq-top .hint { margin: 0; }
.rq-top .x { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; line-height: 1; }
.rq-top .x:hover { background: var(--paper); color: var(--ink); }
.rq-item .sum { margin: 10px 0 6px; }
.rq-item details { margin: 4px 0 10px; font-size: 13px; }
.rq-item details summary { color: var(--muted); font-weight: 400; }
.rq-ask { margin-top: 8px; }
.rq-item .ok { margin-top: 6px; }
.rq-item a { color: var(--ink); font-size: 13px; } .rq-head .hint { margin: 0; } .err-t { color: var(--danger) !important; }
.rq-links { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
a.btnlink { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--ink); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 500; }
a.btnlink:hover { background: var(--ink-2); }

/* ---------- 前三名卡片：名次和编号一行 主指标 四项小指标 ---------- */
:root { --good: #0f8a5f; --good-bg: #e6f6ee; --bad: #c2570c; --bad-bg: #fdf0e6; }
/* ROAS 回本绿 没回本橙 */
b.good { color: var(--good); }
b.bad { color: var(--bad); }

/* ---------- 下拉选择 ---------- */
.dd { position: relative; display: inline-block; }
.dd-btn { min-width: 120px; justify-content: space-between; gap: 10px; }
.dd-chev { width: 8px; height: 8px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; opacity: .6; }
.dd.open .dd-chev { transform: translateY(2px) rotate(-135deg); }
.dd.open .dd-btn { border-color: var(--ink); }
.dd-menu {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 320px; overflow: auto; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(28,30,36,.14); animation: drop .16s ease-out;
}
.dd-opt { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 34px; padding: 0 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.dd-opt.active { background: var(--paper); color: var(--ink); }
.dd-opt.on { color: var(--ink); font-weight: 600; }
.dd-check { width: 10px; height: 6px; }
.dd-opt.on .dd-check { border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg) translateY(-2px); }
.pop .dd, .pop .dd-btn { width: 100%; }

/* 前缀格下方的提示 */
.pfx-msg { position: absolute; left: 0; top: calc(100% + 4px); font-size: 12px; white-space: nowrap; pointer-events: none; color: var(--muted); }
.pfx-msg.bad { color: var(--danger); }
.pfx-msg.ok { color: var(--ok); }
.pfx.shake .pfx-cells { animation: shake .32s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.add { padding-bottom: 14px; }

/* ---------- 我的广告：平台页签 + 可折叠的系列和广告组 ---------- */
.tabs button { display: inline-flex; align-items: center; gap: 6px; }
.tab-n { font-family: var(--num); font-size: 12px; opacity: .6; }
.tab-un { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fde9d4; color: #b4570b; font-size: 11px; line-height: 18px; text-align: center; font-family: var(--num); }
.tabs button.on .tab-un { background: rgba(255,255,255,.2); color: #fff; }
.fold-tools { display: flex; align-items: center; gap: 14px; margin: 10px 0 6px; }
.fold-tools .grow { flex: 1; }
.folds { display: grid; gap: 8px; }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ''; flex: none; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(-45deg); transition: transform .18s; margin: 0 4px 0 2px; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold-t { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold-m { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; color: var(--muted); font-size: 12px; }
.fold-spend { font-family: var(--num); color: var(--ink-2); }
.fold.camp { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--surface); }
.fold.camp > summary { padding: 12px 0; }
.fold.camp[open] > summary { border-bottom: 1px solid var(--line-2); }
.fold.grp { margin: 6px 0 2px; }
.fold.grp > summary { padding: 8px 0; color: var(--ink-2); font-size: 13px; }
.fold.grp > summary .fold-t { font-weight: 400; }
.fold.camp > table { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .fold > summary::before { transition: none; } }

/* ---------- 页脚：直接放在页面底色上 不做深色块 ---------- */
.foot-note.notes { display: grid; gap: 2px; }
.foot-note.notes p { margin: 0; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
footer.site { position: relative; overflow: hidden; flex: none; width: calc(100% - 32px); max-width: 1240px; margin: 48px auto 0; color: var(--muted); font-size: 12px; }
.sf-top, .sf-bottom { display: flex; align-items: center; gap: 18px; }
.sf-top { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sf-top .grow, .sf-bottom .grow { flex: 1; }
.sf-live { display: inline-flex; align-items: center; gap: 8px; }
.sf-live i { width: 7px; height: 7px; border-radius: 50%; background: #2fbf86; box-shadow: 0 0 0 0 rgba(47,191,134,.5); animation: sfPulse 2.4s ease-out infinite; }
@keyframes sfPulse { 70% { box-shadow: 0 0 0 7px rgba(47,191,134,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,134,0); } }
.sf-link { height: auto; padding: 0; border: 0; background: none; color: var(--muted); font-size: 12px; }
.sf-link:hover { color: var(--ink); background: none; }
/* 大字标：和页面底色只差一点 像印在纸上 */
.sf-mark {
  margin: 10px 0 -.06em; font-family: var(--num); font-weight: 850; font-stretch: 75%; white-space: nowrap;
  font-size: clamp(44px, 12.4vw, 156px); line-height: 1; letter-spacing: -.03em; text-align: center; user-select: none;
  background: linear-gradient(180deg, #d3d7de 0%, rgba(211,215,222,.5) 60%, rgba(211,215,222,0) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sf-bottom { position: relative; padding: 0 0 18px; }
.sf-ver { font-family: var(--num); letter-spacing: .2px; color: var(--faint); }
@media (max-width: 700px) { footer.site { width: calc(100% - 16px); } .sf-ver { display: none; } }
@media (prefers-reduced-motion: reduce) { .sf-live i { animation: none; } }

/* ---------- 详情：类型标签 投放人 提示词 ---------- */
.kind-tag { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 0 8px; border-radius: 6px; font: 600 12px/22px var(--sans); letter-spacing: 0; background: var(--line-2); color: var(--ink-2); position: relative; top: -3px; }
.kind-tag.video { background: #e7eefc; color: #2f55b5; }
.kind-tag.image { background: #f3e9fb; color: #7a3db0; }
.material-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.material-name .kind-tag { flex: none; margin: 0; top: 0; padding-inline: 6px; font-size: 11px; line-height: 18px; }
.people { margin: 18px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--paper); display: grid; gap: 4px; font-size: 13px; }
.people-h { color: var(--muted); font-size: 12px; }
/* 折叠：标题一行带箭头；收起时后面列出所有人名（带各自颜色） */
details.people > summary { list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; user-select: none; font-weight: 400; }
details.people > summary::-webkit-details-marker { display: none; }
details.people > summary::after { content: ''; width: 7px; height: 7px; margin-left: auto; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform .18s; }
details.people[open] > summary { margin-bottom: 4px; }
details.people[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.people-names { display: none; gap: 6px; flex-wrap: wrap; }
details.people:not([open]) .people-names { display: inline-flex; }
.people-names i { font-style: normal; padding: 0 7px; border-radius: 999px; line-height: 20px; font-size: 12px; font-weight: 600;
  color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); }
.person { padding: 8px 0; }
.person + .person { border-top: 1px solid var(--line); }
.person-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.person-h .grow { flex: 1; }
.person-h b { font-family: var(--num); }
.person-h > b.person-name { font-family: var(--sans); font-size: 14px; color: var(--pc, var(--ink)); }
.person-h > b.person-name::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--pc, var(--ink)); vertical-align: 1px; }
/* 人名下面：平台图标 + 平台名 / 系列 · 组 */
.where { display: grid; gap: 6px; margin-top: 7px; }
.where-p { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: start; }
.where-p .plat { font-size: 12.5px; color: var(--ink-2); line-height: 20px; }
.where-c { display: grid; gap: 2px; min-width: 0; }
.where-c > div { display: flex; gap: 8px; min-width: 0; line-height: 20px; font-size: 12.5px; }
.where-camp { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.where-g { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.where-g::before { content: "组 "; color: var(--faint); }
.who { margin-right: 8px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--pc, var(--muted)); background: color-mix(in srgb, var(--pc, #6b707c) 12%, transparent); }
.prompt-box { margin: 18px 0 4px; }
.prompt-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.prompt-h b { font-size: 14px; }
.prompt-h .muted { font-size: 12px; }
.prompt-h .grow { flex: 1; }
.prompt-box .prompt { max-height: 260px; line-height: 1.7; }
.prompt-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.prompt-empty.ai { display: flex; align-items: center; gap: 10px; border-style: solid; border-color: #eadcf6; background: #faf6fd; }
.prompt-empty.ai b { flex: none; padding: 0 8px; border-radius: 6px; background: #7a3db0; color: #fff; font-size: 12px; line-height: 22px; }
.prompt-note { margin: 6px 0 0; font-size: 12px; }
.prompt-box textarea { width: 100%; font: inherit; line-height: 1.6; }
.prompt-act { display: flex; gap: 8px; }

/* 提示词编辑：生成模型 / 生图工具 */
.prompt-tool { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.prompt-tool .dd-btn { min-width: 170px; }
.dd-text.dd-ph { color: var(--faint); }
.bigdrop-act { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

/* 上传完的“下一步”提示条 */
.next-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: var(--marker-weak); border: 1px solid #f1dc8a; }
.next-bar .next-t { flex: 1; min-width: 240px; color: var(--ink-2); }
.next-bar .next-t b { color: var(--ink); margin-right: 4px; }

/* 我的广告：同名待选 */
tr.pending td { background: var(--marker-weak); }
.cands { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cands .hint { width: 100%; margin: 0; }
button.cand { display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 3px 8px 3px 3px; font-size: 12px; }
button.cand img { width: 26px; height: 32px; border-radius: 4px; object-fit: cover; display: block; }
.ad-cr b { font-weight: 600; color: var(--ink-2); }

/* 顶部可关闭公告（开发测试阶段提示） */
.site-notice { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); max-width: 1240px; margin: 12px auto 0; padding: 9px 12px 9px 14px; border-radius: 10px; background: var(--marker-weak); border: 1px solid #f1dc8a; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.site-notice .sn-t { flex: 1; }
.site-notice .sn-t b { color: var(--ink); margin-right: 8px; }
.site-notice .sn-x { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.site-notice .sn-x:hover { background: rgba(0,0,0,.07); }
.site-notice + main { margin-top: 14px; }
.folder-setting { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.folder-setting b { overflow-wrap: anywhere; }

/* 拉报表窗口（管理面板和排行页共用） */
.backfill-dialog { width: min(480px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--surface); }
.backfill-dialog h2 { margin-bottom: 14px; }
.backfill-dialog h2:focus { outline: none; }
.backfill-form { display: grid; gap: 14px; }
.backfill-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.backfill-fields label { display: grid; gap: 4px; margin: 0; min-width: 0; }
.backfill-fields :is(input, select) { margin: 0; width: 100%; min-width: 0; }
.backfill-dialog .backfill-check { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.backfill-check input { width: auto; margin: 0; }
.backfill-note { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.backfill-dialog > [role="status"] { margin-top: 12px; color: var(--ink-2); }
.backfill-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.backfill-actions button { min-height: 40px; font-weight: 600; }
.backfill-actions .backfill-stop { color: var(--danger); }
.backfill-actions button:disabled { background: var(--paper); border-color: var(--line); color: var(--muted); cursor: default; }
.backfill-progress { display: block; width: 100%; height: 6px; margin-top: 6px; accent-color: var(--ink); }
.backfill-footer { align-items: center; margin-top: 14px; }
.backfill-footer p { flex: 1; }
.backfill-footer button { flex: none; height: 40px; }
@media (max-width: 620px) {
  .backfill-dialog { padding: 16px; }
}

/* ===== 管理报表页 ===== */
.nav a .ads-badge, .nav a.cur .ads-badge { margin-inline-start: 6px; padding: 0 4px; background: #bd3038; background-size: auto; }
.report-head { margin-bottom: 14px; }
.report-steps { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 8px 0 12px; padding: 0; list-style: none; counter-reset: step; color: var(--muted); font-size: 13px; }
.report-steps li { counter-increment: step; }
.report-steps li::before { content: counter(step) ' '; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-inline-end: 6px; border-radius: 50%; background: var(--line-2); color: var(--ink); font: 600 11px/1 var(--num); }
.report-steps b { color: var(--ink); font-weight: 600; }
.report-tip { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 8px 12px; border-radius: 8px; background: var(--paper); font-size: 13px; }
.report-tip[hidden] { display: none; }
.report-tip span { flex: 1; }
.report-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.report-tabs .tab-badge { height: 16px; min-width: 16px; }
.report-desc { margin: 8px 0 0; }
.report-table-scroll { overflow-x: auto; }
section[role="tabpanel"][hidden] { display: none; }
@media (max-width: 620px) {
  .report-steps { flex-direction: column; }
}
