/* 此文件由 scripts/build-sph-native.mjs 生成，请勿手工修改。 */
.sph-native-host {
  --bg: var(--body-bg);
  --surface: var(--input-bg);
  --faint: var(--t3);
  --text: var(--t1);
  --muted: var(--t2);
  --blue: var(--orange);
  --blue-soft: var(--orange-soft);
  --shadow-sm: 0 1px 2px color-mix(in srgb, var(--t1) 5%, transparent);
  --shadow: var(--card-shadow);
  --shadow-lg: 0 12px 32px color-mix(in srgb, var(--t1) 13%, transparent);
  min-height: 100%;
  background: transparent;
  color: var(--t1);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sph-native-host *, .sph-native-host *::before, .sph-native-host *::after { box-sizing: border-box; }
.sph-native-tabs { position:relative; z-index:35; display:inline-flex; gap:4px; width:max-content; max-width:100%; margin:0; padding:5px; overflow:hidden; border:1px solid var(--border); border-radius:12px; background:var(--panel); box-shadow:none; }
.sph-native-tab { position:relative; min-width:96px; flex:0 0 auto; min-height:38px; padding:8px 16px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:500 13px var(--font); cursor:pointer; }
.sph-native-tab.active::after { display:none; }
.sph-native-tab:hover { color:var(--t1); background:var(--hover-bg); }
.sph-native-tab.active { background:var(--action-soft); color:var(--action-accent); box-shadow:none; }
.sph-native-content { min-height: calc(100vh - 150px); background: transparent; }
.sph-native-tab { transition: background-color .18s ease, color .18s ease; }
/* 窄桌面（~1280）页签行与状态条、日期控件同排时会挤掉第 5 个页签：取消最小宽度、收窄内边距。 */
@media (min-width: 761px) and (max-width: 1440px) { .sph-native-tab { min-width: 0; padding: 8px 13px; } }
/* 投流页提示（toast() 挂在页面实例上）：工作台旧 styles.css 的 .toast 会把它设成透明并拉到底部，
   导致在工作台里一直看不见。这里恢复为投流原样（右上角、按内容高度），并加一个短入场。 */
@keyframes sph-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sph-native-host .toast { opacity: 1; bottom: auto; left: auto; height: auto; transform: none; pointer-events: auto; z-index: 1010; transition: none; animation: sph-toast-in .2s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) { .sph-native-host .toast { animation: none; } }
/* Anthropic 风格统一（203）：控件圆角 8、卡片 12、细边线近乎无阴影、标题衬线、字重收敛。
   用 .sph-native-host 前缀提权，压过 @scope 内各页旧值；手机端（≤760）布局不动，只吃颜色与字体。 */
.sph-native-host :is(h1, h2) { font-weight: 700; letter-spacing: 0; }
.sph-native-host .sph-native-tab.active { font-weight: 600; }
@media (min-width: 761px) {
  .sph-native-host :is(.btn, .plan-action, select, input:not([type="checkbox"]):not([type="radio"]), .ui-select-trigger, .author-filter-trigger) { border-radius: 8px; }
  .sph-native-host :is(.btn, .ui-select-trigger, .author-filter-trigger) { font-weight: 500; }
  .sph-native-host :is(.card, .stat-card, .summary-card, .create-section) { border-radius: 12px; box-shadow: var(--shadow-sm); }
  .sph-native-host :is(th) { font-weight: 500; }
}
/* 投流子页切换动效（仅桌面、尊重减少动效）：页签栏不动；页头其余部分淡入，内容卡片淡入并上移 8px。
   位移只加在内容块上，不加在页面根节点，避免改变 fixed 弹层/悬浮按钮的定位基准。 */
@media (min-width: 761px) and (prefers-reduced-motion: no-preference) {
  @keyframes sph-page-enter-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes sph-page-enter-lift { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .sph-page-enter .page-intro > :not(.sph-native-tabs):not(.monitor-title-row),
  .sph-page-enter .monitor-title-row > :not(.sph-native-tabs) { animation: sph-page-enter-fade .22s ease-out both; }
  .sph-page-enter .container > :not(.page-intro):not(.sph-side-tools) { animation: sph-page-enter-lift .24s cubic-bezier(.2,.7,.3,1) both; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  #view-sph-monitor.sph-monitor-view { margin-inline: -24px; }
}
@scope (.sph-native-content) {
.nav{position:sticky;z-index:40;top:0;display:flex;min-height:78px;align-items:center;gap:8px;padding:12px clamp(20px,2.5vw,38px);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 91%,transparent);box-shadow:0 1px 0 rgba(255,255,255,.35);backdrop-filter:blur(18px)}.nav .logo{display:grid;min-width:214px;margin-right:22px;padding-left:14px;border-left:3px solid var(--orange);color:var(--text);line-height:1.15}.nav .logo small{margin-bottom:5px;color:var(--faint);font-size:9px;font-weight:800;letter-spacing:.18em}.nav .logo strong{font-size:17px;font-weight:800;letter-spacing:-.02em}.nav a{display:inline-flex;min-height:40px;align-items:center;justify-content:center;padding:0 15px;border:1px solid transparent;border-radius:11px;color:var(--muted);font-size:13px;font-weight:650;text-decoration:none;transition:background .18s,border-color .18s,color .18s,transform .18s}.nav a:hover{border-color:color-mix(in srgb,var(--orange) 35%,var(--line));background:var(--orange-soft);color:var(--orange);transform:translateY(-1px)}.nav a.active{border-color:color-mix(in srgb,var(--orange) 45%,var(--line));background:var(--orange-soft);color:var(--orange);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--orange) 8%,transparent)}
.container{width:min(100%,1540px);margin:0 auto;padding:26px clamp(20px,2.5vw,38px) 56px}.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 2px 20px}.page-intro .eyebrow{margin:0 0 7px;color:var(--orange);font-size:9px;font-weight:850;letter-spacing:.18em}.page-intro h1{margin:0;font-size:clamp(24px,2.2vw,32px);letter-spacing:-.04em}.page-intro p:not(.eyebrow){max-width:720px;margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.7}.live-chip{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;padding:7px 10px;border:1px solid color-mix(in srgb,var(--green) 28%,var(--line));border-radius:999px;background:var(--green-soft);color:var(--green);font-size:10px;font-weight:750}.live-chip::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px color-mix(in srgb,var(--green) 12%,transparent)}

.card,.stat{border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow)}.card{margin-bottom:18px;padding:clamp(18px,2vw,25px);border-radius:16px}.card>h3,.card-head h3{margin:0;color:var(--text);font-size:15px;letter-spacing:-.01em}.card>h3{margin-bottom:16px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.card-kicker{margin:0 0 5px;color:var(--faint);font-size:9px;font-weight:850;letter-spacing:.15em}.dashboard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px}.dashboard-toolbar>div:first-child{min-width:150px}.dashboard-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}
.btn{display:inline-flex;min-height:38px;align-items:center;justify-content:center;gap:7px;padding:0 16px;border:0;border-radius:8px;background:var(--action-start,var(--orange));box-shadow:none;color:#fff;cursor:pointer;font-size:13px;font-weight:700;text-decoration:none;transition:transform .18s,filter .18s,border-color .18s,background .18s}.btn:hover:not(:disabled){filter:brightness(1.04);transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0) scale(.99)}.btn.ghost{border:1px solid var(--line);background:var(--surface);box-shadow:var(--shadow-sm);color:var(--text)}.btn.ghost:hover:not(:disabled){border-color:color-mix(in srgb,var(--orange) 55%,var(--line));background:var(--orange-soft);color:var(--orange)}.btn.danger{background:var(--danger);box-shadow:0 9px 22px var(--danger-soft);color:#fff}.btn.sm{min-height:32px;padding:0 12px;border-radius:8px;font-size:12px}.btn:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}
input,select,textarea{min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;outline:none;background:var(--surface);color:var(--text);transition:border-color .16s,box-shadow .16s,background .16s}input:focus,select:focus,textarea:focus{border-color:color-mix(in srgb,var(--orange) 62%,var(--line));box-shadow:0 0 0 3px var(--orange-soft)}input:disabled,select:disabled{opacity:.62;background:var(--elevated)}input[type="checkbox"],input[type="radio"]{min-height:auto;accent-color:var(--orange)}
.table-wrap{width:100%;overflow:auto;border:1px solid var(--line);border-radius:13px}table{width:100%;border-collapse:collapse}th,td{padding:13px 12px;border-bottom:1px solid var(--sep);color:var(--text);font-size:12px;text-align:left}th{position:sticky;z-index:1;top:0;background:var(--elevated);color:var(--faint);font-size:10px;font-weight:750;letter-spacing:.04em;white-space:nowrap}tbody tr{transition:background .16s}tbody tr:hover{background:color-mix(in srgb,var(--orange) 3.5%,var(--card))}tbody tr:last-child td{border-bottom:0}
.tag{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;font-size:10px;font-weight:700}.tag.online{background:var(--green-soft);color:var(--green)}.tag.offline{background:var(--danger-soft);color:var(--danger)}.tag.heating{background:var(--amber-soft);color:var(--amber)}.tag.done{background:var(--elevated);color:var(--muted)}.row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.muted{color:var(--muted);font-size:12px}.form-item{margin-bottom:16px}.form-item label{display:block;margin-bottom:7px;color:var(--muted);font-size:12px;font-weight:650}
.stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 4px}.stat{position:relative;min-width:0;padding:16px;overflow:hidden;border-radius:14px}.stat::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--line)}.stat:nth-child(4n+1)::before{background:var(--orange)}.stat:nth-child(4n+2)::before{background:var(--amber)}.stat:nth-child(4n+3)::before{background:var(--green)}.stat:nth-child(4n+4)::before{background:var(--blue)}.stat .muted{color:var(--faint);font-size:10px;font-weight:650}.stat .v{margin-top:8px;color:var(--text);font-family:var(--mono);font-size:23px;font-weight:800;letter-spacing:-.04em}.stat .v.accent{color:var(--orange)}.stat .v.red{color:var(--amber)}.stat .v.green{color:var(--green)}
.dialog-mask,.qr-mask{position:fixed;z-index:100;inset:0;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(30,26,22,.42);backdrop-filter:blur(5px)}.dialog-mask.show,.qr-mask.show{display:flex}.dialog,.qr-box{width:min(520px,94vw);max-height:88vh;padding:25px;overflow:auto;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:var(--shadow-lg);color:var(--text)}.dialog h3,.qr-box h3{margin:0 0 16px}.toast{position:fixed;z-index:200;top:88px;right:22px;max-width:min(420px,calc(100vw - 40px));padding:11px 16px;border-radius:10px;background:var(--text);box-shadow:var(--shadow-lg);color:var(--surface);font-size:12px}.toast.err{background:var(--danger);color:#fff}.log-item,.log-item.action,.log-item.warn,.log-item.error{padding:9px 2px;border-bottom:1px dashed var(--line);color:var(--muted);font-size:12px;line-height:1.6}#qr-img{display:block;width:220px;height:220px;margin:18px auto;border:10px solid #fff;border-radius:13px}

.sph-range-picker{position:relative;z-index:30;min-width:330px}.sph-range-toggle{display:flex;width:100%;min-height:42px;align-items:center;gap:11px;padding:7px 15px;border:1px solid var(--line);border-radius:11px;background:var(--surface);box-shadow:var(--shadow-sm);color:var(--text);cursor:pointer;text-align:left}.sph-range-toggle:hover{border-color:color-mix(in srgb,var(--orange) 55%,var(--line));box-shadow:0 7px 20px var(--orange-soft)}.sph-range-icon{display:grid;width:19px;height:19px;flex:0 0 19px;place-items:center;color:var(--text)}.sph-range-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}.sph-range-caption{color:var(--muted);font-size:11px;white-space:nowrap}.sph-range-toggle strong{flex:1;min-width:0;overflow:hidden;color:var(--text);font-family:var(--mono);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.sph-range-chevron{position:relative;width:22px;height:22px;flex:0 0 22px;color:var(--muted);transition:transform .2s}.sph-range-chevron::before{content:"";position:absolute;left:50%;top:47%;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translate(-50%,-50%) rotate(45deg)}.sph-range-toggle[aria-expanded="true"] .sph-range-chevron{transform:rotate(180deg) scale(.82)}
.sph-range-popover{position:absolute;z-index:60;top:calc(100% + 9px);right:0;display:grid;grid-template-columns:108px minmax(0,1fr);gap:14px;width:min(680px,calc(100vw - 54px));padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:var(--shadow-lg)}.sph-range-popover[hidden]{display:none}.sph-range-presets{display:grid;align-content:start;gap:6px}.sph-range-presets button{min-height:33px;padding:5px 7px;border:1px solid transparent;border-radius:8px;background:var(--elevated);color:var(--muted);cursor:pointer;font-size:11px}.sph-range-presets button:hover{border-color:color-mix(in srgb,var(--orange) 45%,var(--line));color:var(--text)}.sph-range-calendar{min-width:0}.sph-range-calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px}.sph-range-calendar-head button{width:29px;height:29px;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--elevated);color:var(--text);cursor:pointer;font-size:18px}.sph-range-calendar-head strong{font-family:var(--mono);font-size:11px}.sph-range-months{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sph-range-month-head{margin-bottom:7px;font-size:11px;font-weight:750;text-align:center}.sph-range-weekdays,.sph-range-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.sph-range-weekdays{margin-bottom:4px;color:var(--faint);font-size:9px;text-align:center}.sph-range-day{min-width:0;height:28px;padding:0;border:0;border-radius:7px;background:transparent;color:var(--text);cursor:pointer;font-size:10px}.sph-range-day:hover:not(:disabled),.sph-range-day.is-start,.sph-range-day.is-end{background:var(--orange);color:#fff}.sph-range-day.is-in-range{border-radius:3px;background:var(--orange-soft);color:var(--text)}.sph-range-day:disabled{color:var(--faint);cursor:not-allowed;opacity:.45}.sph-range-day.is-empty{pointer-events:none}.sph-range-fields{grid-column:2;display:grid;grid-template-columns:1fr 1fr;gap:8px}.sph-range-fields label{display:grid;gap:5px;color:var(--muted);font-size:10px}.sph-range-fields input{width:100%;min-width:0;min-height:36px;background:var(--elevated);font-size:11px}.sph-range-hint{grid-column:2;margin:-3px 0 0;color:var(--faint);font-size:9px}
.nav .logo{min-width:195px}.container{max-width:none}
.trend-bar{background:var(--orange)}.trend-bar.pay{background:var(--green)}.trend-label,.legend-row{color:var(--muted)}.batch-bar{border:1px solid color-mix(in srgb,var(--orange) 22%,var(--line));background:var(--orange-soft);color:var(--muted)}.batch-bar .n{color:var(--orange)}.detail-grid .item,#expand-body{border-color:var(--line)}.detail-grid .item .k{color:var(--muted)}.video-card,#video-scroll{border-color:var(--line);background:var(--surface)}.video-card .vd,.video-item .d,#selected-info{color:var(--muted)}.video-card.problem{border-color:var(--danger);box-shadow:0 0 0 1px var(--danger) inset}.video-card.has-order{border-color:var(--green);box-shadow:0 0 0 1px var(--green) inset}.op-links .plan-action,.expand-arrow a,.load-more{color:var(--orange)}.op-links .plan-action.danger{color:var(--danger)}th.sortable:hover,th.sortable.sorted-asc::after,th.sortable.sorted-desc::after{color:var(--orange)}.rank-item{border-color:var(--line)}.rank-item .rk{background:var(--orange-soft);color:var(--orange)}.rank-item:nth-child(1) .rk,.rank-item .bar{background:var(--orange);color:#fff}.rank-item .bar-wrap{background:var(--elevated)}.rank-item .val{color:var(--amber)}.section-title{border-left-color:var(--orange);color:var(--text);font-weight:750}.quota-quick.active{border-color:var(--orange);background:var(--orange);color:#fff}.progress-bar{background:var(--elevated)}.progress-fill{background:linear-gradient(90deg,var(--orange),#ff9a61)}.author-options{border-color:var(--line);background:var(--card);box-shadow:var(--shadow-lg)}.author-option{color:var(--text)}.author-option:hover,.author-option.active{background:var(--orange-soft);color:var(--orange)}.op-badge{background:var(--orange-soft);color:var(--orange)}.qr-box{border:1px solid var(--line);background:var(--card);box-shadow:var(--shadow-lg);color:var(--text)}.check-group input{accent-color:var(--orange)}.video-item{display:inline-block;width:140px;margin:8px;overflow:hidden;border:2px solid transparent;border-radius:10px;background:var(--surface);box-shadow:var(--shadow-sm);cursor:pointer;vertical-align:top}.video-item img{display:block;width:100%;height:186px;object-fit:cover;background:var(--elevated)}.video-item.selected{border-color:var(--orange);box-shadow:0 0 0 2px var(--orange-soft)}.video-item.selected .d{color:var(--orange)}[style*="color:var(--danger)"],[style*="color: var(--danger)"]{color:var(--danger)!important}[style*="color:var(--green)"],[style*="color: var(--green)"]{color:var(--green)!important}
.page-intro.sph-page-intro{align-items:center;padding-bottom:18px;border-bottom:1px solid var(--line)}
.sph-side-tools{position:fixed;z-index:61;right:0;top:50%;display:flex;flex-direction:column;gap:8px;transform:translateY(-50%)}
.sph-side-tool{min-width:34px;min-height:78px;margin:0;padding:8px 6px;border:1px solid var(--line);border-right:0;border-radius:11px 0 0 11px;background:var(--card);box-shadow:none;color:var(--text);cursor:pointer;font:inherit;font-size:12px;font-weight:700;writing-mode:vertical-rl;letter-spacing:.05em}
.sph-side-tool:hover,.sph-side-tool.active{border-color:color-mix(in srgb,var(--orange) 48%,var(--line));background:var(--orange-soft);color:var(--orange)}
.sph-side-mask{position:fixed;z-index:69;inset:0;background:rgba(15,23,42,.2);opacity:0;pointer-events:none;transition:opacity .2s}.sph-side-mask.show{opacity:1;pointer-events:auto}
.sph-side-panel{position:fixed;z-index:70;top:0;right:0;width:min(720px,92vw);height:100vh;padding:22px;overflow:auto;border-left:1px solid var(--line);background:var(--bg);box-shadow:none;transform:translateX(102%);transition:transform .24s ease,box-shadow .24s ease}.sph-side-panel.show{box-shadow:-20px 0 60px rgba(15,23,42,.16);transform:translateX(0)}
.sph-side-panel-head{position:sticky;z-index:2;top:-22px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:-22px -22px 18px;padding:18px 22px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(18px)}.sph-side-panel-head h3{margin:0}.sph-side-panel .table-wrap{overflow:auto}
.sph-table-scroll{width:100%;max-width:100%;overflow-x:auto;overflow-y:hidden;border:1px solid var(--line);border-radius:13px;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.sph-table-scroll table{margin:0}.sph-table-scroll:focus-visible{outline:2px solid color-mix(in srgb,var(--orange) 58%,var(--line));outline-offset:2px}
@media(max-width:1080px){.nav{align-items:flex-start;flex-wrap:wrap}.nav .logo{width:100%;margin:0 0 4px}.stat-row{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-toolbar{align-items:flex-start}.dashboard-controls{flex-wrap:wrap}}@media(max-width:760px){.nav{position:relative;min-height:auto;padding:16px;gap:5px}.nav .logo{min-width:0}.nav a{flex:1;min-width:calc(50% - 5px);padding:0 8px}.container{padding:18px 14px 42px}.page-intro{align-items:flex-start;flex-direction:column;gap:10px}.dashboard-toolbar{flex-direction:column}.dashboard-controls,.sph-range-picker{width:100%;min-width:0}.dashboard-controls>select{width:100%}.sph-range-popover{right:0;width:min(620px,calc(100vw - 28px));grid-template-columns:1fr}.sph-range-presets{grid-template-columns:repeat(3,minmax(0,1fr))}.sph-range-months{grid-template-columns:1fr}.sph-range-months>div:last-child{display:none}.sph-range-fields,.sph-range-hint{grid-column:1}.stat-row{grid-template-columns:1fr 1fr}.card{padding:16px}.table-wrap{border:0;border-radius:0}table{min-width:760px}.sph-side-tool{min-height:82px;padding:9px 6px}}@media(max-width:480px){.sph-range-caption{display:none}.sph-range-presets{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-row{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media(max-width:760px){
  .container,.card,.sph-table-scroll{min-width:0;max-width:100%}
  .page-intro.sph-page-intro{gap:7px;margin-bottom:11px;padding-bottom:10px}
  .page-intro.sph-page-intro h1{display:none}
  .page-intro.sph-page-intro p:not(.eyebrow){display:none}
  .page-intro.sph-page-intro .live-chip{padding:5px 8px;font-size:9px}
  .sph-table-scroll{border-radius:10px}
  .sph-table-scroll table{width:760px;min-width:760px}
  .sph-side-tools{position:static;z-index:auto;right:auto;top:auto;display:flex;width:100%;margin:0 0 9px;align-items:center;justify-content:flex-end;flex-direction:row;flex-wrap:wrap;gap:7px;background:transparent;box-shadow:none;transform:none;pointer-events:auto}
  .sph-side-tool{width:auto;min-width:84px;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--card);font-size:11px;line-height:1.2;letter-spacing:.02em;writing-mode:horizontal-tb;pointer-events:auto;touch-action:manipulation;transform:none!important;filter:none!important;animation:none!important;will-change:auto!important}
  .sph-side-tool:hover,.sph-side-tool:focus-visible,.sph-side-tool:active{position:static!important;transform:none!important;filter:none!important;animation:none!important;will-change:auto!important}
  .sph-side-mask,.sph-side-mask.show{background:transparent;backdrop-filter:none;transition:none}
  .sph-side-panel{width:calc(100vw - 40px);max-width:680px;height:100vh;height:100dvh;padding:16px}
  .sph-side-panel-head{top:-16px;margin:-16px -16px 14px;padding:14px 16px}
}
.pay-order-progress{display:table;margin:8px auto 14px;padding:5px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:22px;line-height:1.35;font-weight:750;color:var(--orange);font-variant-numeric:tabular-nums}
.pay-order-progress:empty{display:none}
#mobile-entry-dialog .mobile-entry-steps{display:grid;gap:9px;margin:0 0 18px;padding:0;list-style:none;counter-reset:mobile-step;text-align:left;color:var(--muted);font-size:13px;line-height:1.65}
#mobile-entry-dialog .mobile-entry-steps li{display:grid;grid-template-columns:22px minmax(0,1fr);gap:9px;align-items:start;counter-increment:mobile-step}
#mobile-entry-dialog .mobile-entry-steps li::before{content:counter(mobile-step);display:grid;place-items:center;width:22px;height:22px;background:var(--orange-soft);color:var(--orange);border-radius:50%;font-size:12px;font-weight:700}
#mobile-entry-dialog #mobile-entry-img{display:block;margin:0 auto;max-width:100%!important;height:auto!important;aspect-ratio:1;background:white}
#mobile-entry-dialog .mobile-entry-validity{display:grid;gap:4px;margin:16px 0 6px;font-size:12px;line-height:1.6;color:var(--muted)}
#mobile-entry-dialog .mobile-entry-validity strong{color:var(--text);font-size:13px;font-weight:650}
#mobile-entry-dialog .mobile-entry-link{margin:6px 0 16px;font-size:12px;line-height:1.6;color:var(--muted)}
#mobile-entry-dialog .mobile-entry-link summary{cursor:pointer;list-style:none;text-decoration:underline;text-underline-offset:3px}
#mobile-entry-dialog #mobile-entry-url{margin:8px 0 0;padding:9px 10px;background:var(--elevated);border-radius:8px;font-size:11px;line-height:1.6;text-align:left;overflow-wrap:anywhere;word-break:normal}
.group-summary-layout{min-width:0}.group-summary-layout.with-groups{display:grid;grid-template-columns:270px minmax(0,1fr);gap:14px;align-items:start}.group-summary-layout>.plan-list-card{min-width:0}.group-summary-sidebar[hidden]{display:none}.group-summary-sidebar{min-width:0;padding:12px;position:sticky;top:12px;max-height:calc(100dvh - 32px);display:flex;flex-direction:column;margin-bottom:0!important}.group-summary-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px}.group-summary-controls>*{width:100%;min-width:0;height:36px;font-size:11px}.group-summary-controls #group-summary-account,.group-summary-controls .ui-select:has(#group-summary-account){grid-column:1/-1}.group-summary-note{font-size:10px;margin:9px 0}.group-summary-all{width:100%;min-height:36px;margin:0 0 8px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer}.group-summary-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.group-overview-item{display:block;width:100%;margin:0 0 8px;padding:12px;text-align:left;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);cursor:pointer;transform:none!important}.group-overview-item:hover,.group-summary-all:hover{border-color:var(--orange)}.group-overview-item.active,.group-summary-all.active{border-color:var(--orange);background:var(--orange-soft)}.group-overview-item>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.group-overview-item>strong>i{display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--faint)}.group-overview-item>strong>i.online{background:var(--green)}.group-overview-item>small{display:block;margin-top:6px;color:var(--muted);font-size:10px}.group-summary-metrics{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px;font-size:10px;color:var(--muted)}.group-summary-metrics>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group-summary-metrics b{font-weight:650;color:var(--text)}.group-summary-pagination{display:flex;align-items:center;justify-content:space-between;gap:6px;padding-top:8px;font-size:10px;color:var(--muted)}.group-summary-pagination .btn{min-height:30px;padding:0 10px}#group-summary-status{font-size:11px;line-height:1.6;color:var(--muted)}.with-groups .primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:1000px){.group-summary-layout.with-groups{grid-template-columns:230px minmax(0,1fr);gap:10px}.group-summary-metrics{gap:6px;font-size:9px}.group-summary-sidebar{padding:10px}}
@media(max-width:760px){.group-summary-layout.with-groups{grid-template-columns:minmax(0,1fr)}.group-summary-sidebar{position:static;max-height:360px}.group-summary-list{max-height:200px}.group-summary-controls{grid-template-columns:1fr 1fr}.group-summary-controls>*{min-height:40px}.group-summary-layout.with-groups .primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.nav:has([data-data-view]){flex-wrap:wrap}.nav:has([data-data-view]) .logo{width:100%;min-width:0}.nav:has([data-data-view]) a{font-size:11px}}
@media(min-width:1400px){.group-summary-layout.with-groups .primary-metrics{grid-template-columns:repeat(6,minmax(0,1fr))}}
.with-groups .plan-filter-strip #account-filter,.with-groups .plan-filter-strip .ui-select:has(#account-filter){display:none!important}
.with-groups .primary-metric:nth-last-child(-n+2) .metric-help::after{left:auto;right:0;transform:translateY(4px)}
.with-groups .primary-metric:nth-last-child(-n+2) .metric-help:hover::after,.with-groups .primary-metric:nth-last-child(-n+2) .metric-help:focus-visible::after{transform:translateY(0)}
@media(min-width:761px){.group-summary-sidebar{max-height:max(300px,calc(100dvh - 220px))}}

#pay-status:empty{display:none}

/* 计划列表首屏快照提示行（2026-09-12）：展示本机快照期间必须可见，新数据落地即消失。 */
.order-snapshot-hint{display:inline-flex;align-items:center;margin-left:8px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:11px;font-weight:600;white-space:nowrap;vertical-align:middle}
.order-snapshot-hint[data-state="failed"]{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 32%,var(--line))}

/* Mobile v3: keep the existing data/controller model and present it as touch-first cards/sheets. */
@media (max-width:760px){
  body{font-size:16px}
  .container{width:100%;max-width:none;padding:12px!important}
  .page-intro h1{font-size:24px;line-height:1.2}
  .card{border-radius:15px;box-shadow:0 5px 18px rgba(20,24,32,.06)}
  :is(button,.btn,input,select,textarea){font-size:16px}
  :is(button,.btn,select,input:not([type="checkbox"]):not([type="radio"])){min-height:44px}
  .primary-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .primary-metric{min-height:104px!important;padding:13px!important;border-radius:14px!important}
  .primary-metric strong{font-size:23px!important}
  .secondary-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .monitor-page-intro{display:block!important}
  .monitor-title-controls{display:grid!important;grid-template-columns:1fr 1fr!important;margin-top:12px}
  .monitor-title-controls .monitor-create-button{grid-column:1/-1;min-height:46px!important}
  .advanced-filters{position:fixed!important;z-index:180!important;inset:0!important;width:100%!important;max-width:none!important;max-height:100dvh!important;margin:0!important;padding:16px 14px calc(18px + env(safe-area-inset-bottom))!important;overflow:auto!important;border:0!important;border-radius:0!important}
  .advanced-filter-head{position:sticky;z-index:2;top:-16px;margin:-16px -14px 12px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--surface)}
  .advanced-filter-close{width:44px!important;height:44px!important}
  .advanced-filter-actions{position:sticky;bottom:-18px;margin:12px -14px -18px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:var(--surface);box-shadow:0 -8px 24px rgba(0,0,0,.08)}
  .plan-table-head{align-items:flex-start!important;flex-direction:column!important}
  .order-actions{display:flex!important;width:100%;overflow-x:auto;flex-wrap:nowrap!important;scrollbar-width:none}
  .order-actions>*{flex:0 0 auto}
  .table-scroll{width:100%;overflow-x:auto!important;overscroll-behavior-inline:contain}
  #orders-table{min-width:980px}
  .order-pagination{justify-content:center!important;gap:6px!important;overflow-x:auto}
  .group-grid,.aggregate-list,.video-aggregate-grid{grid-template-columns:1fr!important}
  .sph-side-tools{right:0!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;top:auto!important;flex-direction:row!important}
  .sph-side-tool{width:auto!important;min-height:44px!important;padding:8px 10px!important;writing-mode:horizontal-tb!important;border-radius:10px 0 0 10px!important}
  .dialog-mask.show,.qr-mask.show{align-items:flex-end!important;padding:0!important}
  .dialog-mask.show>.dialog,.qr-mask.show>.qr-box{width:100%!important;max-width:none!important;max-height:92dvh!important;margin:0!important;padding:16px 14px calc(16px + env(safe-area-inset-bottom))!important;overflow:auto;border-radius:18px 18px 0 0!important}
  .batch-job{padding:13px!important;border-radius:14px!important}
  .batch-job-head{gap:9px!important}
  .batch-job-actions{width:100%;justify-content:flex-start!important;flex-wrap:wrap}
  .batch-job-status{min-height:28px!important}
  .batch-job-actions .btn{margin-left:auto}
  .queue-page-card{padding:14px!important}
  .queue-page-intro .live-chip{display:inline-flex;margin-top:10px}
  .group-page-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .group-manage-grid{grid-template-columns:1fr!important}
  .rule-list,.rules-grid{grid-template-columns:1fr!important}
}


.trend-box { display: flex; align-items: flex-end; gap: 12px; width: 100%; max-width: 100%; min-width: 0; height: 160px; padding: 12px 4px 0; overflow-x: auto; overflow-y: hidden; box-sizing: border-box; }
.trend-col { flex: 0 0 39px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trend-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.trend-bar { width: 18px; border-radius: 3px 3px 0 0; background: var(--orange); min-height: 2px; position: relative; }
.trend-bar.pay { background: var(--green); }
.trend-bar .tip { display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: #333; color: #fff; font-size: 11px; padding: 3px 6px; border-radius: 4px; white-space: nowrap; z-index: 5; }
.trend-bar:hover .tip { display: block; }
.trend-label { font-size: 11px; color: #999; }
.legend-row { display: flex; gap: 16px; font-size: 12px; color: #888; margin-top: 6px; }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.batch-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px;
  background: var(--orange-soft); border-radius: 8px; font-size: 13px; }
.batch-bar .n { font-weight: 700; color: var(--orange); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.detail-grid .item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed #f0f0f2; font-size: 13px; }
.detail-grid .item .k { color: #888; }
.video-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.video-card { width: 130px; border: 1px solid #eee; border-radius: 8px; overflow: hidden; position: relative; }
.video-card img { width: 130px; height: 172px; object-fit: cover; display: block; background: #f5f5f7; }
.video-card .vd { font-size: 11px; color: #555; padding: 4px 6px; height: 42px; overflow: hidden; }
.video-card .badge { position: absolute; top: 6px; left: 6px; font-size: 11px; padding: 2px 7px;
  border-radius: 10px; color: #fff; background: rgba(0,0,0,.45); }
.video-card .badge.ok { background: rgba(26,158,84,.9); }
.video-card .badge.warn { background: var(--danger); }
.video-card.problem { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger) inset; }
.video-card .issue-tip { font-size: 11px; color: var(--danger); padding: 0 6px 6px; }
.video-card.has-order { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset; }
.video-card .order-badge { position: absolute; top: 6px; right: 6px; font-size: 11px;
  padding: 2px 7px; border-radius: 10px; color: #fff; background: var(--green); font-weight: 600; }
.video-card .video-metrics { border-top: 1px solid #f0f0f2; padding: 5px 6px 6px;
  font-size: 11px; line-height: 1.55; color: #777; }
.video-card .video-metrics .conversion { color: var(--green); font-weight: 600; }
.op-links { width:196px; min-width:196px; padding-inline:10px!important; box-sizing:border-box; white-space:nowrap; }
.op-links > .plan-action + .plan-action { margin-left:4px; }
.op-links .plan-action { display:inline-flex; width:auto; min-width:0; max-width:none; height:28px; min-height:28px; align-items:center; justify-content:center; padding:0 9px; box-sizing:border-box; border:1px solid var(--line); border-radius:6px; background:transparent; color:var(--text); cursor:pointer; font:inherit; font-size:13px; font-weight:500; line-height:1; text-decoration:none; vertical-align:middle; }
.op-links .plan-action:hover:not(:disabled) { border-color:color-mix(in srgb,var(--text) 24%,var(--line)); background:color-mix(in srgb,var(--text) 5%,transparent); }
.op-links .plan-action.danger { color:var(--danger); }
.op-links .plan-action.danger:hover:not(:disabled) { border-color:color-mix(in srgb,var(--danger) 40%,var(--line)); background:color-mix(in srgb,var(--danger) 7%,transparent); }
.op-links .plan-action-detail { border-color:color-mix(in srgb,var(--orange) 38%,var(--line)); color:var(--orange); font-weight:600; }
.op-links .plan-action-detail:hover:not(:disabled) { border-color:color-mix(in srgb,var(--orange) 55%,var(--line)); background:var(--orange-soft); }
.op-links .plan-action:disabled { border-color:var(--line); background:var(--elevated); color:var(--faint); cursor:not-allowed; opacity:1; }
.plan-detail-link { display:block; width:100%; padding:0; overflow:hidden; border:0; background:transparent; color:var(--text); cursor:pointer; font:inherit; text-align:left; text-decoration:none; text-overflow:ellipsis; white-space:nowrap; }
.plan-detail-link:hover,.plan-detail-link:focus-visible { color:var(--orange); text-decoration:underline; text-underline-offset:3px; }
.plan-cell { width:205px; min-width:205px; max-width:205px; overflow:hidden; }
.plan-cell>* { min-width:0; max-width:100%; }
.plan-cell small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--orange) !important; background: var(--orange-soft); }
th.sortable.sorted-asc::after { content: " ▲"; color: var(--orange) !important; font-size: 10px; }
th.sortable.sorted-desc::after { content: " ▼"; color: var(--orange) !important; font-size: 10px; }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed #f0f0f2; font-size: 13px; }
.rank-item .rk { width: 22px; height: 22px; border-radius: 50%; background: var(--orange-soft); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.rank-item:nth-child(1) .rk { background: var(--orange); color: #fff; }
.rank-item .bar-wrap { flex: 1; height: 8px; background: #f0f0f2; border-radius: 4px; overflow: hidden; }
.rank-item .bar { height: 100%; background: var(--orange); border-radius: 4px; }
.rank-item .val { width: 90px; text-align: right; color: var(--danger); flex-shrink: 0; }
#expand-body { display: none; margin-top: 16px; border-top: 1px solid #f0f0f2; padding-top: 16px; }
#expand-body.show { display: block; }
.sub-block { margin-bottom: 20px; }
.sub-block h4 { font-size: 14px; margin-bottom: 10px; }
.detail-record-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}
.detail-record-controls label{display:flex;align-items:center;gap:8px}
.detail-daily-result{padding:12px 14px;border:1px solid var(--line);border-radius:10px;margin-bottom:12px}
.detail-daily-result.is-pending{border-color:#e9bb79;background:#fff8ee}
.detail-record-gap td{color:#9a580b;background:#fff8ee;white-space:normal}
.detail-record-pagination{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px}
/* 绑定策略：按面板宽度自适应排布（桌面 2–5 枚一行），不再固定竖排逼人往下滚。 */
.detail-bound-rules{display:grid;grid-template-columns:repeat(auto-fill,minmax(188px,1fr));gap:8px 12px;align-items:start}
.detail-bound-rule{display:flex;min-width:0;align-items:center;gap:8px}
.detail-bound-rule .rule-summary-chip{display:inline-flex;min-width:0;max-width:100%;min-height:24px;box-sizing:border-box;align-items:center;padding:3px 7px;font-size:12px;font-weight:700;overflow:hidden;border:1px solid color-mix(in srgb,var(--section-accent,#9b6bd3) 48%,var(--line));border-radius:7px;background:color-mix(in srgb,var(--section-accent,#9b6bd3) 9%,var(--surface));text-overflow:ellipsis;white-space:nowrap}
.detail-rule-result{flex:none;font-size:11px;color:var(--muted);white-space:nowrap}
@media (max-width:520px){ .detail-bound-rules{grid-template-columns:1fr} }
.detail-rule-evaluated{display:inline-flex;margin-top:10px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:11px}
.pay-qr-wrap { width:280px; height:280px; margin:0 auto; position:relative; }
.pay-qr-wrap img { display:block; width:100%; height:100%; transition:filter .15s; }
.pay-qr-wrap img { -webkit-touch-callout:default; user-select:auto; cursor:zoom-in; }
.pay-qr-wrap.paid img { filter:blur(5px); }
.pay-paid-overlay { display:none; position:absolute; inset:0; align-items:center; justify-content:center;
  color:#fff; background:rgba(26,158,84,.66); border-radius:8px; font-size:28px; font-weight:700;
  text-shadow:0 1px 3px rgba(0,0,0,.25); }
.pay-qr-wrap.paid .pay-paid-overlay { display:flex; }
.qr-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; text-align:left; }
.qr-dialog-head h3 { margin:0; }
.qr-dialog-actions { display:flex; flex:0 0 auto; gap:6px; }
.qr-dialog-actions button { display:grid; width:34px; height:34px; padding:0; place-items:center; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:17px; line-height:1; cursor:pointer; }
.qr-dialog-actions button:hover { border-color:var(--orange); background:var(--orange-soft); color:var(--orange); }
.qr-minimized-chip { position:fixed!important; z-index:140!important; right:max(18px,env(safe-area-inset-right)); bottom:24px; display:inline-flex; width:232px; min-height:42px; padding:9px 14px; align-items:center; justify-content:center; border:1px solid color-mix(in srgb,var(--orange) 50%,var(--line)); box-sizing:border-box; border-radius:999px; background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); line-height:1; white-space:nowrap; font-weight:750; cursor:pointer; pointer-events:auto; touch-action:manipulation; isolation:isolate; transform:none!important; filter:none!important; animation:none!important; transition:none!important; will-change:auto!important; backface-visibility:hidden; }
.qr-minimized-chip:hover,.qr-minimized-chip:focus-visible,.qr-minimized-chip:active { position:fixed!important; z-index:140!important; border-color:color-mix(in srgb,var(--orange) 50%,var(--line)); background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); transform:none!important; filter:none!important; animation:none!important; transition:none!important; will-change:auto!important; }
.qr-minimized-chip:focus-visible { outline:3px solid color-mix(in srgb,var(--orange) 22%,transparent); outline-offset:2px; }
.qr-minimized-chip[hidden] { display:none; }
.monitor-page-intro { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.monitor-title-row { display:flex; min-width:0; align-items:center; gap:12px; flex-wrap:wrap; }
.monitor-title-row h1 { white-space:nowrap; }
.monitor-title-controls { display:flex; min-width:0; max-width:100%; align-items:center; justify-content:flex-end; gap:9px; }
.monitor-title-controls #range-field { width:116px; min-width:116px; max-width:116px; }
.monitor-title-controls .ui-select { width:116px; min-width:116px; max-width:116px; flex:0 0 116px; }
.monitor-title-controls #range-field { padding-inline:8px 23px; font-size:12px; letter-spacing:-.02em; }
.monitor-title-controls .ui-select-trigger { min-height:42px; gap:5px; padding:0 8px; border-radius:11px; font-size:12px; letter-spacing:-.02em; }
.monitor-title-controls .ui-select-chevron { width:13px; height:13px; flex-basis:13px; }
.monitor-title-controls .ui-select-chevron svg { width:12px; height:12px; }
/* 日历弹层挂在 .sph-range-picker（z-index:30）里，而下方筛选卡是 z-index:32，
   会把弹层中段压在下面。这里把标题行的选择器整体抬到筛选卡之上（弹层 z-index:60 在其内部）。 */
.monitor-title-controls .sph-range-picker { width:auto; min-width:0; max-width:min(400px,100%); flex:0 0 auto; z-index:36; }
.monitor-title-controls .sph-range-toggle { width:100%; min-width:0; max-width:100%; height:38px; min-height:38px; padding:0 12px; gap:8px; border-radius:8px; box-shadow:none; }
.monitor-title-controls .sph-range-toggle strong { flex:0 0 auto; white-space:nowrap; overflow:visible; text-overflow:clip; }
.monitor-sync-actions { flex:0 1 auto; min-width:0; gap:6px; }
.monitor-title-row .live-chip { min-width:0; max-width:min(100%,520px); padding:0; border:0; border-radius:0; background:transparent; color:var(--muted); }
.monitor-title-row .live-chip::before { flex:0 0 7px; }
.monitor-title-row .sync-state { display:block; min-width:0; max-width:100%; overflow:hidden; color:var(--muted); font-size:11px; font-weight:650; line-height:1.35; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.monitor-refresh-button,.monitor-sync-actions .action-menu-trigger { display:grid; width:34px; height:34px; min-width:34px; min-height:34px; padding:0; place-items:center; border-radius:10px; }
.monitor-refresh-icon { display:block; width:16px; height:16px; flex:0 0 16px; transform-origin:50% 50%; }
.monitor-sync-actions .action-menu-trigger svg { width:17px; height:17px; fill:currentColor; }
.monitor-refresh-button.is-refreshing .monitor-refresh-icon { animation:sph-monitor-refresh-spin .65s linear infinite; }
@keyframes sph-monitor-refresh-spin { to { transform:rotate(360deg); } }
.monitor-sync-actions .action-menu[open] > .action-menu-trigger { border-color:var(--action-border,var(--orange)); background:var(--action-soft,var(--orange-soft)); color:var(--action-accent,var(--orange)); }
.dashboard-controls #order-filter { width:118px; min-width:118px; }
.dashboard-controls #creator-filter { width:102px; min-width:102px; }
.dashboard-refresh-btn { display:grid; width:36px; height:36px; min-width:36px; padding:0; place-items:center; border-radius:11px; }
.dashboard-refresh-btn svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.dashboard-refresh-btn.is-refreshing { border-color:color-mix(in srgb,var(--orange) 55%,var(--line)); background:var(--orange-soft); color:var(--orange); }
.dashboard-refresh-btn.is-refreshing svg { animation:sph-dashboard-refresh-spin .65s linear infinite; }
.dashboard-refresh-btn.is-complete { border-color:color-mix(in srgb,var(--green) 42%,var(--line)); background:var(--green-soft); color:var(--green); }
@keyframes sph-dashboard-refresh-spin { to { transform:rotate(360deg); } }
.refresh-cluster { position:relative; align-items:center; }
/* 刷新用亮色（浅橙底+橙字）。注意：不能写 html body 前缀——构建后规则位于 @scope 内，
   带该前缀的规则在工作台上下文永远匹配不上；同时 button-theme.css 的 ghost 规则
   `html body :is(.btn.ghost...):not(.danger)...` 特殊性高达 (0,5,2)，这里的
   :is+两个:not 把自己抬到 (0,6,0) 才能压过它（:not() 会计入参数特殊性）。 */
.refresh-cluster :is(.btn.ghost.refresh-accent):not(.danger):not(:disabled) { background:var(--action-soft,rgba(255,104,47,.08))!important; border-color:var(--action-border,rgba(255,104,47,.32))!important; color:var(--action-accent,#F04B23)!important; box-shadow:none; }
.refresh-cluster :is(.btn.ghost.refresh-accent):not(.danger):not(:disabled):hover { background:color-mix(in srgb,var(--action-accent,#F04B23) 15%,transparent)!important; border-color:var(--action-accent,#F04B23)!important; color:var(--action-accent,#F04B23)!important; }
.action-menu,.column-menu { position:relative; }
.action-menu summary,.column-menu summary { list-style:none; cursor:pointer; }
.action-menu summary::-webkit-details-marker,.column-menu summary::-webkit-details-marker { display:none; }
.action-menu-pop,.column-menu > div { position:absolute; z-index:40; right:0; top:calc(100% + 6px); width:210px; padding:6px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow); }
.action-menu-pop button { display:block; width:100%; padding:9px 10px; border:0; border-radius:8px; background:transparent; color:var(--text); text-align:left; cursor:pointer; }
.action-menu-pop button:hover { background:var(--orange-soft); color:var(--orange); }
.action-menu-group { margin:6px 10px 3px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.05em; }
.action-menu-group-with-help{display:flex;align-items:center;gap:5px}
.deep-sync-menu .action-menu-group{position:relative;margin:6px 10px 3px!important;padding:0!important}
.deep-sync-menu .action-menu-group:not(:first-child){margin-top:19px!important}
.deep-sync-menu .action-menu-group:not(:first-child)::before{content:"";position:absolute;top:-10px;left:-10px;right:-10px;height:1px;background:linear-gradient(90deg,transparent 0%,var(--line,#ddd8d0) 28%,var(--line,#ddd8d0) 72%,transparent 100%);pointer-events:none}
.action-menu-help{position:relative;display:inline-grid;width:15px;height:15px;flex:0 0 15px;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--muted);font-size:9px;font-weight:800;letter-spacing:0;line-height:1;cursor:help}
.action-menu-help::after{content:attr(data-tip);position:absolute;z-index:80;left:0;bottom:calc(100% + 8px);width:max-content;max-width:245px;padding:7px 9px;border-radius:8px;background:#272522;color:#fff;font-size:11px;font-weight:550;line-height:1.45;letter-spacing:0;white-space:normal;box-shadow:var(--shadow-soft);opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity .16s ease,transform .16s ease}
.action-menu-help:hover::after,.action-menu-help:focus-visible::after{opacity:1;transform:translateY(0)}
.action-menu-threshold { display:flex; align-items:center; gap:6px; padding:0 6px 2px; }
.action-menu-threshold input { width:86px; height:32px; min-height:32px; padding:0 8px; border-radius:8px; font-size:12px; }
.action-menu-threshold button { height:32px; min-height:32px; padding:0 12px; border-radius:8px; font-size:12px; }
.deep-sync-status { margin:10px 0 0; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--muted); font-size:11px; line-height:1.55; }
.deep-sync-status[hidden] { display:none; }
.deep-sync-status.running { border-color:color-mix(in srgb,var(--orange) 38%,var(--line)); color:var(--orange); }
/* 一键关停空耗状态行：旋转圈 + 文案 + 细进度条（未知总数用流动条，已知用精确百分比）。 */
.stale-close-status{display:flex;align-items:center;gap:10px}
.stale-close-status .stale-close-text{min-width:0}
.stale-close-spinner{display:inline-block;width:14px;height:14px;flex:0 0 14px;border:2px solid color-mix(in srgb,var(--orange) 25%,transparent);border-top-color:var(--orange);border-radius:50%;animation:stale-close-spin .8s linear infinite}
.stale-close-spinner[hidden]{display:none}
.stale-close-status .stale-close-bar{position:relative;display:block;flex:1 1 auto;max-width:280px;height:6px;margin-left:auto;border-radius:999px;background:var(--bg);overflow:hidden}
.stale-close-status .stale-close-bar[hidden]{display:none}
.stale-close-status .stale-close-bar-fill{display:block;height:100%;width:0;border-radius:inherit;background:var(--orange);transition:width .18s ease}
.stale-close-status .stale-close-bar.indeterminate .stale-close-bar-fill{width:38%;animation:stale-close-slide 1.1s ease-in-out infinite}
@keyframes stale-close-spin{to{transform:rotate(360deg)}}
@keyframes stale-close-slide{0%{transform:translateX(-110%)}100%{transform:translateX(300%)}}
@media(prefers-reduced-motion:reduce){.stale-close-spinner{animation:none}.stale-close-status .stale-close-bar-fill{transition:none}.stale-close-status .stale-close-bar.indeterminate .stale-close-bar-fill{animation:none;width:100%;opacity:.45}}
.deep-sync-status.success { border-color:color-mix(in srgb,var(--green) 40%,var(--line)); color:var(--green); }
.deep-sync-status.failed { border-color:color-mix(in srgb,var(--danger) 42%,var(--line)); color:var(--danger); }
.secondary-stats { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin:10px 0 14px; }
.secondary-stat { padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.secondary-stat span { display:block; color:var(--muted); font-size:11px; }
.secondary-stat strong { display:block; margin-top:4px; font-size:15px; }
.sub-block-head,.order-monitor-head,.list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sub-block-head h4 { margin:0; }
.trend-controls { display:flex; gap:5px; flex-wrap:wrap; }
.trend-controls select { min-height:30px; border-radius:8px; font-size:10px; }
.trend-controls>.ui-select { width:104px; min-width:0; flex:0 0 104px; }
.trend-controls>.ui-select:has(#trend-interval) { width:88px; flex-basis:88px; }
.trend-controls .ui-select-trigger { min-height:30px; gap:5px; padding:0 8px; border-radius:8px; box-shadow:none;
  font-size:10px; font-weight:650; letter-spacing:-.02em; transform:none !important; }
.trend-controls .ui-select-trigger:hover,.trend-controls .ui-select.is-open .ui-select-trigger { transform:none; }
.trend-controls .ui-select-chevron { width:13px; height:13px; flex-basis:13px; }
.trend-controls .ui-select-chevron svg { width:12px; height:12px; }
.groups-card { padding-block:14px; }
.groups-card .order-monitor-head > div { display:flex; align-items:baseline; gap:10px; }
.group-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(205px,1fr)); gap:9px; margin-top:11px; }
.group-card { position:relative; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); cursor:pointer; }
.group-card:hover,.group-card.active { border-color:var(--orange); background:var(--orange-soft); }
.group-card h4 { margin:0 52px 8px 0; }
.group-card p { display:grid; grid-template-columns:repeat(2,1fr); gap:4px 8px; margin:0; color:var(--muted); font-size:11px; }
.group-card .group-actions { position:absolute; top:7px; right:7px; display:flex; gap:2px; }
.group-card .group-actions button { border:0; background:transparent; color:var(--muted); cursor:pointer; padding:3px; }
.order-card { overflow:visible; }
.order-actions,.common-filters,.advanced-filters,.list-toolbar,.view-switch,.aggregate-switch { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.common-filters { margin:12px 0 8px; }
.common-filters input { min-width:270px; flex:1; }
.common-filters select { min-width:132px; }
.advanced-filters { padding:10px; margin-bottom:8px; border:1px dashed var(--line); border-radius:12px; background:var(--bg); }
.advanced-filters[hidden] { display:none; }
.advanced-filters > * { flex:1 1 128px; min-width:120px; }
.list-toolbar { position:relative; margin:8px 0; }
.view-switch,.aggregate-switch { padding:3px; border:1px solid var(--line); border-radius:10px; background:var(--bg); }
.view-switch button,.aggregate-switch button { border:0; border-radius:7px; background:transparent; color:var(--muted); padding:7px 10px; cursor:pointer; font-weight:700; }
.view-switch button.active,.aggregate-switch button.active { background:var(--orange-soft); color:var(--orange); }
.column-menu > div { width:330px; max-height:min(520px,72vh); overflow:auto; padding:10px; }
.column-menu-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:3px 3px 9px; border-bottom:1px solid var(--line); }
.column-menu-head strong { display:block; font-size:12px; }
.column-menu-head small { display:block; margin-top:2px; color:var(--muted); font-size:10px; }
.column-option { display:grid; grid-template-columns:18px 18px minmax(0,1fr) auto; align-items:center; gap:7px; min-height:34px; padding:5px 4px; border-radius:7px; }
.column-option.is-active { cursor:grab; }
.column-option:hover { background:var(--bg); }
.column-drag-handle { color:var(--muted); font-size:13px; text-align:center; user-select:none; }
.column-option:not(.is-active) .column-drag-handle { opacity:.2; }
.column-order-actions { display:flex; gap:3px; }
.column-order-actions button { display:grid; width:25px; height:25px; padding:0; place-items:center; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--muted); cursor:pointer; }
.column-order-actions button:hover:not(:disabled) { border-color:var(--orange); color:var(--orange); background:var(--orange-soft); }
.column-order-actions button:disabled { opacity:.28; cursor:default; }
.column-menu-footer { position:sticky; bottom:-10px; display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:8px -4px -4px; padding:9px 4px 4px; border-top:1px solid var(--line); background:var(--surface); }
.column-menu-footer .save-columns { grid-column:1/-1; }
.column-menu-summary.is-dirty::after { content:' · 未保存'; color:var(--orange); font-size:10px; }
.table-scroll { max-width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.table-scroll table { width:max-content; min-width:100%; margin:0; }
.table-scroll th,.table-scroll td { white-space:nowrap; }
.table-scroll #orders-table th { padding:9px 8px; line-height:1.2; }
.table-scroll #orders-table td { padding:8px; font-size:11px; line-height:1.3; }
.table-scroll #orders-table td small { font-size:10px; line-height:1.25; }
.table-scroll .sticky-left-1 { position:sticky; left:0; z-index:3; background:var(--surface); }
.table-scroll .sticky-left-2 { position:sticky; left:38px; z-index:3; min-width:220px; background:var(--surface); box-shadow:5px 0 8px -8px #000; }
.table-scroll .sticky-right { position:sticky; right:0; z-index:4; background:var(--card); border-left:1px solid var(--line); box-shadow:none; background-clip:padding-box; }
.table-scroll tbody tr:hover .sticky-right { background:color-mix(in srgb,var(--orange) 3.5%,var(--card)); }
.table-scroll #orders-table thead .sticky-right { z-index:5; background:var(--elevated); }
.table-scroll #orders-table th[data-column="plan"],.table-scroll #orders-table td[data-column="plan"] { width:205px; min-width:205px; max-width:205px; overflow:hidden; }
.table-scroll #orders-table th[data-column="rules"],.table-scroll #orders-table td[data-column="rules"] { width:1%; max-width:205px; }
.table-scroll #orders-table th[data-column="evaluated"],.table-scroll #orders-table td[data-column="evaluated"],
.table-scroll #orders-table th[data-column="created"],.table-scroll #orders-table td[data-column="created"] { width:1%; }
.table-scroll #orders-table th[data-column="actions"],.table-scroll #orders-table td[data-column="actions"] { width:188px; min-width:188px; max-width:188px; }
.stop-protection-cell { display:flex; width:max-content; max-width:198px; min-width:0; align-items:center; gap:5px; flex-wrap:wrap; }
.stop-protection-cell>small { flex:1 0 100%; margin-top:0; }
.freshness { display:inline-flex; align-items:center; gap:5px; }
.freshness::before { content:""; width:7px; height:7px; border-radius:50%; background:#999; }
.freshness.latest::before { background:var(--green); }.freshness.delayed::before { background:#d89b00; }.freshness.stale::before,.freshness.offline::before { background:#d54a55; }
.aggregate-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px; margin-top:10px; }
.aggregate-card { padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.aggregate-card h4 { margin:0 0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aggregate-metrics { display:grid; grid-template-columns:repeat(2,1fr); gap:7px; color:var(--muted); font-size:11px; }
.aggregate-metrics strong { display:block; color:var(--text); font-size:14px; }
.video-aggregate-shell { grid-column:1/-1; }
.video-aggregate-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.video-aggregate-toolbar input { width:min(320px,100%); min-width:220px; }
.video-aggregate-toolbar select { min-width:126px; }
.video-aggregate-toolbar .muted { margin-left:auto; }
.video-aggregate-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:10px; }
.video-aggregate-card { display:grid; grid-template-columns:86px minmax(0,1fr); gap:12px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:13px; background:var(--surface); }
.video-aggregate-cover { position:relative; width:86px; height:114px; overflow:hidden; border-radius:9px; background:var(--elevated); }
.video-aggregate-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.video-order-badge { position:absolute; top:6px; left:6px; padding:3px 6px; border-radius:999px; background:var(--green); color:#fff; font-size:9px; font-weight:800; }
.video-order-badge.pending { background:var(--amber); }
.video-aggregate-copy { min-width:0; }
.video-aggregate-copy h4 { margin:0 0 5px; overflow:hidden; color:var(--text); font-size:13px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.video-aggregate-meta { margin:0 0 9px; overflow:hidden; color:var(--muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.video-aggregate-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.video-aggregate-metrics span { min-width:0; color:var(--muted); font-size:9px; }
.video-aggregate-metrics strong { display:block; margin-top:3px; overflow:hidden; color:var(--text); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.video-aggregate-metrics .conversion strong { color:var(--green); }
.video-aggregate-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:9px; }
.video-aggregate-warning { color:var(--amber); font-size:9px; line-height:1.4; }
.video-aggregate-foot .btn { min-height:28px; padding-inline:9px; font-size:10px; }
.detail-tabs { display:flex; gap:4px; margin:10px 0; border-bottom:1px solid var(--line); }
.detail-tabs button { padding:8px 10px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--muted); cursor:pointer; }
.detail-tabs button.active { border-color:var(--orange); color:var(--orange); }
#detail-dialog { justify-content:flex-end; align-items:stretch!important; padding:0!important; background:var(--overlay,color-mix(in srgb,var(--text) 36%,transparent)); backdrop-filter:none; -webkit-backdrop-filter:none; }
#detail-dialog .dialog { width:min(820px,92vw)!important; max-width:none!important; height:100dvh!important; max-height:100dvh!important; margin:0!important; box-sizing:border-box; border-radius:16px 0 0 16px; overflow:auto; }
#detail-dialog.show > .dialog { animation:detail-drawer-in .28s cubic-bezier(.22,1,.36,1); }
@keyframes detail-drawer-in { from { transform:translateX(100%); opacity:.5; } to { transform:translateX(0); opacity:1; } }
.detail-skeleton { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
.detail-skeleton .sk-row { display:flex; align-items:center; justify-content:space-between; height:40px; border-bottom:1px dashed var(--line); }
.detail-skeleton .sk-bar { width:35%; height:12px; border-radius:6px; background:linear-gradient(90deg,var(--elevated) 25%,var(--surface) 50%,var(--elevated) 75%); background-size:720px 100%; animation:order-row-shimmer 1.15s linear infinite; }
.detail-skeleton .sk-row .sk-bar:last-child { width:44%; }
.detail-bid-fields .sk-bar { display:inline-block; width:100px; height:12px; border-radius:6px; background:linear-gradient(90deg,var(--elevated) 25%,var(--surface) 50%,var(--elevated) 75%); background-size:720px 100%; animation:order-row-shimmer 1.15s linear infinite; }
.detail-bid-fields { display:contents; }
.detail-realtime-pending .sk-bar { display:inline-block; width:80px; height:12px; border-radius:6px; background:linear-gradient(90deg,var(--elevated) 25%,var(--surface) 50%,var(--elevated) 75%); background-size:720px 100%; animation:order-row-shimmer 1.15s linear infinite; }
.detail-skeleton .sk-wide { grid-column:1/-1; height:42px; }
@media(prefers-reduced-motion:reduce) { #detail-dialog.show > .dialog,.detail-skeleton .sk-bar,.detail-bid-fields .sk-bar,.detail-realtime-pending .sk-bar { animation:none; } }
.detail-dialog-head { position:sticky; z-index:4; top:-20px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:-20px -20px 12px; padding:17px 20px 12px; border-bottom:1px solid var(--line); background:var(--surface); }
.detail-dialog-head h3 { min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#detail-dialog .detail-dialog-close { display:grid; flex:0 0 44px; place-items:center; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border:1px solid transparent; border-color:transparent!important; border-radius:8px; background:transparent!important; box-shadow:none; color:var(--muted)!important; transform:none!important; }
#detail-dialog .detail-dialog-close:hover { border-color:transparent!important; background:var(--elevated)!important; color:var(--text)!important; }
#detail-dialog .detail-dialog-close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
#detail-dialog > .dialog { padding:0!important; }
#detail-dialog .detail-dialog-head { top:0!important; margin:0!important; padding:12px 20px!important; background:var(--surface); z-index:10; border-radius:16px 0 0 0; }
#detail-dialog #detail-body { padding:0 20px 20px; }
/* 订单详情（209）：关键指标卡 + 分组字段（标签在上、数值在下），素材卡片 / 成交记录表格 / 计划日志列表统一样式。 */
#detail-dialog .detail-dialog-head h3 #detail-pid { margin-left:6px; font-family:var(--font,var(--font-cjk)); font-size:13px; font-weight:400; font-variant-numeric:tabular-nums; }
#detail-dialog #detail-body > p.muted:first-child { margin:14px 0 4px; font-size:12px; }
#detail-body .detail-tabs { gap:2px; margin:6px 0 18px; }
#detail-body .detail-tabs button { padding:10px 14px; font-size:14px; font-weight:500; }
#detail-body .detail-tabs button.active { font-weight:600; }
#detail-body .detail-warning { margin:-8px 0 14px; padding:9px 12px; border-radius:8px; background:var(--amber-soft); color:var(--amber); font-size:13px; }
#detail-body .detail-grid .item .k { color:var(--muted); }
#detail-body .detail-head-grid { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:start; margin:0 0 16px; }
#detail-body .detail-head-grid .item { display:flex; flex-direction:column; gap:4px; padding:0; border:0; font-size:12px; }
#detail-body .detail-head-grid .item:first-child > span:last-child { color:var(--text); font-size:17px; font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
#detail-body .detail-head-grid .item:nth-child(2) { align-items:flex-end; }
#detail-body .detail-head-grid .item:nth-child(2) > span:last-child { padding:4px 11px; border-radius:999px; background:var(--elevated); color:var(--text); font-size:13px; font-weight:600; white-space:nowrap; }
#detail-body .detail-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:0 0 22px; }
#detail-body .detail-kpis .item { display:flex; flex-direction:column; justify-content:flex-start; gap:8px; min-width:0; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--card); font-size:12px; }
#detail-body .detail-kpis .item > span:last-child { color:var(--text); font-size:20px; font-weight:700; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#detail-body .detail-kpis .item.is-good > span:last-child { color:var(--green); }
#detail-body .detail-kpis .item.is-warn > span:last-child { color:var(--danger); }
#detail-body .detail-group { margin:0 0 22px; }
#detail-body .detail-group > h4 { margin:0 0 10px; color:var(--text); font-size:15px; }
#detail-body .detail-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 20px; padding:16px 18px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
#detail-body .detail-fields .item { display:flex; flex-direction:column; justify-content:flex-start; gap:4px; min-width:0; padding:0; border:0; font-size:12px; }
#detail-body .detail-fields .item > span:last-child { color:var(--text); font-size:14px; font-weight:500; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
#detail-body .detail-rules-card { padding:14px 18px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
#detail-body .detail-rules-card .detail-rule-evaluated { margin-top:12px; }
#detail-body .detail-materials-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 14px; }
#detail-body .detail-chip { display:inline-flex; align-items:center; height:26px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--text); font-size:13px; font-weight:500; }
#detail-body .detail-chip.is-good { border-color:color-mix(in srgb,var(--green) 35%,var(--line)); background:var(--green-soft); color:var(--green); }
#detail-body .detail-chip.is-danger { border-color:color-mix(in srgb,var(--danger) 35%,var(--line)); background:color-mix(in srgb,var(--danger) 8%,transparent); color:var(--danger); }
#detail-body .detail-materials-note { color:var(--muted); font-size:12px; }
#detail-body .video-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); align-items:start; gap:12px; margin:0 0 16px; }
#detail-body .video-card { display:grid; grid-template-columns:84px minmax(0,1fr); grid-template-rows:max-content minmax(0,1fr) auto; grid-template-areas:"img vd" "img metrics" "img tip"; column-gap:12px; box-sizing:border-box; width:auto; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
#detail-body .video-card img { grid-area:img; width:84px; height:112px; border-radius:8px; object-fit:cover; background:var(--elevated); }
#detail-body .video-card .vd { grid-area:vd; height:auto; min-height:0; padding:0 0 8px; color:var(--text); font-size:13px; line-height:1.5; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
#detail-body .video-card .badge { top:16px; left:16px; padding:2px 7px; border-radius:999px; font-size:11px; font-weight:600; }
#detail-body .video-card .order-badge { top:12px; right:12px; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:600; }
#detail-body .video-card.has-order .vd { padding-right:78px; }
#detail-body .video-card:not(:has(.issue-tip)) { height:138px; }
#detail-body .video-card img { grid-row:1 / -1; align-self:start; }
#detail-body .video-card .video-metrics { grid-area:metrics; align-self:end; display:grid; grid-template-columns:repeat(3,auto) minmax(0,1fr); gap:6px 16px; margin:0; padding:8px 0 0; border-top:1px solid var(--sep); }
#detail-body .video-card .video-metrics > div { min-width:0; }
#detail-body .video-card .video-metrics dt { color:var(--muted); font-size:11px; }
#detail-body .video-card .video-metrics dd { margin:2px 0 0; color:var(--text); font-size:13px; font-weight:500; font-variant-numeric:tabular-nums; }
#detail-body .video-card .video-metrics .conversion { grid-column:auto; }
#detail-body .video-card .video-metrics .conversion dd { color:var(--green); font-weight:600; }
#detail-body .video-card .issue-tip { grid-area:tip; padding:6px 0 0; font-size:12px; }
#detail-body .detail-record-controls { gap:10px; margin:0 0 12px; font-size:13px; color:var(--muted); }
#detail-body .detail-record-controls input[type="date"] { height:34px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--text); font:inherit; }
#detail-body .detail-daily-result { margin:0 0 14px; padding:12px 16px; border-color:color-mix(in srgb,var(--green) 30%,var(--line)); border-radius:12px; background:var(--green-soft); color:var(--text); font-size:14px; font-weight:500; }
#detail-body .detail-daily-result.is-pending { border-color:color-mix(in srgb,var(--amber) 35%,var(--line)); background:var(--amber-soft); }
#detail-body div.detail-record-gap { margin:0 0 14px; padding:10px 14px; border-radius:10px; background:var(--amber-soft); color:var(--amber); font-size:13px; }
#detail-body .detail-record-gap td { background:var(--amber-soft); color:var(--amber); font-size:12px; }
#detail-body details { margin:0 0 14px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
#detail-body details > summary { padding:11px 16px; cursor:pointer; font-size:14px; font-weight:500; }
#detail-body details > .table-wrap { border:0; border-top:1px solid var(--line); border-radius:0; }
#detail-body .table-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--card); }
#detail-body .table-wrap table { width:100%; min-width:0; border-collapse:collapse; font-size:13px; }
#detail-body .table-wrap th { position:static; padding:9px 10px; background:var(--elevated); color:var(--muted); font-size:12px; font-weight:500; text-align:left; white-space:normal; line-height:1.4; }
#detail-body .table-wrap td { padding:10px 10px; border-top:1px solid var(--sep); color:var(--text); font-variant-numeric:tabular-nums; white-space:nowrap; }
#detail-body .table-wrap tbody tr:hover td { background:var(--hover-bg); }
#detail-body .detail-record-pagination { margin-top:12px; color:var(--muted); font-size:13px; }
#detail-body .detail-audit { margin:0; padding:0; list-style:none; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
#detail-body .detail-audit li { display:grid; grid-template-columns:150px 110px minmax(0,1fr) auto; gap:12px; align-items:baseline; padding:11px 16px; border-top:1px solid var(--sep); font-size:13px; }
#detail-body .detail-audit li:first-child { border-top:0; }
#detail-body .detail-audit time { color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
#detail-body .detail-audit-actor { color:var(--text); font-weight:500; }
#detail-body .detail-audit-action { color:var(--text); overflow-wrap:anywhere; }
#detail-body .detail-audit-result { color:var(--muted); font-size:12px; }
#detail-body .detail-empty { padding:28px 0; color:var(--muted); text-align:center; font-size:13px; }
@media (max-width:760px) {
  #detail-body .detail-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #detail-body .detail-fields { grid-template-columns:repeat(2,minmax(0,1fr)); padding:14px; }
  #detail-body .detail-audit li { grid-template-columns:1fr auto; gap:4px 10px; }
  #detail-body .detail-audit time { grid-column:1/-1; }
  #detail-body .table-wrap table { min-width:560px; }
}
.sync-progress { display:inline-flex; align-items:center; gap:5px; }
@media (max-width:900px) {
  .secondary-stats { grid-template-columns:repeat(2,1fr); }
  .common-filters input { min-width:100%; }
  .list-toolbar { align-items:flex-start; }
  .group-grid,.aggregate-list { grid-template-columns:1fr; }
  .video-aggregate-grid { grid-template-columns:1fr; }
  #detail-dialog .dialog { width:calc(100vw - 24px)!important; border-radius:16px 0 0 16px; }
}
.dashboard-card { padding:14px 20px 10px; }
.dashboard-card .dashboard-toolbar { gap:14px; }
.dashboard-card .dashboard-toolbar > div:first-child { min-width:118px; }
.dashboard-card .dashboard-toolbar h3 { margin:0; font-size:14px; }
.dashboard-card .dashboard-controls { gap:7px; }
.dashboard-card .dashboard-controls .ui-select-trigger { min-height:34px; padding:0 10px; gap:7px; border-radius:10px; font-size:12px; }
.dashboard-card .dashboard-controls .ui-select-chevron { width:14px; height:14px; flex-basis:14px; }
.dashboard-card .dashboard-controls .ui-select-chevron svg { width:13px; height:13px; }
.dashboard-card .dashboard-refresh-btn { width:34px; height:34px; min-width:34px; min-height:34px; border-radius:10px; }
.dashboard-card .dashboard-refresh-btn svg { width:15px; height:15px; }
.dashboard-card .stat-row { gap:10px; margin:10px 0 2px !important; }
.dashboard-card .stat { padding:12px 14px; border-radius:12px; }
.dashboard-card .stat .v { margin-top:5px; font-size:20px; }
.dashboard-card .expand-arrow { padding-top:2px; }
.dashboard-card .expand-arrow .trend-toggle { width:22px; height:22px; }
@media (max-width:1100px) {
  .monitor-page-intro { grid-template-columns:1fr; }
  .monitor-title-controls { justify-content:flex-start; }
}
.account-count-value { display:flex; align-items:flex-end; gap:4px; white-space:nowrap; }
.account-count-value .account-count-number { font-size:1em; line-height:1; }
.account-count-value small { margin:0 1px 2px 0; color:var(--muted); font-family:var(--font); font-size:10px; font-weight:650; letter-spacing:0; }
.account-count-value .account-count-separator { margin:0 2px 1px; color:var(--faint); font-family:var(--font); font-size:15px; font-weight:500; }
.order-monitor-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.order-monitor-head h3 { margin:0; }
/* 计划明细条数：去掉整句说明，只在标题后挂一个小框，数字在前、单位退后，完整说明留在 title。 */
#orders-summary { margin-left:8px; }
/* style.css 的 .order-snapshot-hint 用了 display:inline-flex，压过了 [hidden]，
   没有同步提示时会留一个小空框，跟着条数一起挂在标题后面。 */
.order-snapshot-hint[hidden] { display:none; }
.orders-summary-count { display:inline-flex; align-items:baseline; gap:3px; padding:2px 8px 3px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); font-variant-numeric:tabular-nums; }
.orders-summary-count b { font-family:var(--font-latin,var(--font)); font-size:14px; font-weight:650; line-height:1.35; }
.orders-summary-count i { font-style:normal; font-size:12px; font-weight:500; color:var(--muted); }
.order-monitor-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.order-monitor-tools select { min-width:132px; }
.order-pagination { display:flex; align-items:center; justify-content:flex-end; gap:6px; width:100%; margin-top:14px; color:var(--muted); font-size:13px; flex-wrap:wrap; }
.order-page-summary { margin-right:6px; white-space:nowrap; }
.order-page-numbers { display:flex; align-items:center; gap:6px; }
.order-page-button { display:inline-grid; width:34px; height:34px; min-width:34px; padding:0; place-items:center; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--text); font:650 13px/1 var(--font); cursor:pointer; }
.order-page-button:hover:not(:disabled) { border-color:var(--orange); color:var(--orange); background:var(--orange-soft); }
.order-page-button.active { border-color:var(--orange); background:var(--orange); color:#fff; box-shadow:0 3px 9px rgba(255,91,46,.18); }
.order-page-button:disabled { cursor:not-allowed; color:var(--faint); background:var(--bg); opacity:.7; }
.order-page-arrow svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.order-page-ellipsis { display:inline-grid; width:24px; height:34px; place-items:center; color:var(--muted); user-select:none; }
.order-pagination select { width:120px; min-width:120px; height:34px; margin-left:4px; padding-block:0; border-radius:9px; font-size:13px; }
.order-pagination>.ui-select { width:120px; min-width:120px; max-width:120px; flex:0 0 120px; margin-left:4px; }
.order-pagination>.ui-select .ui-select-trigger { width:100%; min-height:34px; height:34px; padding:0 9px; border-radius:9px; font-size:12px; white-space:nowrap; }
.order-pagination>.ui-select .ui-select-chevron { width:14px; height:14px; flex-basis:14px; }
.order-pagination>.ui-select .ui-select-chevron svg { width:13px; height:13px; }
@media (max-width:600px) {
  #pay-dialog .dialog { width:94vw !important; box-sizing:border-box; }
  .pay-qr-wrap { width:min(76vw,320px); max-width:100%; height:auto; aspect-ratio:1/1; }
  .qr-minimized-chip { right:12px; max-width:calc(100vw - 24px); }
  .monitor-title-controls { width:100%; margin-left:0; flex-wrap:wrap; }
  .monitor-title-controls #range-field,.monitor-title-controls .sph-range-picker { width:100%; }
  .order-monitor-head { align-items:flex-start; flex-direction:column; }
  .order-monitor-tools { width:100%; justify-content:flex-start; }
  .order-monitor-tools select { flex:1; min-width:0; }
  .sph-side-tool { min-height:44px; padding:0 12px; }
  .video-aggregate-toolbar { align-items:stretch; }
  .video-aggregate-toolbar input,.video-aggregate-toolbar select,.video-aggregate-toolbar .btn { width:100%; min-width:0; }
  .video-aggregate-toolbar .muted { width:100%; margin-left:0; }
  .video-aggregate-card { grid-template-columns:70px minmax(0,1fr); padding:10px; }
  .video-aggregate-cover { width:70px; height:94px; }
  .video-aggregate-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .order-pagination { gap:5px; }
  .order-page-summary { width:100%; margin:0 0 2px; text-align:right; }
  .order-page-numbers { gap:5px; }
  .order-page-button { width:42px; height:42px; min-width:42px; border-radius:10px; }
  .order-page-ellipsis { width:18px; height:42px; }
  .order-pagination select { width:106px; min-width:106px; height:42px; margin-left:0; }
  .order-pagination>.ui-select { width:106px; min-width:106px; max-width:106px; flex-basis:106px; margin-left:0; }
  .order-pagination>.ui-select .ui-select-trigger { min-height:42px; height:42px; }
}

/* 计划列表首页：筛选、核心指标、明细表保持一个连续工作区。 */
.plan-list-card{padding:12px 18px 18px}.plan-head-actions{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:7px}
.primary-metrics{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:0;cursor:pointer;touch-action:manipulation;transition:box-shadow .18s ease}.primary-metrics::after{content:"";position:absolute;right:9px;bottom:7px;width:0;height:0;border-right:4px solid transparent;border-bottom:0;border-left:4px solid transparent;border-top:5px solid var(--orange);pointer-events:none;transition:transform .18s ease}.primary-metrics:hover,.primary-metrics:focus-visible{border-radius:14px;box-shadow:0 0 0 1px color-mix(in srgb,var(--orange) 28%,var(--line));outline:none}.primary-metrics:focus-visible{outline:2px solid color-mix(in srgb,var(--orange) 42%,transparent);outline-offset:2px}.primary-metrics[aria-expanded="true"]::after{transform:rotate(180deg)}.primary-metric{position:relative;min-width:0;padding:12px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-sm);overflow:visible}.primary-metric::before{content:"";position:absolute;inset:0 auto 0 0;width:3px;border-radius:12px 0 0 12px;background:var(--orange)}.primary-metric.tone-green::before{background:var(--green)}.primary-metric.tone-amber::before{background:var(--amber)}.primary-metric.tone-cyan::before{background:var(--cyan)}.primary-metric .metric-label{display:flex;min-width:0;align-items:center;gap:5px;color:var(--muted);font-size:11px;font-weight:650;white-space:nowrap}.primary-metric .metric-label>i{display:grid;width:18px;height:18px;flex:0 0 18px;place-items:center;border-radius:5px;background:var(--orange-soft);color:var(--orange);font-size:9px;font-style:normal;font-weight:850}.primary-metric.tone-green .metric-label>i{background:var(--green-soft);color:var(--green)}.primary-metric.tone-amber .metric-label>i{background:color-mix(in srgb,var(--amber) 14%,transparent);color:var(--amber)}.primary-metric.tone-cyan .metric-label>i{background:color-mix(in srgb,var(--cyan) 14%,transparent);color:var(--cyan)}.primary-metric>strong{display:block;margin-top:8px;overflow:hidden;color:var(--text);font:800 21px/1.05 var(--font-mono,monospace);letter-spacing:-.035em;text-overflow:ellipsis;white-space:nowrap}.metric-help{position:relative;display:grid;width:15px;height:15px;flex:0 0 15px;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--muted);font-size:9px;cursor:help}.metric-help::after{content:attr(data-tip);position:absolute;z-index:70;left:50%;bottom:calc(100% + 8px);width:max-content;max-width:260px;padding:7px 9px;border-radius:8px;background:#272522;color:#fff;font-size:11px;font-weight:550;line-height:1.45;white-space:normal;box-shadow:var(--shadow-soft);opacity:0;pointer-events:none;transform:translate(-50%,4px);transition:opacity .16s ease,transform .16s ease}.metric-help:hover::after,.metric-help:focus-visible::after{opacity:1;transform:translate(-50%,0)}
.plan-list-card #expand-body{margin-top:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--bg)}.plan-list-card #expand-body.show{display:block}.plan-list-card .secondary-stats{grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:0}.secondary-stat{min-height:64px;padding:10px 11px}.secondary-stat strong{overflow:hidden;font:800 15px/1.15 var(--font-mono,monospace);text-overflow:ellipsis;white-space:nowrap}.plan-table-head{margin:16px 0 8px;padding-top:14px;border-top:1px solid var(--line)}.plan-table-head>div:first-child{display:flex;align-items:baseline;gap:9px}.plan-list-card .list-toolbar{justify-content:flex-end;margin:0 0 8px}.plan-list-card .aggregate-list{margin-top:8px}.plan-filter-card + .plan-detail-card{margin-top:0;border-top:1px solid var(--line);border-radius:0 0 14px 14px}.plan-filter-card + .plan-detail-card .plan-table-head{margin-top:0}
.monitor-insights-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,.85fr);gap:12px;margin-top:12px}.insight-card{min-width:0;margin-bottom:0;padding:16px 18px;border-color:var(--line);background:var(--surface);box-shadow:none}.insight-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.insight-head h3{margin:0 0 3px;font-size:14px}.insight-head .muted{font-size:10px}.insight-head .trend-controls{justify-content:flex-end;flex-wrap:nowrap}.insight-head .trend-controls select{width:118px;min-width:0}.trend-box{display:block;height:250px;padding:0;overflow-x:auto;overflow-y:hidden;border:1px solid var(--line);border-radius:12px;background:linear-gradient(180deg,var(--surface),var(--bg))}.trend-chart-scroll{min-width:100%;height:100%}.trend-chart-scroll svg{display:block;width:100%;height:100%;min-width:620px}.trend-grid-line{stroke:var(--line);stroke-width:1}.trend-axis-label{fill:var(--muted);font-size:10px}.trend-line-primary,.trend-line-secondary{fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.trend-line-primary{stroke:var(--orange)}.trend-line-secondary{stroke:var(--green)}.trend-point-primary{fill:var(--surface);stroke:var(--orange);stroke-width:2}.trend-point-secondary{fill:var(--surface);stroke:var(--green);stroke-width:2}.legend-row{align-items:center;margin:8px 0 0}.legend-row small{color:var(--muted)}.rank-insight-card #rank-list{min-height:250px}.rank-insight-card .rank-item{gap:8px;padding:9px 2px}.rank-insight-card .rank-item>span:nth-child(2){width:120px!important}.rank-insight-card .rank-item .val{width:78px}.rank-insight-card .bar-wrap{min-width:48px}
@media(max-width:1700px){.primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1250px){.plan-list-card .secondary-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.advanced-filters{grid-template-columns:repeat(4,minmax(124px,1fr))}.monitor-insights-grid{grid-template-columns:1fr}}
@media(max-width:900px){.monitor-title-controls{flex-wrap:wrap;justify-content:flex-start}.monitor-sync-actions{flex:1 1 100%;justify-content:flex-start}.plan-list-card .secondary-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.plan-list-card{padding:12px}.plan-head-actions .btn,.plan-head-actions .action-menu summary{min-height:40px}.monitor-sync-actions{width:100%;flex-wrap:wrap;gap:6px}.primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.primary-metric{padding:9px 7px}.primary-metric>strong{margin-top:6px;font-size:16px}.primary-metric .metric-label{gap:3px;font-size:9px;letter-spacing:-.035em}.primary-metric .metric-label>i{width:16px;height:16px;flex-basis:16px;font-size:8px}.primary-metric .metric-help{width:13px;height:13px;flex-basis:13px;font-size:8px}.metric-help::after{display:none}.plan-list-card .secondary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.plan-table-head{align-items:flex-start;flex-direction:column}.plan-table-head>div:first-child{align-items:flex-start;flex-direction:column;gap:2px}.insight-card{padding:14px}.insight-head{align-items:flex-start;flex-direction:column}.insight-head .trend-controls{display:grid;width:100%;grid-template-columns:1fr;gap:7px;overflow:visible}.insight-head .trend-controls select{width:100%;min-width:0;min-height:42px}.trend-box{height:235px}.rank-insight-card #rank-list{min-height:0}.rank-insight-card .rank-item>span:nth-child(2){width:104px!important}.monitor-page-intro{padding-bottom:12px}}
@media(max-width:420px){.primary-metric{padding-inline:6px}.primary-metric>strong{font-size:15px}.primary-metric .metric-label{font-size:8.5px}.advanced-filters{grid-template-columns:1fr}.advanced-filters .threshold-setting{grid-column:auto}.plan-list-card .secondary-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.secondary-stat strong{font-size:13px}}
@media(max-width:760px){
  .monitor-page-intro{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
  .monitor-title-row{overflow:hidden;flex-wrap:nowrap}
  .monitor-title-row .live-chip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* 圆形单图标按钮必须重置桌面下拉框的 space-between，否则三角图标会贴左。 */
  .sph-range-popover{position:fixed!important;z-index:220;top:calc(68px + env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right))!important;left:max(10px,env(safe-area-inset-left))!important;width:auto!important;min-width:0!important;max-width:none!important;max-height:calc(100dvh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom));box-sizing:border-box;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
  .op-links{width:196px;min-width:196px;padding-inline:10px!important}
  .op-links .plan-action{height:28px;min-height:28px;padding:0 9px;border-radius:6px;font-size:13px}
  .plan-table-head .order-actions{width:100%;flex-wrap:nowrap}
  .plan-table-head .order-actions>*{flex:1 1 0;min-width:0}
  .plan-table-head .order-actions .btn{width:100%;padding-inline:6px;white-space:nowrap;font-size:11px}
  #detail-dialog .dialog{width:calc(100vw - 18px)!important;max-width:calc(100vw - 18px)!important;padding:18px max(16px,env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-radius:14px 0 0 14px}
  .detail-dialog-head{top:-18px;margin:-18px -16px 10px;padding:calc(14px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left))}
  .detail-tabs{position:sticky;z-index:3;top:53px;overflow-x:auto;background:var(--surface)}
  .detail-tabs button{flex:1 0 auto;white-space:nowrap}
.detail-grid{grid-template-columns:1fr;gap:0}
  .plan-head-actions .action-menu-pop{left:0;right:auto}
  .column-menu>div{width:min(330px,calc(100vw - 30px));max-width:calc(100vw - 30px)}
}

/* 投流监控筛选区：独立卡片、统一控件比例，并允许桌面自然换行。 */
.plan-filter-card{position:relative;z-index:32;margin:12px 0 0;padding:12px 16px;overflow:visible;border-color:var(--line);border-radius:14px 14px 0 0;background:var(--surface);box-shadow:var(--shadow-sm)}
.plan-filter-shell{position:relative;min-width:0;container-type:inline-size}
.plan-filter-strip{display:flex;min-width:0;align-items:center;align-content:flex-start;gap:8px;width:100%;margin:0;padding:0;overflow:visible;flex-wrap:wrap}
/* 筛选按钮、状态胶囊、筛选面板头只在手机端出现；手机布局统一在 monitor-mobile.css。 */
.plan-filter-toggle,.mobile-filter-sheet-head,.mobile-sheet-extra,.order-page-indicator,.batch-bar>.batch-select-page,.action-menu-pop>.mobile-menu-only{display:none!important}
.plan-filter-strip>select,.plan-filter-strip>.ui-select{flex:1 1 110px;width:auto;min-width:106px;max-width:220px}
.plan-filter-strip>.ui-select:has(#creator-filter){flex-basis:118px}
.plan-filter-strip>.ui-select:has(#account-filter){flex-basis:128px;min-width:116px;max-width:224px}
.plan-filter-strip :is(select,input,.ui-select-trigger,.author-filter-trigger){height:38px;min-height:38px;box-sizing:border-box;border-radius:8px;font-size:13px;font-weight:500;line-height:1.2}
.plan-filter-strip .ui-select-trigger{width:100%;gap:6px;padding:0 11px;letter-spacing:0}
.plan-filter-strip .ui-select-value{min-width:0}
.plan-filter-strip .ui-select-value-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan-filter-strip .ui-select-chevron{width:14px;height:14px;flex:0 0 14px}
.plan-filter-strip .ui-select-chevron svg{width:13px;height:13px}
.plan-filter-icon{position:relative;display:grid;width:40px;height:38px;min-width:40px;min-height:38px;flex:0 0 40px;place-items:center;padding:0;border-radius:8px;overflow:visible}
.plan-filter-icon svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.plan-search-control{display:flex;height:38px;min-width:150px;max-width:220px;flex:1 1 150px;align-items:center;gap:4px;animation:plan-search-open .2s cubic-bezier(.2,.7,.3,1)}
@keyframes plan-search-open{0%{opacity:0;flex-grow:0;flex-basis:44px;min-width:44px;max-width:44px}100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.plan-search-control{animation:none}}
.plan-search-control[hidden]{display:none}
.plan-search-control input{width:100%;min-width:0;padding-inline:11px}
.author-filter-combobox{position:relative;flex:1 1 120px;width:auto;min-width:116px;max-width:220px}
.author-filter-trigger{display:flex;width:100%;align-items:center;justify-content:space-between;gap:6px;padding:0 11px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer;box-shadow:none;font:inherit;font-weight:500;transition:border-color .15s ease,background-color .15s ease}
.author-filter-trigger:hover{border-color:color-mix(in srgb,var(--text) 22%,var(--line))}.author-filter-combobox.is-open .author-filter-trigger{border-color:color-mix(in srgb,var(--orange) 55%,var(--line));box-shadow:none}
.author-filter-trigger>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.author-filter-trigger svg{width:14px;height:14px;flex:0 0 14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}
/* 筛选区所有触发器同一外观：卡片底、细边线、无浮起阴影（被投作者与普通下拉、图标按钮一致）。 */
.plan-filter-strip :is(.ui-select-trigger,.author-filter-trigger,.plan-filter-icon){background:var(--card);box-shadow:none}
/* 被投作者与普通下拉同一交互：箭头展开旋转、菜单同款弹出动画、搜索框细边聚焦。 */
.author-filter-trigger svg{transition:transform .2s ease,color .18s ease}
.author-filter-combobox.is-open .author-filter-trigger svg{transform:rotate(180deg) scale(.82);color:var(--text)}
.author-filter-menu:not([hidden]){animation:ui-select-in .16s ease-out}
.author-filter-search:focus,.author-filter-search:focus-visible{outline:none;border-color:color-mix(in srgb,var(--orange) 55%,var(--line));box-shadow:none}
@media(prefers-reduced-motion:reduce){.author-filter-trigger svg{transition:none}.author-filter-menu{animation:none!important}}
/* 顶部控件同高：「创建时间」下拉、日期、刷新与更多按钮统一 38px。 */
@media(min-width:761px){
  .monitor-title-controls .ui-select-trigger{height:38px;min-height:38px;border-radius:8px;font-size:14px;box-shadow:none;background:var(--card)}
  .monitor-title-controls .sph-range-toggle{background:var(--card)}
  .monitor-title-controls :is(.monitor-refresh-button,.action-menu-trigger){width:38px;min-width:38px;height:38px;min-height:38px;border-radius:8px}
}
.author-filter-menu{position:fixed;z-index:250;width:min(360px,calc(100vw - 24px));padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow-lg)}
.author-filter-menu[hidden]{display:none}
.author-filter-search{width:100%;height:36px;min-height:36px;padding:0 11px;border-radius:8px;font-size:13px;box-sizing:border-box}
.author-filter-options{display:grid;gap:3px;max-height:260px;margin-top:8px;overflow:auto;overscroll-behavior:contain}
.author-filter-option{display:flex;width:100%;min-height:34px;align-items:center;justify-content:space-between;gap:10px;padding:6px 10px;border:0;border-radius:6px;font-size:13px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
.author-filter-option:hover,.author-filter-option:focus-visible{background:color-mix(in srgb,var(--text) 5%,transparent)}.author-filter-option[aria-selected="true"]{background:var(--orange-soft);color:var(--orange)}
.author-filter-option>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.author-filter-option small{flex:0 0 auto;color:var(--muted);font-size:11px}
.author-filter-empty{margin:14px 8px;color:var(--muted);font-size:13px;text-align:center}
.advanced-filter-anchor{position:relative;display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;flex:0 0 44px;overflow:visible}
.advanced-filter-toggle[aria-expanded="true"],.advanced-filter-toggle.has-filters{border-color:var(--orange);background:var(--orange-soft);color:var(--orange)}
.advanced-filter-badge{position:absolute;z-index:2;top:-7px;right:-7px;display:grid;min-width:19px;height:19px;padding:0 4px;place-items:center;border:2px solid var(--surface);border-radius:999px;background:var(--orange);color:#fff;font-size:10px;font-weight:800;line-height:15px;box-sizing:border-box}
.advanced-filter-badge[hidden]{display:none}
.plan-filter-actions{display:flex;min-width:158px;max-width:100%;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;white-space:nowrap}
.plan-filter-actions .btn{height:38px;min-height:38px;flex:0 0 auto;border-radius:10px;font-size:13px;white-space:nowrap}
#clear-filter-button{width:64px;padding-inline:10px}
#apply-filter-button{width:86px;padding-inline:12px}
@keyframes advanced-filters-in-down{from{opacity:0;transform:translateY(-6px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes advanced-filters-in-up{from{opacity:0;transform:translateY(6px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
.advanced-filters{position:fixed;z-index:240;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:9px 12px;width:min(552px,calc(100vw - 32px));max-height:calc(100dvh - 24px);margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-lg);overflow:auto;overscroll-behavior:contain;box-sizing:border-box;transform-origin:top right;animation:advanced-filters-in-down .18s cubic-bezier(.2,.7,.3,1)}
.advanced-filters.opens-above{transform-origin:bottom right;animation-name:advanced-filters-in-up}
.advanced-filters[hidden]{display:none}
.advanced-filter-head{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-1px 0 0}
.advanced-filter-head h3{margin:0;font-size:15px}
.advanced-filter-close{display:grid;width:28px;height:28px;place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:20px;line-height:1;cursor:pointer}
.advanced-filter-close:hover{background:var(--orange-soft);color:var(--orange)}
.advanced-field{display:grid;min-width:0;width:100%;gap:4px;align-content:start}
.advanced-field>span:first-child{color:var(--text);font-size:12px;font-weight:700;line-height:1.25}
.advanced-field>select,.advanced-field>input,.advanced-field>.ui-select{width:100%;min-width:0;box-sizing:border-box}
.advanced-field>.ui-select{display:block}
.advanced-field :is(input,.ui-select-trigger){width:100%;height:34px;min-height:34px;border-radius:9px;font-size:13px;box-sizing:border-box}
.advanced-field .ui-select-trigger{padding-inline:12px}
.threshold-setting{grid-column:auto;display:grid;white-space:normal}
.threshold-control{display:flex;align-items:center;gap:7px;min-width:0}
.threshold-control input{width:auto;min-width:0;flex:1 1 auto}
.threshold-control em{color:var(--muted);font-size:12px;font-style:normal}
.threshold-control .btn{height:34px;min-width:54px;padding-inline:10px}
.advanced-filter-actions{position:sticky;bottom:-12px;grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin:0 -14px -12px;padding:9px 14px 12px;border-top:1px solid var(--line);background:var(--surface)}
.advanced-filter-actions .btn{height:36px;min-width:84px;border-radius:10px;font-size:13px}
/* 计划明细首屏加载骨架：网络/快照未就绪时显示微光占位行，数据到达后整表替换。 */
@keyframes order-row-shimmer{0%{background-position:-360px 0}100%{background-position:360px 0}}
#orders-table .orders-skeleton td{padding:10px 8px;border-bottom:1px solid var(--line)}
#orders-table .orders-skeleton .sk-bar{height:12px;border-radius:6px;background:linear-gradient(90deg,var(--elevated) 25%,color-mix(in srgb,var(--elevated) 35%,var(--card)) 50%,var(--elevated) 75%);background-size:720px 100%;animation:order-row-shimmer 1.15s linear infinite}
#orders-table .orders-load-error{padding:18px 10px;color:var(--danger);font-size:13px}
#orders-table .orders-load-error button{margin-left:10px}
@media(prefers-reduced-motion:reduce){#orders-table .orders-skeleton .sk-bar{animation:none}}
/* 换日期/筛选/页码时的加载反馈：旧内容调暗，卡片顶部一条走动的进度条；新数据落地即撤。 */
@keyframes orders-refresh-bar{0%{background-position:-40% 0,0 0}100%{background-position:140% 0,0 0}}
.plan-detail-card{position:relative}
.plan-detail-card.is-refreshing :is(.table-scroll,.order-pagination){opacity:.45;transition:opacity .15s ease;pointer-events:none}
.plan-detail-card.is-refreshing::before{content:"";position:absolute;z-index:5;top:0;left:0;right:0;height:3px;border-radius:14px 14px 0 0;background:linear-gradient(90deg,transparent,var(--orange),transparent) no-repeat,color-mix(in srgb,var(--orange) 14%,transparent);background-size:35% 100%,100% 100%;animation:orders-refresh-bar 1s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.plan-detail-card.is-refreshing::before{animation:none;background:var(--orange);opacity:.6}}
@media(prefers-reduced-motion:reduce){.advanced-filters{animation:none}}
@container (max-width:1080px){
  .plan-filter-actions{width:100%;margin-left:0;padding-right:2px}
  .plan-filter-strip>select,.plan-filter-strip>.ui-select,.author-filter-combobox{min-width:124px;max-width:none;flex:1 1 calc(25% - 8px)}
}
@media(max-width:760px){
  .plan-filter-card{padding:12px}
  .plan-filter-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .plan-filter-strip :is(select,input,.ui-select-trigger,.author-filter-trigger){height:44px;min-height:44px;font-size:14px}
  .plan-filter-icon{width:44px;height:44px;min-width:44px;min-height:44px}
  .plan-filter-icon svg{width:20px;height:20px}
  .plan-search-control{height:44px}
  .plan-filter-actions .btn{height:44px;min-height:44px;font-size:14px}
  .plan-filter-strip>select,.plan-filter-strip>.ui-select,.plan-filter-strip>.ui-select:has(#creator-filter),.plan-filter-strip>.ui-select:has(#account-filter),.author-filter-combobox{width:100%;min-width:0;max-width:none}
  .plan-search-control{grid-column:1/-1;width:100%;min-width:0;max-width:none}
  .plan-filter-icon,.advanced-filter-anchor{justify-self:start}
  .plan-filter-actions{grid-column:1/-1;width:100%;margin-left:0}
  .plan-filter-actions .btn{flex:1 1 0;width:auto}
  .advanced-filters{width:calc(100vw - 24px);max-height:min(78dvh,640px);padding:12px;transform-origin:bottom center;animation-name:advanced-filters-in-up}
  .advanced-filter-actions{bottom:-12px;margin:0 -12px -12px;padding:9px 12px 12px}
}
@media(max-width:420px){.advanced-filters{grid-template-columns:1fr}.advanced-filter-head,.advanced-filter-actions{grid-column:auto}.author-filter-menu{width:calc(100vw - 24px)}}
@media(max-width:760px){
  .plan-filter-actions{position:static;width:calc(100% - 12px)!important;margin-right:12px!important}
  .advanced-filters{position:fixed!important;z-index:180!important;inset:0!important;width:100%!important;max-width:none!important;max-height:100dvh!important;margin:0!important;padding:16px 14px calc(18px + env(safe-area-inset-bottom))!important;overflow:auto!important;border:0!important;border-radius:0!important;transform:none!important}
  .advanced-filter-head{position:sticky;z-index:2;top:-16px;margin:-16px -14px 12px;padding:10px 14px;border-bottom:1px solid var(--line);background:var(--surface)}
  .advanced-filter-actions{position:sticky;bottom:-18px;margin:12px -14px -18px!important;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:var(--surface)}
}



.group-page-card{padding:20px}.group-page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.group-page-head h3{margin:0 0 4px}.group-page-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}.group-summary-item{padding:13px 15px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.group-summary-item span{display:block;color:var(--muted);font-size:11px}.group-summary-item strong{display:block;margin-top:5px;font:800 20px/1.1 var(--font-mono,monospace)}.group-manage-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:12px}.group-manage-card{position:relative;min-height:166px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:var(--shadow-sm);cursor:pointer;transition:border-color .18s ease,background .18s ease}.group-manage-card:hover{border-color:var(--orange);background:var(--orange-soft)}.group-manage-card h4{max-width:calc(100% - 74px);margin:0 0 5px;font-size:15px}.group-manage-card>p{min-height:34px;margin:0 0 12px;color:var(--muted);font-size:11px;line-height:1.55}.group-manage-actions{position:absolute;top:10px;right:10px;display:flex;gap:4px}.group-manage-actions button{min-width:30px;height:30px;padding:0;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--muted);cursor:pointer}.group-manage-actions button:hover{border-color:var(--orange);color:var(--orange)}.group-manage-actions button.danger:hover{border-color:var(--danger);color:var(--danger)}.group-manage-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.group-manage-metrics span{min-width:0;color:var(--muted);font-size:10px}.group-manage-metrics strong{display:block;margin-top:2px;overflow:hidden;color:var(--text);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.group-manage-card.ungrouped{border-style:dashed}.group-card-arrow{position:absolute;right:13px;bottom:12px;color:var(--orange);font-size:18px}.group-empty{grid-column:1/-1;padding:42px 20px;text-align:center;color:var(--muted)}
/* 首次读取的骨架卡片：与真实卡片同尺寸，读完整体替换。 */
@keyframes group-skeleton-shimmer{0%{background-position:-360px 0}100%{background-position:360px 0}}
.group-manage-card.skeleton{cursor:default;pointer-events:none;background:linear-gradient(90deg,var(--surface) 25%,color-mix(in srgb,var(--elevated,var(--line)) 60%,var(--surface)) 50%,var(--surface) 75%);background-size:720px 100%;animation:group-skeleton-shimmer 1.15s linear infinite}
@media(prefers-reduced-motion:reduce){.group-manage-card.skeleton{animation:none}}
@media(max-width:760px){.group-page-card{padding:15px}.group-page-head{align-items:flex-start}.group-page-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.group-manage-grid{grid-template-columns:1fr}.group-manage-card{min-height:154px}.group-summary-item strong{font-size:17px}}


.accounts-page { padding-top:22px!important; }
.acc-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin:0 2px 18px; }
.acc-head-left { min-width:0; }
.acc-page-head h1 { margin:0 0 15px; color:var(--text); font-size:28px; font-weight:800; line-height:1.2; letter-spacing:-.025em; }
.acc-head-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.acc-head-actions .btn { display:inline-flex; min-height:43px; align-items:center; justify-content:center; gap:8px; padding:0 17px; border-radius:11px; font-size:14px; font-weight:700; white-space:nowrap; }
.acc-head-actions .btn:first-child { color:#fff; border-color:var(--orange); background:var(--orange); box-shadow:0 6px 16px color-mix(in srgb,var(--orange) 22%,transparent); }
.acc-head-actions .btn.ghost { color:var(--text); border-color:var(--line); background:var(--surface); box-shadow:0 2px 7px color-mix(in srgb,var(--text) 5%,transparent); }
.acc-head-actions .btn svg { width:19px; height:19px; flex:0 0 19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.acc-head-meta { display:flex; align-items:center; justify-content:flex-end; gap:28px; padding-bottom:11px; color:var(--muted); font-size:13px; white-space:nowrap; }
.acc-head-meta span { display:inline-flex; align-items:center; gap:7px; }
.acc-head-meta svg { width:16px; height:16px; flex:0 0 16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.accounts-card { padding:0!important; border-radius:14px!important; background:transparent!important; box-shadow:none!important; overflow:visible!important; }
.account-board { display:flex; min-width:0; flex-direction:column; gap:0; overflow:visible; border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:0 4px 14px color-mix(in srgb,var(--text) 5%,transparent); }
#account-groups { gap:0!important; }
.acc-grid { display:grid; grid-template-columns:48px minmax(210px,1.35fr) minmax(190px,1.05fr) minmax(82px,.5fr) minmax(132px,.78fr) minmax(160px,.95fr) minmax(200px,auto); gap:12px; align-items:center; }
.acc-head-labels { min-height:48px; padding:0 16px; border:1px solid var(--line); border-radius:13px; background:color-mix(in srgb,var(--elevated) 84%,#f4eee7); color:var(--muted); font-size:14px; font-weight:650; }
.account-group-card { border:0; border-radius:0; background:transparent; overflow:visible; box-shadow:none; }
/* 首次读取的骨架行：与账号行同高，读完整体替换。 */
@keyframes account-skeleton-shimmer { 0% { background-position:-360px 0; } 100% { background-position:360px 0; } }
.account-group-card.account-skeleton { height:64px; margin:8px 16px; border-radius:10px; background:linear-gradient(90deg,var(--surface) 25%,color-mix(in srgb,var(--elevated,var(--line)) 60%,var(--surface)) 50%,var(--surface) 75%); background-size:720px 100%; animation:account-skeleton-shimmer 1.15s linear infinite; }
@media (prefers-reduced-motion:reduce) { .account-group-card.account-skeleton { animation:none; } }
.account-group-card+.account-group-card { border-top:1px solid var(--line); }
.account-group-card>.acc-row { border-bottom:1px solid var(--line); }
.account-group-card>.acc-row:last-child,.account-group-card.collapsed>.acc-row.group-head { border-bottom:0; }
.acc-row { position:relative; padding:9px 16px; }
.acc-row.group-head { min-height:68px; background:transparent; }
.acc-row.child-row { min-height:62px; }
.acc-extra { color:var(--muted); font-size:12px; line-height:1.5; }
.acc-arrow-cell { display:grid; place-items:center; }
.acc-arrow { display:grid; width:34px; height:34px; place-items:center; padding:0; border:1px solid color-mix(in srgb,var(--orange) 50%,var(--line)); border-radius:50%; background:var(--surface); color:var(--text); cursor:pointer; transition:transform .18s ease,border-color .18s ease,background .18s ease; }
.acc-arrow:hover,.acc-arrow:focus-visible { border-color:var(--orange); background:var(--orange-soft); outline:none; }
.acc-arrow svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
/* 箭头角度只由展开/收起决定。theme.css 的全局按钮悬停规则会改写 transform 和 transition，
   导致展开态箭头在鼠标经过时被转回 0°，点下和悬停的动画对不上；必须在所有状态下显式压住它。 */
.acc-arrow,.acc-arrow:hover,.acc-arrow:focus-visible,.acc-arrow:active {
  transform:rotate(0deg)!important;
  transition:transform .18s ease,border-color .18s ease,background .18s ease!important;
  animation:none!important;
  filter:none!important;
  will-change:auto!important;
}
.account-group-card:not(.collapsed) .acc-arrow,
.account-group-card:not(.collapsed) .acc-arrow:hover,
.account-group-card:not(.collapsed) .acc-arrow:focus-visible,
.account-group-card:not(.collapsed) .acc-arrow:active { transform:rotate(90deg)!important; }
.acc-arrow-empty { display:block; width:34px; height:34px; }
.acc-id { display:flex; align-items:center; gap:12px; min-width:0; }
.acc-id-avatar { display:grid; flex:0 0 auto; place-items:center; }
.acc-id-avatar img,.acc-id-avatar .acc-id-avatar-fallback { width:38px; height:38px; border-radius:50%; object-fit:cover; }
.group-head .acc-id-avatar img,.group-head .acc-id-avatar .acc-id-avatar-fallback { width:44px; height:44px; }
.acc-id-avatar .acc-id-avatar-fallback { display:grid; place-items:center; color:#fff; background:linear-gradient(145deg,#48b8ff,#2387ef); box-shadow:0 3px 9px rgba(35,135,239,.18); }
.acc-id-avatar .acc-id-avatar-fallback svg { width:21px; height:21px; fill:currentColor; stroke:currentColor; stroke-width:1.2; }
.group-head .acc-id-avatar .acc-id-avatar-fallback svg { width:24px; height:24px; }
.acc-id-text { min-width:0; }
.acc-id-text .account-name-main { display:block; overflow:hidden; color:var(--text); font-size:16px; font-weight:700; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.account-name-sub { display:block; margin-top:3px; overflow:hidden; color:var(--muted); font-size:13px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.account-role-stack { display:block; min-width:0; }
.account-role-row { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.account-role-badge { display:inline-flex; min-height:25px; align-items:center; padding:2px 10px; border:1px solid var(--line); border-radius:999px; font-size:12px; font-weight:700; line-height:1; }
.account-role-badge.mother { color:var(--orange); border-color:color-mix(in srgb,var(--orange) 45%,var(--line)); background:var(--orange-soft); }
.account-role-badge.child { color:var(--muted); background:var(--elevated); }
.account-balance { display:flex; margin-top:7px; flex-wrap:wrap; gap:4px 10px; color:#0fa76f; font-size:14px; font-weight:800; line-height:1.25; }
.account-balance-item { white-space:nowrap; }
.account-balance.pending { color:var(--muted); font-size:12px; font-weight:500; }
.acc-state { display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:700; white-space:nowrap; }
.acc-state i { width:9px; height:9px; flex:0 0 9px; border-radius:50%; }
.acc-state.online { color:var(--green); } .acc-state.online i { background:var(--green); }
.acc-state.pending { color:var(--muted); } .acc-state.pending i { background:var(--muted); }
.acc-state.offline { color:var(--danger); } .acc-state.offline i { background:var(--danger); }
.acc-online-time { color:var(--text); font-size:13px; font-weight:650; white-space:nowrap; }
.acc-online-time.is-offline { color:var(--muted); font-weight:500; }
.acc-sync,.acc-uid { color:var(--muted); font-size:13px; white-space:nowrap; }
.acc-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
/* 操作列按钮统一 40px 等宽图标方块（与 .acc-more summary 同规格），列内右对齐。 */
.acc-actions .btn { display:inline-flex; width:40px; min-width:40px; min-height:40px; align-items:center; justify-content:center; gap:0; padding:0; border-radius:10px; font-size:13px; font-weight:700; white-space:nowrap; }
.acc-head-labels span:last-child { text-align:right; }
.acc-actions .btn svg { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.accounts-page .acc-actions .btn.danger { color:#ed3549!important; border:1px solid #ffcbd1!important; background:#fff0f2!important; box-shadow:none!important; border-radius:10px!important; }
.acc-more { position:relative; }
.acc-more>summary { display:grid; width:40px; min-height:40px; place-items:center; padding:0; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); cursor:pointer; list-style:none; }
.acc-more>summary::-webkit-details-marker { display:none; }
.acc-more>summary svg { width:20px; height:20px; fill:currentColor; }
.acc-more[open]>summary,.acc-more>summary:hover { border-color:var(--orange); color:var(--orange); background:var(--orange-soft); }
.acc-more-pop { position:absolute; right:0; top:calc(100% + 7px); z-index:80; min-width:184px; padding:7px; border:1px solid var(--line); border-radius:11px; background:var(--card); box-shadow:var(--shadow-lg); }
.acc-more-pop button { display:block; width:100%; min-height:37px; padding:0 11px; border:0; border-radius:8px; background:transparent; color:var(--text); font-size:13px; text-align:left; cursor:pointer; }
.acc-more-pop button:hover { color:var(--orange); background:var(--orange-soft); }
.acc-more-pop button.danger:hover { color:var(--danger); background:var(--danger-soft); }
.acc-tree { position:relative; align-self:stretch; }

.acc-tree::before { content:''; position:absolute; left:50%; top:-10px; bottom:-10px; width:1px; background:color-mix(in srgb,var(--muted) 28%,transparent); }
.acc-tree::after { content:''; position:absolute; left:50%; top:50%; width:17px; height:1px; background:color-mix(in srgb,var(--muted) 28%,transparent); }
.acc-row.child-last .acc-tree::before { bottom:auto; height:calc(50% + 10px); }
.account-group-card.collapsed .acc-row.child-row { display:none; }
.acc-dash { color:var(--muted); }
@media (max-width:1250px) and (min-width:761px) {
  .account-board { padding-bottom:8px; overflow-x:auto; overflow-y:visible; }
  .account-board>.acc-grid,.account-board>#account-groups { width:1120px; min-width:1120px; }
}
@media (max-width:900px) {
  .acc-page-head { align-items:flex-start; flex-direction:column; gap:14px; }
  .acc-head-meta { justify-content:flex-start; padding-bottom:0; white-space:normal; }
}
@media (max-width:760px) {
  .accounts-page { padding-top:16px!important; }
  .acc-page-head { margin-bottom:14px; }
  .acc-page-head h1 { margin-bottom:13px; font-size:24px; }
  .acc-head-actions { width:100%; gap:8px; }
  .acc-head-actions .btn { min-height:41px; flex:1 1 auto; padding:0 10px; font-size:12px; }
  .acc-head-actions .btn svg { width:17px; height:17px; flex-basis:17px; }
  .acc-head-meta { display:grid; width:100%; gap:6px; font-size:12px; }
  .account-board { overflow:visible; }
  .acc-grid { display:grid; grid-template-columns:36px minmax(0,1fr); gap:8px 10px; }
  .acc-head-labels { display:none!important; }
  .acc-row { padding:12px; }
  .acc-row.group-head,.acc-row.child-row { min-height:0; }
  .acc-arrow { width:32px; height:32px; }
  .acc-arrow-empty { width:32px; height:32px; }
  .group-head .acc-id-avatar img,.group-head .acc-id-avatar .acc-id-avatar-fallback { width:42px; height:42px; }
  .acc-id-avatar img,.acc-id-avatar .acc-id-avatar-fallback { width:36px; height:36px; }
  .acc-role-cell,.acc-status-cell,.acc-sync-cell,.acc-uid-cell,.acc-actions { grid-column:2; }
  .acc-role-cell,.acc-status-cell { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .acc-sync-cell::before { content:'在线时间：'; color:var(--muted); }
  .acc-uid-cell { font-size:12px; }
  .acc-actions { justify-content:flex-start; flex-wrap:nowrap; }
  .acc-actions .btn { width:38px; min-width:38px; min-height:38px; padding:0; }
  .acc-more>summary { width:38px; min-height:38px; }
  .acc-tree { display:block; grid-row:1 / span 6; }
  .acc-tree::before { top:-13px; bottom:-13px; }
  .acc-row.child-last .acc-tree::before { height:34px; }
}


.create-object-row { align-items:flex-start; gap:14px; }
.create-object-row .form-item { display:grid; grid-template-rows:auto 44px auto; align-items:start; margin:0; }
.create-object-row .form-item>label { align-self:end; }
.create-object-row .form-item>select,.create-object-row .form-item>.ui-select { width:100%; min-width:0 !important; align-self:start; }
.create-account-item { flex:1 1 440px; max-width:520px; }
.create-object-kind { flex:0 0 140px; }
.create-section .row { align-items:flex-start; }
.create-section .row>.form-item { margin-bottom:0; }
.create-basic-row { display:grid; width:100%; grid-template-columns:220px fit-content(720px) 300px; align-items:start; justify-content:start; gap:14px; }
.create-basic-row .form-item { display:grid; min-width:0; grid-template-rows:44px auto auto; align-items:start; }
.create-basic-row .form-item>label { align-self:end; }
.create-budget-row { align-items:flex-start; gap:14px; }
.create-budget-row .form-item { display:grid; grid-template-rows:auto 44px; align-items:start; margin-bottom:0; }
.create-budget-row .form-item>label { align-self:end; }
.create-budget-row .form-item>select,.create-budget-row .form-item>.ui-select,.create-budget-row .form-item>input,.quota-control-group { align-self:start; }
.quota-control-group { display:flex; min-height:42px; align-items:stretch; gap:6px; flex-wrap:nowrap; }
.quota-control-group .btn,.quota-control-group input { height:42px; min-height:42px; }
.create-section { position:relative; margin:14px 0; padding:16px 18px 18px; overflow:visible;
  border:1px solid var(--line); border-radius:16px;
  background:var(--surface);
  box-shadow:var(--shadow-sm); }
.create-section-object { --section-accent:var(--orange); }
/* 各区块统一中性卡片，标题左侧色条统一品牌橙（不再每块一种写死颜色）。 */
.create-section .section-title { margin:0 0 14px; border-left-color:var(--section-accent,var(--orange)); }
.create-section .form-item:last-child { margin-bottom:0; }
#video-list { display:grid; width:100%; min-width:0; grid-template-columns:repeat(auto-fill,132px); align-items:stretch; gap:10px; }
#video-list .video-item { position:relative; display:grid; width:132px; grid-template-rows:22px 176px 42px 28px; grid-template-areas:"tag" "cover" "title" "meta"; margin:0; overflow:hidden;
  border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:var(--shadow-sm); cursor:pointer; }
#video-list .video-card-header { grid-area:tag; min-width:0; overflow:hidden; }
#video-list .video-cover { grid-area:cover; position:relative; min-width:0; overflow:hidden; background:var(--elevated); }
#video-list .video-cover img.cover { display:block; width:100%; height:100%; object-fit:cover; }
#video-list .video-cover img.cover[hidden] { display:none; }
#video-list .video-cover-placeholder { position:absolute; inset:0; display:grid; place-content:center; gap:10px; justify-items:center; background:color-mix(in srgb,var(--muted) 8%,var(--surface)); color:var(--muted); font-size:11px; }
#video-list .video-cover-placeholder::before { content:""; width:32px; height:40px; border:2px solid color-mix(in srgb,var(--muted) 24%,transparent); border-radius:6px; }
#video-list .video-cover:not(.is-placeholder) .video-cover-placeholder { display:none; }
#video-list .video-title { grid-area:title; box-sizing:border-box; min-width:0; }
#video-list .video-meta { grid-area:meta; box-sizing:border-box; min-width:0; }
#video-list .video-title.is-placeholder::before { content:""; display:block; height:8px; margin:3px 0; border-radius:4px; background:color-mix(in srgb,var(--muted) 12%,transparent); box-shadow:0 13px 0 color-mix(in srgb,var(--muted) 8%,transparent); }
.video-title { display:-webkit-box; height:42px; padding:6px 7px 5px; overflow:hidden; border-top:1px solid var(--line);
  color:var(--text); font-size:11px; font-weight:650; line-height:15px; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.video-meta { display:flex; min-height:28px; align-items:center; justify-content:space-between; gap:6px; padding:5px 7px;
  border-top:1px solid var(--line); color:var(--muted); font-size:10px; }
.video-meta .like { color: #e8890c; }
.video-history-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.video-history-toolbar>label { margin:0; }
/* 历史成交范围 + 导入官方成交：按 design.md 的分段控件契约合并成一枚
   （--elevated 底、无外框、选中项用卡片底），右侧不再出现两块白框。 */
.video-history-controls { display:inline-flex; align-items:center; gap:0; flex:none; padding:2px;
  border:0; border-radius:8px; background:var(--elevated); }
.video-history-controls>select,.video-history-controls>.btn { flex:none; white-space:nowrap; }
.video-history-controls select { min-width:0; height:32px; margin:0; padding:0 26px 0 10px;
  border:0; border-radius:6px; background-color:transparent; color:var(--text);
  font-size:12px; line-height:1; cursor:pointer; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.75 6 7.25 9 4.75' fill='none' stroke='%236B675E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 8px center; background-size:12px 12px; }
/* 描线箭头只能写死在 data URI 里，取浅色 --t2（#6B675E）；深色主题换成深色 --t2（#A39E93）。 */
[data-theme="dark"] .video-history-controls select {
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.75 6 7.25 9 4.75' fill='none' stroke='%23A39E93' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.video-history-controls select:hover { background-color:color-mix(in srgb,var(--card) 78%,transparent); }
.video-history-controls select:focus-visible { outline:2px solid color-mix(in srgb,var(--orange) 55%,transparent); outline-offset:1px; }
.video-history-controls .btn { position:relative; height:32px; min-height:32px; margin:0 0 0 2px; padding:0 10px;
  border:0!important; border-radius:6px; background:transparent!important; color:var(--text)!important;
  box-shadow:none!important; font-size:12px; font-weight:500; }
.video-history-controls .btn::before { position:absolute; top:50%; left:-3px; width:1px; height:16px;
  transform:translateY(-50%); background:var(--line); content:""; }
.video-history-controls .btn:hover { background:color-mix(in srgb,var(--card) 78%,transparent)!important; }
.video-history-controls .btn:active { background:var(--card)!important; }
/* 天枢壳层全局加载的 button-theme.css 用 html body 前缀 + !important 给 .btn.ghost 描边，
   这里用 ID 提权把描边和底色彻底压掉，保持分段控件只有 --elevated 一条底。 */
#sphNativeHost .video-history-controls .btn:not(:disabled) { border:0!important; background-color:transparent!important; }
#sphNativeHost .video-history-controls .btn:not(:disabled):hover { background-color:color-mix(in srgb,var(--card) 78%,transparent)!important; }
#video-history-retry[hidden] { display:none!important; }
#video-list .video-history { position:absolute; z-index:1; inset:auto 0 0; display:flex; align-items:center; min-width:0; height:24px; box-sizing:border-box; padding:3px 7px;
  background:rgba(22,27,32,.82); font-size:10px; font-weight:650; line-height:18px; color:#fff; overflow:hidden; }
.video-history-value { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#video-list .video-history[data-status="pending"],#video-list .video-history[data-status="none"],
#video-list .video-history[data-status="loading"],#video-list .video-history[data-status="error"] { color:rgba(255,255,255,.88); font-weight:400; }
.video-item.selected { border-color:var(--orange); background:var(--orange-soft); box-shadow:0 0 0 2px var(--orange),0 8px 20px var(--orange-soft); }
.video-item.selected::after { position:absolute; z-index:2; inset:0; border:3px solid var(--orange); border-radius:9px;
  box-sizing:border-box; content:""; pointer-events:none; }
.video-item.incompatible { cursor:not-allowed; opacity:.46; filter:grayscale(.42); }
.video-item.incompatible:hover { border-color:var(--line); box-shadow:var(--shadow-sm); }
.video-item.blocked { cursor:not-allowed; }
.video-item.blocked img.cover { opacity:.55; }
.video-state-label { position:absolute; z-index:3; top:30px; left:5px; padding:3px 6px; border-radius:5px; background:#fff3ed; color:#b64c24; font-size:11px; }
.video-item.blocked.selected .video-select-mark { top:auto; bottom:6px; display:grid; }
.video-block-mark { position:absolute; z-index:4; top:28px; right:6px; display:grid; width:20px; height:20px; place-items:center;
  border:2px solid #fff; border-radius:50%; background:var(--danger); color:#fff; font-size:14px; font-weight:800; }
.video-select-mark { position:absolute; z-index:3; top:6px; right:6px; display:grid; width:20px; height:20px; place-items:center;
  border:1px solid rgba(255,255,255,.92); border-radius:50%; background:rgba(47,50,54,.56); color:#fff; font-size:12px;
  font-weight:900; opacity:0; transform:scale(.8); transition:opacity .16s,transform .16s,background .16s; }
.video-item:hover .video-select-mark { opacity:.7; }
.video-item.selected .video-select-mark { opacity:1; transform:scale(1); background:var(--orange); }
.product-tag { display:flex; height:22px; box-sizing:border-box; align-items:center; gap:3px; padding:2px 6px; font-size:11px;
  color: var(--green); background: var(--green-soft); border-radius: 4px 4px 0 0; white-space: nowrap; overflow: hidden; }
.product-tag img { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.product-tag-empty { visibility:hidden; }
#video-list .product-tag { padding-right:26px; }
#video-list .product-tag img { width:12px; height:12px; object-fit:cover; }
#video-list .video-state-label.is-pending { top:28px; background:var(--surface); color:var(--muted); }
#selected-info { margin: 8px 0; font-size: 13px; color: #555; }
#video-scroll { width:100%; max-height:620px; overflow-x:hidden; overflow-y:auto; border:1px solid var(--line); border-radius:12px;
  padding:10px; position:relative; background:color-mix(in srgb,var(--surface) 96%,var(--elevated)); }
#video-scroll::-webkit-scrollbar { width:8px; }
#video-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.video-verification-workspace { position:relative; min-width:0; }
.video-verification-workspace.is-verifying { min-height:320px; }
.video-verification-workspace.is-verifying #video-scroll { pointer-events:none; user-select:none; }
/* 核对遮罩：回到 theme.css 里 batch-transcribe-progress 的毛玻璃契约，只把不透明底板换成半透明，
   底下的视频网格透出来，不再是一整块死白；不加装饰光晕和渐变（design.md 01/02）。 */
#video-verification-overlay.batch-transcribe-progress { z-index:5; border-radius:12px; padding:24px;
  background:color-mix(in srgb,var(--card) 62%,transparent);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  box-shadow:inset 0 0 0 1px var(--line); }
.video-verification-workspace.is-verifying #video-list>p.muted { visibility:hidden; }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  #video-verification-overlay.batch-transcribe-progress { background:color-mix(in srgb,var(--card) 94%,transparent); }
}
#video-verification-overlay .batch-transcribe-progress-card { border-radius:14px; box-shadow:var(--card-shadow,var(--shadow)); }
#video-verification-overlay .batch-transcribe-progress-kicker { font-size:13px; font-weight:500; letter-spacing:0; }
#video-verification-overlay .batch-transcribe-progress-card strong { font-size:36px; font-weight:600; }
#video-verification-overlay .batch-transcribe-progress-card p { font-size:14px; white-space:normal; line-height:1.6; }
#video-verification-overlay .batch-transcribe-progress-card small { font-size:12px; line-height:1.6; color:var(--muted); }
#reinvest-banner.reinvest-status-card { padding:5px 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.reinvest-status-head,.reinvest-status-title,.reinvest-status-actions { display:flex; align-items:center; gap:10px; }
.reinvest-status-head { min-height:32px; min-width:0; }
.reinvest-status-title { flex:none; padding-right:12px; border-right:1px solid var(--line); }
.reinvest-status-title h3 { margin:0; font-size:14px; white-space:nowrap; }
.reinvest-status-actions { flex:none; gap:6px; }
.reinvest-status-card .btn { min-height:32px; height:32px; white-space:nowrap; }
.reinvest-status-name { flex:1; min-width:60px; margin:0; font-size:13px; line-height:1.6; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }
.reinvest-status-summary,.reinvest-convert-hint { margin:0; font-size:13px; line-height:1.6; color:var(--muted); }
.reinvest-status-summary { flex:0 1 auto; min-width:0; max-width:44%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-variant-numeric:tabular-nums; }
.reinvest-status-card[data-state="ready"] .reinvest-status-summary { flex:none; color:var(--green); background:var(--green-soft); padding:3px 9px; border-radius:999px; font-size:12px; line-height:18px; }
.reinvest-status-card[data-state="attention"] .reinvest-status-summary { color:var(--amber); }
.reinvest-status-card .reinvest-details-toggle,.reinvest-status-card #reinvest-retry { border-color:transparent; background:transparent; color:var(--muted); padding:0 6px; }
.reinvest-details-toggle { display:inline-flex; align-items:center; gap:5px; }
.reinvest-details-toggle svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.6; transition:transform .15s; }
.reinvest-details-toggle[aria-expanded="true"] svg { transform:rotate(180deg); }
.reinvest-details { margin-top:5px; border-top:1px solid var(--line); padding:10px 0 5px; font-size:13px; }
.reinvest-details[hidden] { display:none; }
.reinvest-detail-title { margin:0 0 6px; font-size:14px; }
.reinvest-detail-status { margin:0 0 6px; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.reinvest-convert-hint { margin:0 0 8px; }
.reinvest-detail-meta { display:flex; flex-wrap:wrap; gap:8px 24px; margin:8px 0 12px; color:var(--muted); }
.reinvest-detail-meta b { color:var(--text); font-weight:400; overflow-wrap:anywhere; }
.reinvest-problem-list { display:grid; gap:0; max-height:280px; overflow:auto; }
.reinvest-problem-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; padding:10px 0; border-top:1px solid var(--line); }
.reinvest-problem-title { color:var(--text); overflow-wrap:anywhere; }
.reinvest-problem-reason { grid-column:1/-1; color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.reinvest-problem-state { color:var(--amber); font-size:12px; }
.reinvest-status-card :is(summary,.btn):focus-visible { outline:2px solid var(--orange); outline-offset:3px; }
@media(prefers-reduced-motion:reduce) { .reinvest-details-toggle svg { transition:none; } }
.load-more,.no-more { display:grid; width:auto; min-height:268px; place-items:center; padding:10px;
  border:1px dashed var(--line); border-radius:10px; color:var(--muted); font-size:11px; text-align:center; }
.load-more { color:var(--orange); cursor:pointer; }
.video-loading-skeleton { display:grid; width:100%; grid-column:1/-1; grid-template-columns:repeat(auto-fill,132px); align-items:start; gap:10px; }
.video-skeleton-card { width:132px; box-sizing:border-box; padding-top:22px; overflow:hidden; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.video-skeleton-cover,.video-skeleton-title,.video-skeleton-meta { position:relative; display:block; overflow:hidden; background:color-mix(in srgb,var(--muted) 10%,var(--elevated)); }
.video-skeleton-cover { height:176px; }
.video-skeleton-title { height:42px; margin-top:1px; }
.video-skeleton-meta { height:28px; margin-top:1px; }
.video-skeleton-cover::after,.video-skeleton-title::after,.video-skeleton-meta::after { position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--surface) 72%,transparent),transparent);
  animation:video-skeleton-shimmer 1.25s infinite; content:""; }
@keyframes video-skeleton-shimmer { to { transform:translateX(100%); } }
.section-title { font-size: 14px; font-weight: 500; margin: 18px 0 10px; padding-left: 8px;
  border-left: 3px solid var(--orange); }
.exp-tag { font-size: 11px; color: #e8890c; background: #fff3e0; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; cursor: pointer; }
.target-radio-group { display:flex; max-width:720px; flex-wrap:wrap; gap:8px; }
.target-radio-group label { display:inline-flex; min-height:40px; align-items:center; gap:6px; margin:0; padding:8px 12px;
  border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); cursor:pointer; }
.target-radio-group label:has(input:checked) { border-color:var(--orange); background:var(--orange-soft); color:var(--orange); }
.target-radio-group input { margin:0; accent-color:var(--orange); }
.target-radio-hint { display:block; margin-top:7px; color:var(--muted); font-size:11px; }
.check-group { display: flex; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.check-group label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px;
  cursor: pointer; color: #555; }
.check-group input { accent-color: var(--orange); }
.quota-quick.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.progress-wrap { margin-top: 4px; }
.progress-bar { height: 14px; background: #f0f0f2; border-radius: 7px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), #ff9a61);
  border-radius: 7px; transition: width .4s; }
.qr-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 100; align-items: center; justify-content: center; }
.qr-mask.show { display: flex; }
.qr-box { background: #fff; border-radius: 12px; padding: 20px 24px; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.qr-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; text-align:left; }
.qr-dialog-head h3 { margin:0; }
.qr-dialog-actions { display:flex; flex:0 0 auto; gap:6px; }
.qr-dialog-actions button { width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:10px;
  background:var(--surface); color:var(--text); font-size:17px; line-height:1; cursor:pointer; }
.qr-dialog-actions button:hover { border-color:var(--orange); background:var(--orange-soft); color:var(--orange); }
.qr-minimized-chip { position:fixed !important; z-index:140 !important; right:max(18px,env(safe-area-inset-right)); bottom:24px;
  display:inline-flex; width:232px; min-height:42px; padding:9px 14px; align-items:center; justify-content:center;
  border:1px solid color-mix(in srgb,var(--orange) 50%,var(--line)); box-sizing:border-box; border-radius:999px;
  background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); line-height:1; white-space:nowrap;
  font-weight:750; cursor:pointer; pointer-events:auto; touch-action:manipulation; isolation:isolate;
  transform:none !important; filter:none !important; animation:none !important; transition:none !important;
  will-change:auto !important; backface-visibility:hidden; }
.qr-minimized-chip:hover,.qr-minimized-chip:focus-visible,.qr-minimized-chip:active {
  position:fixed !important; z-index:140 !important;
  border-color:color-mix(in srgb,var(--orange) 50%,var(--line)); background:var(--card); box-shadow:var(--shadow-lg);
  color:var(--text); transform:none !important; filter:none !important; animation:none !important; transition:none !important;
  will-change:auto !important; }
.qr-minimized-chip:focus-visible { outline:3px solid color-mix(in srgb,var(--orange) 22%,transparent); outline-offset:2px; }
.qr-minimized-chip[hidden] { display:none; }
#relogin-qr-chip { bottom:76px; }
.batch-failure-popup { position:fixed; z-index:210; top:88px; right:22px; width:min(430px,calc(100vw - 32px)); box-sizing:border-box;
  padding:14px 15px; border:1px solid color-mix(in srgb,var(--danger) 50%,var(--line)); border-radius:13px;
  background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); }
.batch-failure-popup[hidden] { display:none; }
.batch-failure-popup-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.batch-failure-popup-head strong { color:var(--danger); }
.batch-failure-popup-head button { width:30px; height:30px; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); cursor:pointer; }
.batch-failure-popup-account { margin:4px 0 7px; color:var(--muted); font-size:11px; }
.batch-failure-popup-list { display:grid; max-height:190px; margin:0; padding-left:20px; overflow:auto; gap:5px; color:var(--danger); font-size:12px; line-height:1.5; }
.create-submit-area { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-top:12px; }
.create-submit-area #btn-create { min-width:126px; }
.create-submit-area #btn-create.is-blocked,
.create-submit-area #btn-create.is-blocked:hover,
.create-submit-area #btn-create.is-blocked:active { border-color:var(--line); background:var(--elevated); box-shadow:none; color:var(--muted); cursor:not-allowed; opacity:1; transform:none; }
.create-submit-feedback { flex:1 1 100%; margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.create-submit-feedback[hidden] { display:none; }
.create-validation-popup { position:fixed; z-index:211; top:88px; right:22px; width:min(430px,calc(100vw - 32px)); box-sizing:border-box; padding:14px 15px; border:1px solid var(--line); border-radius:13px; background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); }
.create-validation-popup[hidden] { display:none; }
.create-validation-popup-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.create-validation-popup-head strong { color:var(--orange); }
.create-validation-popup-head button { width:30px; height:30px; padding:0; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); cursor:pointer; }
.create-validation-popup-intro { margin:5px 0 7px; color:var(--muted); font-size:12px; }
.create-validation-popup-list { display:grid; max-height:210px; margin:0; padding-left:20px; overflow:auto; gap:5px; color:var(--text); font-size:12px; line-height:1.5; }
.create-validation-popup-list li::marker { color:var(--orange); }
.pay-qr-wrap { width:280px; height:280px; margin:0 auto; position:relative; }
.pay-qr-wrap img { display:block; width:100%; height:100%; transition:filter .15s; }
.pay-qr-wrap img { -webkit-touch-callout:default; user-select:auto; cursor:zoom-in; }
.pay-qr-wrap.scanned img,.pay-qr-wrap.paid img { filter:blur(6px); }
.pay-paid-overlay { display:none; position:absolute; inset:0; align-items:center; justify-content:center;
  color:#fff; background:rgba(26,158,84,.66); border-radius:8px; font-size:24px; font-weight:700;
  text-shadow:0 1px 3px rgba(0,0,0,.25); white-space:pre-line; line-height:1.35; }
.pay-qr-wrap.scanned .pay-paid-overlay,.pay-qr-wrap.paid .pay-paid-overlay { display:flex; }
@media (max-width:600px) {
  #pay-dialog .qr-box { width:94vw !important; box-sizing:border-box; }
  .pay-qr-wrap { width:min(76vw,320px); max-width:100%; height:auto; aspect-ratio:1/1; }
  .qr-box { max-height:88vh; overflow:auto; }
  .qr-minimized-chip { right:12px; max-width:calc(100vw - 24px); }
  .batch-failure-popup,.create-validation-popup { top:auto; right:12px; bottom:14px; width:calc(100vw - 24px); }
}
.author-combobox { position: relative; width: 360px; max-width: 100%; }
.author-combobox-control { display:grid; grid-template-columns:minmax(0,1fr) 40px; gap:6px; }
.author-combobox input[type="search"] { width: 100%; min-width:0; }
.author-history-toggle { display:grid; width:40px; min-width:40px; padding:0; place-items:center;
  border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--muted);
  cursor:pointer; transform:none !important; filter:none !important; }
.author-history-toggle:hover,.author-history-toggle[aria-expanded="true"] { border-color:var(--orange); background:var(--orange-soft); color:var(--orange); }
.author-history-toggle .chevron { font-size:12px; transition:transform .18s ease; }
.author-history-toggle[aria-expanded="true"] .chevron { transform:rotate(180deg); }
.author-options { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 30; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid #ddd;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; }
.author-options.show { display: block; }
.author-option { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px;
  cursor: pointer; font-size: 13px; color: #333; }
.author-option:hover, .author-option.active { background: var(--orange-soft); color: var(--orange); }
.author-option img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: #f5f5f7; }
.author-option .author-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.author-group-label { padding: 7px 10px 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
.author-empty { padding: 10px; text-align: center; color: #999; font-size: 13px; }
/* 关停策略多选：最多 5 条，触发器跟着条数长宽，始终一行，不再折到第二条。 */
.rule-multiselect { position:relative; width:max-content; max-width:100%; min-width:min(320px,100%); }
.rule-multiselect-toggle { display:flex; width:100%; min-height:38px; align-items:center; justify-content:space-between; gap:10px;
  padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text);
  text-align:left; cursor:pointer; transform:none !important; filter:none !important; }
.rule-multiselect-toggle:hover,.rule-multiselect-toggle[aria-expanded="true"] { border-color:var(--orange); background:var(--orange-soft); }
.rule-multiselect-toggle .rule-summary { display:flex; min-width:0; flex:0 1 auto; flex-wrap:nowrap; overflow:hidden; gap:5px; font-size:12px; font-weight:700; }
.rule-summary-chip { display:inline-flex; flex:0 1 auto; min-width:0; max-width:240px; min-height:24px; box-sizing:border-box; align-items:center; padding:3px 7px;
  overflow:hidden; border:1px solid color-mix(in srgb,var(--section-accent,#9b6bd3) 48%,var(--line)); border-radius:7px;
  background:color-mix(in srgb,var(--section-accent,#9b6bd3) 9%,var(--surface)); text-overflow:ellipsis; white-space:nowrap; }
.rule-summary-placeholder { display:inline-flex; min-height:26px; align-items:center; color:var(--muted); }
/* 已选条数：只留数字小框，后半句说明保持正文灰字。 */
.rule-count-chip { display:inline-flex; align-items:baseline; gap:3px; margin-right:8px; padding:2px 8px 3px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); font-variant-numeric:tabular-nums; }
.rule-count-chip b { font-family:var(--font-latin,var(--font)); font-size:14px; font-weight:650; line-height:1.35; }
.rule-count-chip i { font-style:normal; font-size:12px; font-weight:500; color:var(--muted); }
@media (max-width:760px) { .rule-multiselect { width:100%; } .rule-multiselect-toggle .rule-summary { flex-wrap:wrap; overflow:visible; } }
.rule-multiselect-toggle .rule-meta { flex:0 0 auto; align-self:center; color:var(--muted); font-size:12px; font-weight:650; font-variant-numeric:tabular-nums; }
.rule-multiselect-toggle .chevron { display:inline-flex; flex:0 0 auto; align-self:center; color:var(--muted); transition:transform .18s ease; }
.rule-multiselect-toggle .chevron svg,.author-history-toggle .chevron svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.rule-multiselect-toggle[aria-expanded="true"] .chevron { transform:rotate(180deg); }
.rule-multiselect-menu { position:absolute; z-index:35; top:calc(100% + 5px); left:0; right:0; overflow:hidden;
  border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:var(--shadow-lg); }
.rule-multiselect-menu[hidden] { display:none; }
.rule-option-list { max-height:230px; padding:6px; overflow-y:auto; }
.rule-multi-option { display:flex !important; min-height:38px; align-items:center; gap:9px; margin:0 !important; padding:7px 9px;
  border-radius:8px; color:var(--text) !important; font-size:12px !important; cursor:pointer; }
.rule-multi-option:hover { background:var(--orange-soft); }
.rule-multi-option input { flex:0 0 auto; accent-color:var(--orange); }
.rule-multi-option span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.create-voucher-item { flex:1 1 360px; max-width:520px; min-width:0; }
.voucher-multiselect { width:100%; }
.voucher-multiselect .rule-summary { max-height:112px; overflow:auto; }
.voucher-multiselect .rule-summary-chip { border-color:color-mix(in srgb,var(--orange) 32%,var(--line)); background:var(--orange-soft); }
.voucher-multiselect .rule-multiselect-toggle:disabled { cursor:not-allowed; opacity:.65; }
.voucher-multiselect .rule-multi-option.is-disabled { color:var(--muted) !important; }
.voucher-multiselect .rule-multi-option.is-disabled input { opacity:.55; }
.voucher-option-body { display:grid; flex:1; gap:3px; min-width:0; }
.voucher-option-body small { color:var(--muted); font-size:11px; }
.voucher-option-empty { display:block; padding:12px; color:var(--muted); font-size:12px; }
.voucher-selection-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; font-size:12px; }
.voucher-multiselect .rule-create-action:disabled { color:var(--muted); cursor:not-allowed; }
.rule-create-action { display:flex; width:100%; min-height:42px; align-items:center; justify-content:center; padding:8px 12px;
  border:0; border-top:1px solid var(--line); background:var(--surface); color:var(--orange); font-size:12px; font-weight:750;
  cursor:pointer; transform:none !important; filter:none !important; }
.rule-create-action:hover { background:var(--orange-soft); }
.create-account-status { display:inline-flex; min-height:22px; align-items:center; padding:1px 8px; border:1px solid currentColor; border-radius:999px; font-size:11px; font-weight:750; }
.create-account-status.online { border-color:color-mix(in srgb,var(--green) 55%,var(--line)); background:var(--green-soft); color:var(--green); }
.create-account-status.offline { border-color:color-mix(in srgb,var(--danger) 55%,var(--line)); background:var(--danger-soft); color:var(--danger); }
.create-rule-form-grid { display:grid; grid-template-columns:minmax(0,1fr) 120px 110px; gap:8px; }
.mobile-create-progress,.mobile-create-actions { display:none; }
.create-rule-form-grid>* { width:100%; min-width:0; }
.auto-stop-guard { display:inline-flex; width:fit-content; max-width:100%; min-height:58px; box-sizing:border-box; align-items:center; gap:12px; margin-top:12px; padding:10px 12px;
  border:1px solid var(--line); border-radius:12px; background:var(--bg); }
.auto-stop-guard>strong { flex:0 0 auto; font-size:13px; }
.guard-switch { position:relative; display:inline-flex !important; width:40px; height:24px; flex:0 0 40px; margin:0 !important; cursor:pointer; }
.guard-switch input { position:absolute; width:1px; height:1px; opacity:0; }
.guard-switch-track { width:100%; height:100%; border:1px solid var(--line); border-radius:999px; background:var(--elevated); transition:background .18s,border-color .18s; }
.guard-switch-track::after { display:block; width:18px; height:18px; margin:2px; border-radius:50%; background:var(--card); box-shadow:var(--shadow-sm); content:""; transition:transform .18s; }
.guard-switch input:checked+.guard-switch-track { border-color:var(--orange); background:var(--orange); }
.guard-switch input:checked+.guard-switch-track::after { transform:translateX(16px); }
.guard-switch input:focus-visible+.guard-switch-track { box-shadow:0 0 0 3px color-mix(in srgb,var(--orange) 18%,transparent); }
.guard-condition { display:flex; min-width:0; flex:0 1 auto; align-items:center; gap:8px; flex-wrap:wrap; color:var(--muted); font-size:12px; }
.guard-condition select { width:auto; min-width:0; }
.guard-condition>.ui-select { width:max-content; min-width:0; max-width:100%; flex:0 0 auto; }
.guard-condition>.ui-select .ui-select-trigger { width:auto; min-width:max-content; white-space:nowrap; }
.guard-stepper { display:grid; grid-template-columns:34px 58px 34px; height:36px; overflow:hidden; border:1px solid var(--line); border-radius:9px; background:var(--surface); }
.guard-stepper button { border:0; background:var(--elevated); color:var(--text); font-size:18px; cursor:pointer; }
.guard-stepper button:hover { background:var(--orange-soft); color:var(--orange); }
.guard-stepper input { width:58px; min-width:0; padding:0 4px; border:0; border-inline:1px solid var(--line); border-radius:0; background:var(--surface); text-align:center; }
.guard-stepper input::-webkit-inner-spin-button { appearance:none; }
.guard-help { display:grid; width:17px; height:17px; place-items:center; border:1px solid var(--line); border-radius:50%; color:var(--muted); font-size:10px; cursor:help; }
.auto-stop-guard.is-disabled .guard-condition { opacity:.46; }
@media (max-width:960px) {
  .create-basic-row { grid-template-columns:1fr; gap:10px; }
  .create-basic-row .form-item { grid-template-rows:auto auto auto; }
}
@media (max-width:600px) {
  .create-plan-card>h3{display:none}
  .mobile-create-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:-2px 0 16px;padding:4px;border:1px solid var(--line);border-radius:14px;background:var(--bg)}
  .mobile-create-step{display:flex;min-height:48px;align-items:center;justify-content:center;gap:5px;padding:5px;border:0;border-radius:10px;background:transparent;color:var(--muted);font:700 12px inherit;cursor:pointer}
  .mobile-create-step b{display:grid;width:20px;height:20px;place-items:center;border-radius:50%;background:var(--elevated);font-size:11px}
  .mobile-create-step.active{background:var(--surface);box-shadow:var(--shadow-sm);color:var(--orange)}
  .mobile-create-step.active b{background:var(--orange);color:#fff}
  .create-plan-card[data-mobile-step="1"] .create-section:not(.create-section-object),
  .create-plan-card[data-mobile-step="2"] .create-section:not(.create-section-basic):not(.create-section-budget),
  .create-plan-card[data-mobile-step="3"] .create-section:not(.create-section-targeting):not(.create-section-rules):not(.create-section-other){display:none}
  .create-plan-card[data-mobile-step]:not([data-mobile-step="3"]) #btn-create{display:none}
  .mobile-create-actions{position:sticky;z-index:24;bottom:8px;display:grid;grid-template-columns:1fr 1.5fr;gap:8px;margin:16px 0 0;padding:8px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:var(--shadow);backdrop-filter:blur(14px)}
  .mobile-create-actions .btn{width:100%;min-height:44px}
  .mobile-create-actions:has(.mobile-create-prev[hidden]){grid-template-columns:1fr}
  .mobile-create-actions .mobile-create-prev[hidden],.mobile-create-actions .mobile-create-next[hidden]{display:none}
  .author-combobox,.rule-multiselect { width:100%; }
  .create-rule-form-grid { grid-template-columns:1fr; }
  .auto-stop-guard { align-items:flex-start; flex-wrap:wrap; }
  .guard-condition { flex:1 1 100%; }
  .create-plan-card { padding:12px; }
  .create-section { margin:10px 0; padding:13px 12px 14px; border-radius:13px; }
  .create-object-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .create-account-item { grid-column:1/-1; max-width:none; }
  .create-object-kind { min-width:0; }
  .create-object-row .form-item { width:100%; grid-template-rows:auto 42px auto; }
  .create-object-row .form-item>select,.create-object-row .form-item>.ui-select { width:100%; min-width:0 !important; }
  .create-basic-row { display:grid; grid-template-columns:1fr; gap:10px; }
  .create-basic-row .form-item { width:100%; grid-template-rows:auto auto auto; }
  .create-budget-row { display:grid; grid-template-columns:1fr; gap:10px; }
  .create-budget-row .form-item { width:100%; grid-template-rows:auto 42px; }
  .create-budget-row .form-item>select,.create-budget-row .form-item>.ui-select,.create-budget-row .form-item>input { width:100%; min-width:0 !important; }
  .quota-control-group { display:grid; grid-template-columns:auto auto minmax(0,1fr); }
  .quota-control-group input { width:100%!important; min-width:0; }
  #video-scroll { max-height:520px; padding:8px; }
  #video-list,.video-loading-skeleton { grid-template-columns:repeat(auto-fill,116px); }
  #video-list .video-item { width:116px; grid-template-rows:22px 154px 38px 28px; }
  .video-skeleton-card { width:116px; }
  .video-skeleton-cover { width:116px; height:154px; }
  .video-title,.video-skeleton-title { height:38px; }
  .video-title { padding:5px 6px; font-size:10px; line-height:14px; }
  .load-more,.no-more { min-height:242px; }
  .row>.form-item { width:100%; min-width:0; max-width:100%; }
  .row>.form-item>input,.row>.form-item>select { width:100%; min-width:0 !important; max-width:100%; }
}
@media (max-width:420px) {
  .create-object-row .create-object-kind>select,.create-object-row .create-object-kind>.ui-select .ui-select-trigger { min-width:0!important; padding-right:28px!important; padding-left:9px!important; font-size:11px!important; }
}


/* 新建/修改关停策略弹窗：条件行一行三列（字段/比较/数值），连接词收窄，整体紧凑。 */
#rule-dialog .form-item{margin:0 0 14px}
#rule-dialog label{display:block;margin:0 0 6px;font-size:13px;font-weight:650;color:var(--text)}
#rule-dialog select,#rule-dialog input{width:100%;box-sizing:border-box;font:inherit}
#rule-dialog .rule-cond-row{display:grid;grid-template-columns:minmax(0,1fr) 128px 116px;gap:10px}
#rule-dialog .rule-conn-row{display:flex;align-items:center;gap:10px}
#rule-dialog .rule-conn-row select{width:auto;min-width:260px;max-width:100%}
@media(max-width:560px){#rule-dialog .rule-cond-row{grid-template-columns:1fr 1fr}#rule-dialog .rule-cond-row>select:first-child{grid-column:1/-1}}
.rule-stat-skeleton{display:inline-block;width:86px;height:16px;border-radius:7px;background:linear-gradient(90deg,var(--elevated) 25%,var(--surface) 50%,var(--elevated) 75%);background-size:400px 100%;animation:rule-stat-shimmer 1.1s linear infinite}
@keyframes rule-stat-shimmer{from{background-position:-200px 0}to{background-position:200px 0}}
@media(prefers-reduced-motion:reduce){.rule-stat-skeleton{animation:none}}
.rules-card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.rules-card-head h3{margin:0}


.queue-page-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.queue-page-intro h1 { margin:0; }
.queue-page-intro p { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.6; }
.queue-page-card { width:100%; min-height:260px; }
.queue-page-state { min-height:20px; margin:-5px 0 12px; color:var(--muted); font-size:12px; }
.queue-page-state.is-error { color:var(--danger); }
.queue-page-tools { display:flex; align-items:center; gap:8px; }
.queue-page-tools .btn { min-width:72px; }
.qr-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:6px; text-align:left; }
.qr-dialog-head h3 { margin:0; }
.qr-dialog-actions { display:flex; flex:0 0 auto; gap:6px; }
.qr-dialog-actions button { width:34px; height:34px; padding:0; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:17px; line-height:1; cursor:pointer; }
.qr-dialog-actions button:hover { border-color:var(--orange); background:var(--orange-soft); color:var(--orange); }
.qr-minimized-chip { position:fixed; z-index:140; right:max(18px,env(safe-area-inset-right)); bottom:24px; display:inline-flex; width:232px; min-height:42px; padding:9px 14px; align-items:center; justify-content:center; border:1px solid color-mix(in srgb,var(--orange) 50%,var(--line)); border-radius:999px; background:var(--card); box-shadow:var(--shadow-lg); color:var(--text); font-weight:750; cursor:pointer; }
.qr-minimized-chip[hidden] { display:none; }
.pay-qr-wrap { width:280px; height:280px; margin:0 auto; position:relative; }
.pay-qr-wrap img { display:block; width:100%; height:100%; }
.pay-qr-wrap.paid img { filter:blur(6px); }
.pay-paid-overlay { display:none; position:absolute; inset:0; align-items:center; justify-content:center; color:#fff; background:rgba(26,158,84,.66); border-radius:8px; font-size:24px; font-weight:700; white-space:pre-line; line-height:1.35; }
.pay-qr-wrap.paid .pay-paid-overlay { display:flex; }
@media (max-width:600px) { .queue-page-intro { display:block; } .pay-qr-wrap { width:min(76vw,320px); height:auto; aspect-ratio:1/1; } }

/* Shared queue card presentation used by create.html and queue.html. */
.batch-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 14px; }
.batch-heading h3 { margin:0; }
.batch-heading-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.batch-job-list { display:grid; gap:10px; }
.batch-job { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.batch-job[data-status="queued"] { border-color:color-mix(in srgb,var(--amber) 42%,var(--line)); background:color-mix(in srgb,var(--amber) 5%,var(--surface)); }
.batch-job[data-status="error"] { border-color:color-mix(in srgb,var(--danger) 48%,var(--line)); }
.batch-job-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:8px; }
.batch-job-head>div { min-width:0; }
.batch-job-head strong,.batch-job-head small { display:block; }
.batch-job-head small { margin-top:3px; color:var(--muted); font-size:11px; }
.batch-job-title { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.batch-owner-tag { display:inline-flex; align-items:center; min-height:20px; padding:1px 7px; border-radius:999px; background:var(--green-soft); color:var(--green); font-size:10px; font-weight:800; white-space:nowrap; }
.batch-job-actions { display:flex; flex:0 0 auto; align-items:center; gap:8px; }
.batch-job-status { display:inline-flex; min-height:24px; align-items:center; padding:2px 8px; border-radius:999px; background:var(--orange-soft); color:var(--orange); font-size:11px; font-weight:750; }
.batch-job[data-status="queued"] .batch-job-status { background:color-mix(in srgb,var(--amber) 14%,var(--surface)); color:var(--amber); }
.batch-job[data-status="finished"] .batch-job-status { background:var(--green-soft); color:var(--green); }
.batch-job[data-status="stopped"] .batch-job-status,.batch-job[data-status="error"] .batch-job-status { background:var(--danger-soft); color:var(--danger); }
.batch-job-summary { margin-top:6px; color:var(--muted); font-size:12px; line-height:1.6; }
.batch-job-error { margin-top:5px; color:var(--danger); font-size:12px; overflow-wrap:anywhere; }
.batch-job-results { max-height:120px; margin-top:7px; overflow-y:auto; }
.batch-queue-empty { padding:42px 18px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); font-size:13px; text-align:center; }
@media (max-width:600px) {
  .batch-job-head { align-items:stretch; flex-direction:column; }
  .batch-job-actions { justify-content:space-between; }
}

/* 队列逐条支付状态：创建成功后紧跟支付进度，随队列轮询自动刷新。
   支付成功由服务端在收银台确认后立刻落库，所以这里不需要额外请求。 */
.queue-pay-flag { margin-left:6px; padding:1px 6px; border:1px solid transparent; border-radius:999px; font-size:11px; font-weight:700; white-space:nowrap; }
.queue-pay-flag.paid { background:color-mix(in srgb,var(--green,var(--green)) 15%,transparent); border-color:color-mix(in srgb,var(--green,var(--green)) 45%,transparent); color:var(--green,var(--green)); }
.queue-pay-flag.pending { background:var(--orange-soft,rgba(255,104,47,.12)); border-color:color-mix(in srgb,var(--orange,#ff682f) 38%,transparent); color:var(--orange,#ff682f); }

/* 「被投号 / 投放号」标签化标题（2026-09-11）：标签弱化、数值保持加粗，
   两个字段同行排布，窄屏自动换行。 */
.batch-id-label { color:var(--muted); font-weight:600; }
.batch-id-sep { white-space:pre; }
.batch-job-stop-state{display:flex;align-items:center;gap:8px;margin:8px 0;font-size:12px;color:var(--orange,#ff682f)}
.queue-stop-spinner{width:12px;height:12px;border:2px solid #ff682f33;border-top-color:var(--orange,#ff682f);border-radius:50%;animation:queue-stop-spin .8s linear infinite}
@keyframes queue-stop-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.queue-stop-spinner{animation:none}}

/* Reference layout: two levels, overview then detail. Business fields keep their IDs. */
.monitor-main-column{min-width:0;display:grid;row-gap:0;align-content:start}
.monitor-main-column>.card{margin:0;min-width:0}
.monitor-main-column>.plan-overview-card{margin-bottom:18px}
.monitor-main-column>.plan-filter-card{margin:0;border-radius:14px 14px 0 0;box-shadow:var(--shadow-sm)}
.monitor-main-column>.plan-filter-card + .plan-detail-card{margin-top:0;border-top:1px solid var(--line);border-radius:0 0 14px 14px}
.plan-overview-card{padding:12px!important}
.plan-detail-card{padding:14px!important}
.plan-view-tabs{flex:0 1 auto;max-width:100%;border-radius:8px;padding:2px}
.plan-view-tabs button{min-height:30px;padding:0 17px;font-size:11px}
.plan-head-actions{gap:7px;flex-wrap:wrap}
.monitor-sync-actions{flex:0 1 auto;gap:6px;flex-wrap:nowrap}
.plan-head-actions :is(.btn,summary){min-height:32px;border-radius:7px}
.monitor-sync-actions :is(.btn,summary){width:34px;min-width:34px;padding:0}
.primary-metrics{margin:0;gap:8px}
/* 描边放到独立伪元素上，叠在指标卡之上，避免被卡片背景截断。 */
.primary-metrics::before{content:"";position:absolute;z-index:3;inset:0;border:1px solid transparent;border-radius:14px;pointer-events:none;transition:border-color .18s ease}
.primary-metrics:hover,.primary-metrics:focus-visible{box-shadow:none}
.primary-metrics:hover::before,.primary-metrics:focus-visible::before{border-color:color-mix(in srgb,var(--orange) 28%,var(--line))}
.primary-metrics::after{z-index:4}
.plan-detail-card .plan-table-head{border:0;margin:4px 0 8px;padding:0 2px;gap:10px}
.primary-metric{position:relative;min-width:0;padding:12px 10px 12px 58px!important;min-height:72px;border-radius:9px}
.primary-metric::before{display:none}
.primary-metric .metric-label{font-size:10px;gap:4px;white-space:normal}
.primary-metric .metric-label>.metric-icon{position:absolute;left:11px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:12px;display:grid;place-items:center}
.metric-icon svg{width:22px;height:22px;display:block}
.primary-metric>strong{font-size:20px;margin-top:5px;white-space:nowrap}
.primary-metric:nth-child(3) .metric-icon{color:#8950ef;background:rgba(137,80,239,.1)}
.primary-metric:nth-child(4) .metric-icon{color:#fa4867;background:rgba(250,72,103,.1)}
.primary-metric:nth-child(6) .metric-icon{color:#168ee7;background:rgba(22,142,231,.1)}
.primary-metric:last-child .metric-help::after{left:auto;right:0;transform:none}
.plan-table-head h3{font-size:17px}
.plan-detail-card .order-actions{gap:8px}
.plan-detail-card .order-actions :is(summary,.btn){min-height:32px;border-radius:10px}
.plan-detail-card .table-scroll{border-radius:8px}
.plan-detail-card #orders-table :is(td,th){padding-block:8px;font-size:12px}
.plan-detail-card #orders-table th{font-size:11px}
.plan-detail-card .plan-action{border-radius:8px}
.monitor-title-controls .monitor-create-button{min-height:38px;white-space:nowrap;border-radius:12px;padding:0 17px}
.monitor-page-intro{padding-bottom:10px;gap:12px}
body>.nav{border-radius:0;box-shadow:none}
body>.nav a.active{background:var(--action-soft);color:var(--action-accent);box-shadow:inset 0 -2px var(--action-accent)}
.container>.nav{position:relative;display:flex;gap:8px;margin:0 0 12px;padding:0;border:0;border-bottom:1px solid var(--line);background:transparent;box-shadow:none}
.container>.nav a{padding:12px 24px;border-radius:7px 7px 0 0;font-size:12px}
.container>.nav a.active{background:var(--action-soft);color:var(--action-accent);box-shadow:inset 0 -2px var(--action-accent)}
@media(max-width:1100px){
 .monitor-sync-actions{width:auto;justify-content:flex-end}
 .primary-metric{padding-left:44px!important;padding-right:7px!important}
 .primary-metric .metric-label>.metric-icon{left:7px;width:30px;height:32px}
 .metric-icon svg{width:19px;height:19px}
 .primary-metric>strong{font-size:17px}
}
@media(max-width:760px){
 .container>.nav a{flex:1;min-width:0;text-align:center;padding:12px 2px;font-size:11px}
 .monitor-page-intro{grid-template-columns:1fr}
 .monitor-title-controls{position:static!important;inset:auto!important;display:grid!important;grid-template-columns:minmax(85px,.85fr) minmax(145px,1.6fr);width:100%!important;gap:8px!important;margin:0!important}
 .monitor-title-controls :is(#range-field,.ui-select,.sph-range-picker){width:100%!important;min-width:0!important;max-width:none!important;flex:auto!important}
 .monitor-title-controls :is(.sph-range-toggle,.ui-select-trigger){display:flex!important;align-items:center;justify-content:space-between;gap:6px;width:100%!important;min-width:0!important;max-width:none!important;min-height:40px;border-radius:11px!important;padding:0 9px!important}
 .monitor-title-controls .ui-select-value{display:block!important;min-width:0}
 .monitor-title-controls .ui-select-chevron{display:block!important}
 .monitor-title-controls .ui-select-trigger::before{display:none}
 .monitor-title-controls .monitor-create-button{grid-column:1/-1;width:100%;min-height:42px}
 .monitor-title-controls .monitor-sync-actions{grid-column:1/-1;width:100%;justify-content:flex-start}
 .monitor-title-controls .monitor-sync-actions :is(.monitor-refresh-button,.action-menu-trigger){width:40px;min-width:40px;height:40px;min-height:40px}
 .monitor-title-controls .sph-range-toggle{padding-inline:9px}
 .monitor-title-controls .sph-range-toggle strong{display:block;font-size:11px}
 .monitor-title-controls .sph-range-caption{display:none}
 .plan-view-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:3px;overflow:visible}
 .plan-view-tabs button{min-height:40px;font-size:11px;white-space:nowrap;padding:0 3px}
 .plan-head-actions{display:flex;justify-content:flex-start;gap:6px}
 .plan-head-actions :is(.btn,summary){min-height:40px}
 .primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .primary-metric{padding:9px 6px!important;min-height:88px}
 .primary-metric .metric-label{display:flex;flex-wrap:wrap;gap:3px;font-size:9px;line-height:1.4}
 .primary-metric .metric-label>.metric-icon{position:static;transform:none;width:22px;height:22px;border-radius:7px;flex:0 0 22px}
 .metric-icon svg{width:15px;height:15px}
 .primary-metric>strong{font-size:16px;margin-top:7px}
 .plan-detail-card .plan-table-head{align-items:flex-start;flex-direction:column}
 .plan-detail-card .order-actions{display:flex;width:100%}
 .plan-detail-card .order-actions>details{flex:1;min-width:0}
 .plan-detail-card .order-actions summary{min-height:40px}
 .plan-detail-card #orders-table td{padding-block:9px}
 .plan-detail-card .plan-action{min-height:36px}
 .plan-overview-card,.plan-detail-card{padding:12px!important}
 .plan-detail-card .order-pagination{flex-wrap:wrap;justify-content:flex-start;gap:7px}
 .plan-detail-card .order-pagination>label{flex:0 0 auto;width:auto}
 .plan-detail-card .order-pagination select{width:76px;min-width:76px;padding-inline:8px 22px}
 .plan-detail-card .order-pagination .btn{min-height:40px}
}

/* Mobile monitor: compact toolbar, unfrozen actions, desktop-like edge tools. */
@media(min-width:761px){.monitor-page-intro{margin-bottom:14px}}
.monitor-title-row #monitor-engine-status{box-sizing:border-box;display:flex;align-items:center;gap:12px;width:max-content;min-width:0;min-height:44px;height:44px;max-width:min(340px,100%);padding:4px 12px;border:1px solid color-mix(in srgb,var(--green) 16%,var(--line));border-radius:12px;background:var(--green-soft);flex:0 1 auto}
.monitor-title-row #monitor-engine-status::before{flex:0 0 8px;width:8px;height:8px}
.monitor-title-row #sync-state{display:flex;flex-direction:column;justify-content:center;gap:6px;min-width:0;white-space:normal;line-height:1.2}
#sync-state .sync-clock-row{display:flex;align-items:center;gap:6px;font:500 10px/1.3 var(--font,system-ui,sans-serif);letter-spacing:0;white-space:nowrap}
#sync-state .sync-clock-row strong{color:var(--text);font:600 10px/1.3 var(--font,system-ui,sans-serif);font-variant-numeric:tabular-nums;letter-spacing:0}
#sync-state .sync-progress{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.5;font-size:10px}
@media(max-width:760px){
 .monitor-page-intro .monitor-title-controls{display:grid!important;grid-template-columns:72px minmax(90px,1fr) 60px 86px!important;gap:5px!important;flex-wrap:nowrap!important}
 .monitor-title-controls .monitor-sync-actions{grid-column:auto!important;width:auto!important;flex:none!important;gap:4px!important;justify-content:flex-start!important}
 .monitor-title-controls .monitor-sync-actions :is(.monitor-refresh-button,.action-menu-trigger){width:28px!important;min-width:28px!important;height:36px!important;min-height:36px!important;padding:0!important}
 .monitor-title-controls .monitor-create-button{grid-column:auto!important;width:auto!important;min-width:0!important;min-height:36px!important;padding:0 5px!important;font-size:11px!important;white-space:nowrap!important}
 .monitor-title-controls :is(#range-field,.ui-select-trigger,.sph-range-toggle){height:36px!important;min-height:36px!important;font-size:10px!important;padding-inline:5px!important}
 .monitor-title-controls .sph-range-toggle strong{font-size:10px!important;white-space:nowrap}
 .monitor-title-controls .sph-range-icon{display:none!important}
 .plan-detail-card #orders-table .plan-cell{width:132px!important;min-width:132px!important;max-width:132px!important}
 .plan-detail-card #orders-table .plan-detail-link{width:116px!important;max-width:116px!important;text-overflow:ellipsis!important;white-space:nowrap!important;overflow:hidden!important}
 .plan-detail-card #orders-table .sticky-right{position:static!important;right:auto!important;z-index:auto!important;box-shadow:none!important}
 .container > .sph-side-tools{position:fixed!important;right:0!important;top:45%!important;bottom:auto!important;width:26px!important;margin:0!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:5px!important;transform:translateY(-50%)!important;z-index:61!important}
 .sph-side-tools .sph-side-tool{box-sizing:border-box;width:26px!important;min-width:26px!important;min-height:68px!important;padding:7px 5px!important;writing-mode:vertical-rl!important;font-size:10px!important;line-height:1.2!important;border:1px solid var(--line)!important;border-right:0!important;border-radius:9px 0 0 9px!important;background:var(--card)!important}
}

/* 投流监控手机版（≤760px）：本文件是计划监控页手机布局的最后一层，
   独立投流页直接外链，工作台由 scripts/build-sph-native.mjs 追加在 @scope 末尾。
   早期 style.css / reference-layout.css / 页内样式里的手机规则多带 !important，
   因此这里同样使用 !important 并提高一级选择器特异性；桌面（>760px）不受影响。
   选择器都挂在监控页独有的节点上，避免影响同一作用域内的其他投流页。

   版面自上而下：页签 → 数据区一行 → 功能区一行（日期 · 刷新 · 更多 · 筛选）→ 计划列表。
   做法：把页头、分组布局、主列设为 display:contents，让各块直接成为 .container 网格的
   子项，再按行号排布；DOM 与脚本不动，桌面布局不受影响。 */
@media (max-width:760px){
  .container:has(>.monitor-page-intro){display:grid!important;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:0;align-items:start}
  .container:has(>.monitor-page-intro)>*{grid-column:1/-1;min-width:0}
  .container>.monitor-page-intro,.container>.group-summary-layout,.group-summary-layout>.monitor-main-column{display:contents!important}
  .container>#sphDirectTabs{grid-row:1}
  .monitor-page-intro>.monitor-title-row{grid-row:2;grid-column:1/-1;margin:0 0 8px!important}
  .container>.sph-side-tools{grid-row:3}
  .group-summary-layout>.group-summary-sidebar{grid-row:4;grid-column:1/-1;margin:0 0 10px!important}
  .monitor-main-column>.plan-overview-card{grid-row:5;grid-column:1/-1}
  .monitor-page-intro>.monitor-title-controls{grid-row:6;grid-column:1}
  .monitor-main-column>.plan-filter-card{grid-row:6;grid-column:2}
  .monitor-main-column>.plan-detail-card{grid-row:7;grid-column:1/-1}

  /* 引擎状态（独立页留在页签行；工作台由构建块移到顶栏）。 */
  .monitor-page-intro .monitor-title-row #monitor-engine-status{height:auto!important;min-height:0!important;padding:3px 8px!important;gap:6px!important;border-radius:8px!important}
  .monitor-page-intro .monitor-title-row #sync-state{flex-direction:row!important;flex-wrap:wrap;gap:2px 10px!important}
  .monitor-page-intro .monitor-title-row #sync-state .sync-progress{-webkit-line-clamp:1}

  /* ---- 数据区：一行三项（消耗 / 成交额 / ROI），点一下展开全部六项和次级指标 ---- */
  .monitor-main-column>.plan-overview-card{margin:0 0 8px!important;padding:8px!important;border-radius:14px!important}
  .plan-overview-card .primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;padding-bottom:10px}
  .plan-overview-card .primary-metrics[aria-expanded="false"] .primary-metric:is(:nth-child(1),:nth-child(4),:nth-child(6)){display:none!important}
  .plan-overview-card .primary-metrics::after{right:50%!important;bottom:0!important;transform:translateX(50%)}
  .plan-overview-card .primary-metrics[aria-expanded="true"]::after{transform:translateX(50%) rotate(180deg)!important}
  .plan-overview-card .primary-metrics .primary-metric{min-height:0!important;padding:7px 6px!important;border-radius:10px!important;box-shadow:none!important}
  .plan-overview-card .primary-metrics .primary-metric .metric-label{font-size:11px!important;line-height:1.3!important;letter-spacing:0!important;white-space:nowrap!important}
  .plan-overview-card .primary-metrics .primary-metric :is(.metric-icon,.metric-help){display:none!important}
  .plan-overview-card .primary-metrics .primary-metric>strong{margin-top:3px!important;font-size:15px!important;letter-spacing:-.04em!important}
  .plan-overview-card #expand-body .secondary-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  /* ---- 功能区一行：日期 · 刷新 · 更多 | 筛选。时间口径、排序、搜索在筛选面板里 ---- */
  .monitor-page-intro .monitor-title-controls{display:grid!important;grid-template-columns:minmax(0,1fr) 44px 44px!important;grid-template-areas:"range refresh more"!important;gap:8px!important;width:100%!important;margin:0 0 10px!important}
  .monitor-page-intro .monitor-title-controls>:is(#range-field,.ui-select){display:none!important}
  .monitor-page-intro .monitor-title-controls>.sph-range-picker{grid-area:range!important;width:100%!important;min-width:0!important}
  .monitor-page-intro .monitor-title-controls>.monitor-sync-actions{display:contents!important}
  .monitor-page-intro .monitor-title-controls .monitor-sync-actions .monitor-refresh-button{grid-area:refresh!important}
  .monitor-page-intro .monitor-title-controls .monitor-sync-actions .deep-sync-menu{grid-area:more!important;position:relative}
  .monitor-page-intro .monitor-title-controls .monitor-sync-actions :is(.monitor-refresh-button,.action-menu-trigger){width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:12px!important}
  .monitor-page-intro .monitor-title-controls .deep-sync-menu .action-menu-pop{left:auto!important;right:0!important}
  .monitor-page-intro .monitor-title-controls .action-menu-pop>.mobile-menu-only{display:block!important}
  .monitor-page-intro .monitor-title-controls .action-menu-pop>.mobile-menu-only[hidden]{display:none!important}
  .monitor-page-intro .monitor-title-controls .action-menu-pop>.mobile-logout-item{margin-top:4px;border-top:1px solid var(--line)!important;color:var(--danger)!important}
  .monitor-page-intro .monitor-title-controls .sph-range-toggle{height:44px!important;min-height:44px!important;padding-inline:12px!important;border-radius:12px!important}
  .monitor-page-intro .monitor-title-controls .sph-range-toggle strong{font-size:13px!important}
  .monitor-page-intro .monitor-title-controls :is(.sph-range-icon,.sph-range-caption){display:none!important}
  /* 创建计划：右下角圆形「＋」悬浮按钮；选中计划时让位给批量条。文字保留作可访问名称。 */
  .monitor-page-intro .monitor-title-controls>.monitor-create-button{position:fixed!important;z-index:140;right:14px;bottom:calc(var(--mobile-nav-h,0px) + env(safe-area-inset-bottom) + 14px);display:grid!important;place-items:center;width:52px!important;min-width:52px!important;height:52px!important;min-height:52px!important;padding:0!important;border-radius:50%!important;box-shadow:0 10px 26px color-mix(in srgb,var(--orange) 35%,transparent)!important;font-size:0!important;line-height:0!important}
  /* 图标独立于按钮内的隐藏文字，避免匿名网格行、gap 和字体基线导致偏移。 */
  .monitor-page-intro .monitor-title-controls>.monitor-create-button::before,
  .monitor-page-intro .monitor-title-controls>.monitor-create-button::after{content:"";position:absolute;left:50%;top:50%;display:block;background:currentColor;border-radius:1px;transform:translate(-50%,-50%);pointer-events:none}
  .monitor-page-intro .monitor-title-controls>.monitor-create-button::before{width:22px;height:2px}
  .monitor-page-intro .monitor-title-controls>.monitor-create-button::after{width:2px;height:22px}
  .container:has(#batch-bar[style*="flex"]) .monitor-page-intro .monitor-title-controls>.monitor-create-button{display:none!important}

  /* 关停历史 / 操作日志 / 一键关停 / 导出 收进「更多」；侧栏工具条在手机端不显示（「待处理」已移除）。 */
  .container>.sph-side-tools{display:none!important}

  /* ---- 筛选按钮（功能区右端）+ 全屏筛选/排序面板 ---- */
  .monitor-main-column>.plan-filter-card{margin:0 0 10px!important;padding:0!important;overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  .plan-filter-card>.plan-filter-toggle{position:relative;display:flex!important;align-items:center;justify-content:center;gap:5px;width:auto!important;min-width:0;height:44px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:14px;font-weight:700;cursor:pointer}
  .plan-filter-card>.plan-filter-toggle svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round}
  .plan-filter-card>.plan-filter-toggle.has-filters{border-color:var(--orange);background:var(--orange-soft);color:var(--orange)}
  .plan-filter-card .mobile-filter-badge{display:grid;min-width:18px;height:18px;padding:0 5px;place-items:center;border-radius:999px;background:var(--orange);color:#fff;font-size:11px;font-weight:800;line-height:1;box-sizing:border-box}
  .plan-filter-card .mobile-filter-badge[hidden]{display:none}
  .plan-filter-card:not(.plan-filter-open)>.plan-filter-shell{display:none!important}
  .plan-filter-card .plan-filter-strip>#search-filter-toggle{display:none!important}

  .monitor-main-column>.plan-filter-card.plan-filter-open{z-index:300!important}
  .plan-filter-card.plan-filter-open>.plan-filter-shell{position:fixed;z-index:1;inset:0;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;padding:0 16px;background:var(--card,var(--surface))}
  .plan-filter-card.plan-filter-open .mobile-filter-sheet-head{position:sticky;z-index:3;top:0;display:flex!important;align-items:center;justify-content:space-between;margin:0 -16px 12px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;border-bottom:1px solid var(--line);background:var(--card,var(--surface))}
  .plan-filter-card .mobile-filter-sheet-head h3{margin:0;font-size:18px}
  .plan-filter-card .mobile-filter-sheet-close{display:grid;width:44px;height:44px;place-items:center;padding:0;border:0;border-radius:12px;background:transparent;color:var(--muted);font-size:28px;line-height:1;cursor:pointer}
  .plan-filter-card.plan-filter-open .mobile-sheet-extra{display:grid!important;gap:12px;margin:0 0 12px;padding:0 0 14px;border-bottom:1px solid var(--line)}
  .plan-filter-card .mobile-sheet-field{display:grid;gap:6px;min-width:0}
  .plan-filter-card .mobile-sheet-field>span{color:var(--muted);font-size:12px;font-weight:700}
  .plan-filter-card .mobile-sort-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .plan-filter-card .mobile-sheet-extra :is(select,.ui-select){width:100%;min-width:0}
  .plan-filter-card .mobile-sheet-extra :is(select,.ui-select-trigger){height:46px!important;min-height:46px!important;border-radius:12px!important;font-size:15px!important}
  .plan-filter-card .mobile-sort-dir{min-width:84px;height:46px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:15px;font-weight:650;white-space:nowrap;cursor:pointer}
  .plan-filter-card.plan-filter-open .plan-filter-strip{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;align-items:stretch!important;gap:12px!important;flex:1 0 auto}
  .plan-filter-card.plan-filter-open .plan-filter-strip>*{flex:0 0 auto!important;width:100%!important;min-width:0!important;max-width:none!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip>#plan-search-control{display:flex!important;height:46px!important;animation:none!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip :is(select,input,.ui-select-trigger,.author-filter-trigger){height:46px!important;min-height:46px!important;border-radius:12px!important;font-size:15px!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip>#plan-search-control input{padding:0 12px!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip>.advanced-filter-anchor{display:block!important;height:auto!important;flex:none!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip .advanced-filter-toggle{display:flex!important;width:100%!important;height:46px!important;min-height:46px!important;gap:8px;align-items:center;justify-content:center;border-radius:12px!important}
  .plan-filter-card.plan-filter-open .plan-filter-strip .advanced-filter-toggle::after{content:"更多条件（资金、计费、金额、策略）";font-size:14px;font-weight:650}
  .plan-filter-card.plan-filter-open .plan-filter-strip .advanced-filter-badge{position:static;border:0}
  .plan-filter-card.plan-filter-open .plan-filter-strip>.plan-filter-actions{position:sticky!important;z-index:3;bottom:0;display:flex!important;gap:10px!important;width:auto!important;margin:auto -16px 0!important;padding:10px 16px calc(10px + env(safe-area-inset-bottom))!important;border-top:1px solid var(--line);background:var(--card,var(--surface))}
  .plan-filter-card.plan-filter-open .plan-filter-strip>.plan-filter-actions .btn{flex:1 1 0!important;width:auto!important;height:48px!important;min-height:48px!important;border-radius:12px!important;font-size:16px!important}

  /* ---- 计划列表：去掉标题栏（条数在分页处显示），只保留快照提示 ---- */
  .monitor-main-column>.plan-detail-card{margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  .plan-detail-card .plan-table-head{display:block!important;margin:0!important;padding:0!important}
  .plan-detail-card .plan-table-head>:not(:first-child){display:none!important}
  .plan-detail-card .plan-table-head>div:first-child>:not(.order-snapshot-hint){display:none!important}
  /* 快照提示是数据可信度提示，展示期间必须可见。 */
  .plan-detail-card .plan-table-head .order-snapshot-hint[hidden]{display:none!important}
  .plan-detail-card .plan-table-head .order-snapshot-hint:not([hidden]){display:inline-flex!important;margin:0 0 8px!important}

  /* ---- 计划卡片：紧凑三行，约 100px 高；同一 table DOM，无横向滚动 ---- */
  .plan-detail-card .table-scroll{overflow:visible!important;border:0!important;border-radius:0!important;background:transparent!important}
  .plan-detail-card #orders-table{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important}
  .plan-detail-card #orders-table thead{display:none!important}
  .plan-detail-card #orders-table tbody{display:grid!important;gap:8px}
  .plan-detail-card #orders-table tr{display:block!important;background:transparent!important}
  .plan-detail-card #orders-table tr>td{display:block!important;width:auto!important;max-width:none!important;padding:10px 12px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;font-size:14px!important;white-space:normal!important}
  .plan-detail-card #orders-table tr.orders-skeleton{display:grid!important;gap:8px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface)!important}
  .plan-detail-card #orders-table tr.orders-skeleton>td{padding:0!important;border:0!important;background:transparent!important}
  .plan-detail-card #orders-table td.plan-m-card{display:grid!important;grid-template-columns:30px minmax(0,1fr);gap:0 4px;padding:9px 10px 9px 2px!important}
  .plan-detail-card #orders-table .pmc-check{display:flex;align-self:stretch;justify-content:center;padding-top:2px;cursor:pointer}
  .plan-detail-card #orders-table .pmc-check input{width:18px;height:18px;min-height:0!important;margin:0;accent-color:var(--orange)}
  .plan-detail-card #orders-table .pmc-main{display:grid;gap:5px;min-width:0}
  .plan-detail-card #orders-table .pmc-line{display:flex;align-items:center;gap:8px;min-width:0}
  .plan-detail-card #orders-table .pmc-title{display:block!important;flex:1 1 auto;width:auto!important;max-width:none!important;min-width:0;min-height:0!important;padding:0!important;border:0;background:transparent;color:var(--text);font-size:14px!important;font-weight:750;line-height:1.4;text-align:left;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;cursor:pointer}
  .plan-detail-card #orders-table .pmc-line .tag{flex:0 0 auto;padding:1px 7px;font-size:11px;line-height:1.5;white-space:nowrap}
  .plan-detail-card #orders-table .pmc-metrics{display:flex;flex-wrap:wrap;gap:2px 12px;color:var(--muted);font-size:12px;line-height:1.45}
  .plan-detail-card #orders-table .pmc-metrics b{color:var(--text);font:700 13px var(--font-mono,var(--mono,ui-monospace,monospace))}
  .plan-detail-card #orders-table .pmc-metrics b.red{color:var(--danger)}
  .plan-detail-card #orders-table .pmc-metrics b.green{color:var(--green)}
  /* 投放号·作者靠左、操作按钮靠右（用户指定）。 */
  .plan-detail-card #orders-table .pmc-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
  .plan-detail-card #orders-table .pmc-who{order:1;min-width:0;overflow:hidden;color:var(--muted);font-size:11px;text-align:left;text-overflow:ellipsis;white-space:nowrap}
  .plan-detail-card #orders-table .pmc-actions{order:2;display:flex;flex:0 0 auto;gap:6px;margin-left:auto}
  .plan-detail-card #orders-table .pmc-actions .plan-action{width:auto!important;min-width:56px!important;max-width:none!important;height:32px!important;min-height:32px!important;padding:0 11px!important;border:1px solid var(--line)!important;border-radius:9px!important;background:var(--surface)!important;font-size:13px!important;font-weight:700}
  .plan-detail-card #orders-table .pmc-actions .plan-action.danger{border-color:color-mix(in srgb,var(--danger) 35%,var(--line))!important;color:var(--danger)!important}
  .plan-detail-card #orders-table .pmc-actions .plan-action-pay{border-color:var(--green)!important;background:var(--green)!important;color:#fff!important}
  .plan-detail-card #orders-table .pmc-actions .plan-action:disabled{opacity:.45}

  /* ---- 批量操作：固定在底部导航上方，按钮横滑；含「全选本页」 ---- */
  .plan-detail-card #batch-bar{position:fixed!important;z-index:150;left:10px;right:10px;bottom:calc(var(--mobile-nav-h,0px) + env(safe-area-inset-bottom) + 8px);flex-wrap:nowrap!important;gap:8px!important;margin:0!important;padding:8px 10px!important;overflow-x:auto;border:1px solid color-mix(in srgb,var(--orange) 30%,var(--line))!important;border-radius:14px!important;background:color-mix(in srgb,var(--orange) 7%,var(--card,var(--surface)))!important;box-shadow:var(--shadow-lg);color:var(--text)!important;font-size:14px;white-space:nowrap;scrollbar-width:none}
  .plan-detail-card #batch-bar::-webkit-scrollbar{display:none}
  .plan-detail-card #batch-bar .btn{flex:0 0 auto;height:44px!important;min-height:44px!important;padding:0 14px!important;border-radius:12px!important;font-size:14px!important}
  .plan-detail-card #batch-bar>.batch-select-page{display:inline-flex!important}
  .plan-detail-card:has(#batch-bar[style*="flex"]){padding-bottom:76px!important}

  /* ---- 分页：上一页 · 第 x / y 页 · 共 N 条 · 下一页 + 每页条数 ---- */
  /* 底部留出悬浮「＋」的高度：滑到底时最后一张卡片和分页都不被它压住。 */
  .plan-detail-card .order-pagination{display:flex!important;flex-wrap:nowrap!important;align-items:center;justify-content:space-between!important;gap:8px!important;overflow:visible!important;margin:12px 0 72px!important}
  .plan-detail-card .order-pagination .order-page-summary,.plan-detail-card .order-pagination .order-page-numbers{display:none!important}
  .plan-detail-card .order-pagination .order-page-indicator{display:block!important;order:2;flex:1 1 auto;min-width:0;overflow:hidden;color:var(--text);font-size:13px;font-weight:650;text-align:center;text-overflow:ellipsis;white-space:nowrap}
  .plan-detail-card .order-pagination .order-page-arrow{width:44px!important;min-width:44px!important;height:44px!important;border-radius:12px!important}
  .plan-detail-card .order-pagination #order-prev-page{order:1}
  .plan-detail-card .order-pagination #order-next-page{order:3}
  .plan-detail-card .order-pagination>:is(select,.ui-select){order:4;flex:0 0 104px!important;width:104px!important;min-width:104px!important;max-width:104px!important}
  .plan-detail-card .order-pagination>:is(select,.ui-select) :is(.ui-select-trigger),.plan-detail-card .order-pagination>select{height:44px!important;min-height:44px!important}

  /* ---- 计划详情：全屏页面 ---- */
  #detail-dialog.show{z-index:300;padding:0!important;align-items:stretch!important;justify-content:stretch!important}
  #detail-dialog>.dialog{width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important}
  #detail-dialog .detail-dialog-head{top:0!important;margin:0!important;padding:calc(12px + env(safe-area-inset-top)) 16px 12px!important;border-radius:0!important}
  #detail-dialog .detail-dialog-head h3{white-space:normal;font-size:18px;line-height:1.5}
  #detail-dialog .detail-dialog-head h3 #detail-pid{display:block;margin:2px 0 0;font-family:var(--font,var(--font-cjk));font-size:12px;line-height:1.5;overflow-wrap:anywhere}
  #detail-dialog .detail-dialog-close{align-self:flex-start;min-width:44px;height:44px}
  #detail-dialog #detail-body{padding:0 16px calc(20px + env(safe-area-inset-bottom))!important}
}

/* 复投准备：只调整手机布局，仍复用桌面状态与榜单进度组件。 */
@media (max-width:760px) {
  .page-intro.create-page-intro { margin-inline:0; }
  .create-page-return { min-height:44px; min-width:44px; }
  #reinvest-banner.reinvest-status-card { padding:0 12px; }
  .reinvest-status-head { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:0 8px; min-height:44px; }
  .reinvest-status-title { grid-column:1; grid-row:1; padding:0; border:0; }
  /* 完整原计划名仍在明细中展示；收起时只保留任务、状态和展开入口。 */
  .reinvest-status-name { display:none; }
  .reinvest-status-summary { grid-column:2; grid-row:1; width:auto; max-width:130px; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
  .reinvest-status-card[data-state="ready"] .reinvest-status-summary { width:auto; max-width:130px; }
  .reinvest-status-actions { display:contents; }
  .reinvest-status-card .reinvest-status-actions .btn { min-width:44px; min-height:44px; height:44px; padding:6px 8px; font-size:12px; white-space:nowrap; }
  .reinvest-status-actions .reinvest-details-toggle { grid-column:3; grid-row:1; margin:0; }
  #reinvest-retry,#reinvest-convert { display:none; }
  #reinvest-banner:has(#reinvest-details-toggle[aria-expanded="true"]) #reinvest-retry:not([hidden]) { display:inline-flex; grid-column:1; grid-row:2; justify-content:center; margin:0 0 8px; }
  #reinvest-banner:has(#reinvest-details-toggle[aria-expanded="true"]) #reinvest-convert { display:inline-flex; grid-column:2/4; grid-row:2; justify-content:center; margin:0 0 8px; }
  .reinvest-details { margin-top:0; padding-bottom:12px; }
  .reinvest-detail-meta { flex-direction:column; gap:8px; }
  .reinvest-problem-row { grid-template-columns:minmax(0,1fr); gap:4px; }
  .reinvest-problem-state { grid-row:auto; }
  #video-verification-overlay { padding:12px; }
  #video-verification-overlay .batch-transcribe-progress-card { padding:20px 16px; }
  #video-verification-overlay .batch-transcribe-progress-card strong { font-size:32px; }
}
@media(max-width:600px) {
  .create-plan-heading { gap:8px; margin-bottom:12px; }
  .create-plan-heading h3 { display:none; }
  .create-plan-heading .create-page-return { width:44px; min-width:44px; height:44px; padding:0; }
  .create-plan-heading .create-page-return span { display:none; }
  .create-plan-heading .mobile-create-progress { flex:1; min-width:0; margin:0; padding:0; gap:2px; border:0; border-radius:0; background:transparent; }
  .create-plan-heading .mobile-create-step { min-width:0; min-height:44px; flex-direction:row; gap:4px; padding:4px 0; border-radius:8px; font:400 12px/18px var(--font-cjk,var(--font)); }
  .create-plan-heading .mobile-create-step b { flex:0 0 18px; width:18px; min-width:18px; max-width:18px; height:18px; min-height:18px; max-height:18px; padding:0; aspect-ratio:1; box-sizing:border-box; border-radius:50%; font:500 11px/1 var(--font-cjk,var(--font)); }
  .create-plan-heading .mobile-create-step span { min-width:0; white-space:nowrap; font:inherit; }
  .create-plan-heading .mobile-create-step.active { background:var(--orange-soft); box-shadow:none; }
}

.batch-transcribe-progress { position:absolute; inset:0; z-index:2; display:grid; place-items:center; padding:20px; background:color-mix(in srgb,var(--card) 72%,transparent); backdrop-filter:blur(5px); }
.batch-transcribe-progress[hidden] { display:none; }
.batch-transcribe-progress-card { display:grid; justify-items:center; width:min(420px,100%); padding:28px 26px; border:1px solid var(--line); border-radius:18px; background:var(--card); box-shadow:var(--card-shadow,var(--shadow)); text-align:center; }
.batch-transcribe-progress-spinner { width:28px; height:28px; margin-bottom:16px; border:3px solid var(--line); border-top-color:var(--orange); border-radius:50%; animation:studio-spin .8s linear infinite; }
.batch-transcribe-progress-kicker { color:var(--t2,var(--muted)); font-size:12px; font-weight:700; letter-spacing:.08em; }
.batch-transcribe-progress-card strong { margin-top:8px; color:var(--t1,var(--text)); font:750 42px/1.1 var(--font-latin,var(--font)); font-variant-numeric:tabular-nums; }
.batch-transcribe-progress-card p { max-width:100%; margin:12px 0 20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--t2,var(--muted)); font-size:12px; }
.batch-transcribe-progress-track { width:100%; height:8px; overflow:hidden; border-radius:999px; background:var(--line); }
.batch-transcribe-progress-track i { display:block; width:0; height:100%; border-radius:inherit; background:var(--orange); transition:width .25s ease; }
.batch-transcribe-progress-card small { margin-top:11px; color:var(--t3,var(--faint)); font-size:11px; }
.batch-transcribe-progress-track.is-indeterminate i { width:35%; animation:studio-progress-wait 1.4s ease-in-out infinite; }
@keyframes studio-progress-wait { from { transform:translateX(-110%); } to { transform:translateX(390%); } }
@media (prefers-reduced-motion:reduce) { .batch-transcribe-progress-spinner,.batch-transcribe-progress-track.is-indeterminate i { animation:none; } .batch-transcribe-progress-track i { transition:none; } }

@keyframes studio-spin { to { transform: rotate(360deg); } }
  .container { width: 100%; max-width: none; padding-top: 26px; background: transparent; }
}
/* 页签插到 intro 首位时（除监控页外都是这种），intro 竖排：页签单独一行，说明落到它下面。
   必须放在 @scope 之后并用 #sphNativeHost 提权，否则会被 scope 内的 .page-intro.sph-page-intro 压掉，
   说明文案就被 flex 挤到页签右侧（曾表现为「导航条位置错位」）。 */
#sphNativeHost .page-intro.sph-page-intro:has(> .sph-native-tabs) { display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-start; gap:12px; padding-bottom:18px; margin-bottom:14px; }
#sphNativeHost .container.accounts-page { padding-top:26px!important; }
#sphNativeHost .page-intro.sph-page-intro:has(> .sph-native-tabs) > div:not(.sph-native-tabs) { width:100%; min-width:0; }
#sphNativeHost .page-intro.sph-page-intro:has(> .sph-native-tabs) .sph-native-tabs { align-self:flex-start; }
/* 创建页：页签、返回入口、状态条、卡片共用容器边线。 */
.sph-native-host .page-intro.create-page-intro { margin-inline:0; }
.sph-native-host .create-plan-heading { display:flex; align-items:center; gap:12px; margin:0 0 16px; min-width:0; }
.sph-native-host .create-plan-heading h3 { margin:0; }
.sph-native-host .create-page-return { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:5px; min-height:32px; margin:0; padding:0 2px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:400 13px var(--font-cjk); cursor:pointer; }
.sph-native-host .create-page-return:hover { color:var(--text); }
.sph-native-host .create-page-return:focus-visible { outline:2px solid var(--orange); outline-offset:3px; }
.sph-native-host .create-page-return svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.6; }
#sphNativeHost .page-intro.create-page-intro > div:empty { display:none; }
@media (max-width: 760px) {
  /* 投流手机标题/日期/导航的唯一权威来源（P1 第五步）：以下值即 nova-mobile.css 与
     mobile-experience.css 里互相覆盖后的实际生效值，两处重复覆盖已移除。 */
  .sph-native-tabs { flex:1 1 100%!important; display:flex!important; width:100%; max-width:none!important; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; justify-content:flex-start!important; gap:4px; padding:4px; border-radius:12px; flex-wrap:nowrap; margin:0; }
  .sph-native-tab { flex:1 1 0!important; min-width:0!important; width:auto!important; min-height:42px!important; padding:8px 4px!important; border-radius:10px!important; font-size:12px!important; white-space:nowrap; text-align:center; }
  #sphNativeHost .monitor-title-row { display:flex!important; flex-wrap:wrap; align-items:center; gap:8px; width:100%!important; max-width:none!important; margin:0; padding:0; border:0; background:transparent; }
  /* 顶部网格与右下角「创建计划」悬浮按钮由 static/monitor-mobile.css 定义；
     有未提交的创建草稿时，悬浮球本身就是创建入口，隐藏悬浮按钮避免两个入口叠在一起。 */
  #sphNativeHost:has(#sphMiniCreateBall:not([hidden])) .monitor-title-controls > .monitor-create-button { display:none!important; }
  /* 引擎状态（当前/检查时间）挪到工作台顶栏右侧，不再单独占一行；顶栏随滚动收起时一起隐藏，
     关停历史/操作日志侧栏打开时让出右上角的关闭按钮。 */
  #sphNativeHost #monitor-engine-status { position:fixed!important; z-index:85; top:calc(env(safe-area-inset-top) + 11px); right:10px; width:auto!important; max-width:124px!important; height:36px!important; min-height:0!important; margin:0!important; padding:3px 8px!important; gap:6px!important; border-radius:10px!important; transition:opacity .2s ease; }
  #sphNativeHost #monitor-engine-status #sync-state { flex-direction:column!important; flex-wrap:nowrap!important; gap:1px!important; }
  #sphNativeHost #monitor-engine-status #sync-state .sync-progress { -webkit-line-clamp:2; font-size:9px; line-height:1.25; }
  body.mobile-bars-hidden #sphNativeHost #monitor-engine-status { opacity:0!important; visibility:hidden!important; pointer-events:none!important; }
  #sphNativeHost:has(.sph-side-panel.show) #monitor-engine-status { display:none!important; }
  #sphNativeHost .monitor-title-controls { position:static!important; inset:auto!important; display:grid!important; width:100%!important; margin:0!important; gap:8px!important; }
  #sphNativeHost .monitor-page-intro { min-height:0; margin:0!important; padding:0!important; padding-bottom:12px!important; border:0!important; }
  #sphNativeHost .monitor-title-controls .sph-range-toggle { background:var(--panel)!important;color:var(--t1)!important;border-color:var(--line)!important; }
  #sphNativeHost .monitor-title-controls .sph-range-toggle strong { display:block!important; }
  main:has(> #view-sph-monitor.active) > .topbar .topbar-page-title { max-width:calc(100% - 120px); }
  /* P1 第五步：手机投流区域去掉高成本视觉（sticky 列/阴影/行内过渡）；
     桌面外观与可点击区域不变，不用全站通配符关交互样式。 */
  .sph-native-tabs { box-shadow:none; }
  .sph-native-host #orders-table .sticky-left-1, #sphNativeHost #orders-table .sticky-left-1,
  .sph-native-host #orders-table .sticky-right, #sphNativeHost #orders-table .sticky-right { position:static!important; box-shadow:none!important; }
  .sph-native-host #orders-table .plan-action, #sphNativeHost #orders-table .plan-action { transition:none; }
}
/* 站内统一操作弹窗样式（确认 / 输入 / 选择）。
 *
 * 必须全局生效：弹窗是 append 到 body 的，而页面主体样式被包在
 * @scope (.sph-native-content) 里，作用域选择器匹配不到它——规则会静默失效，
 * 弹窗退回浏览器默认外观。所以这个文件由 build-sph-native.mjs 注入生成 CSS 的
 * 全局段（不在 @scope 内），独立投流页则直接外链本文件。
 *
 * 弹窗同时出现在两种主题上下文中（独立投流页 / 工作台），两边的设计令牌名字
 * 不完全一致，因此这里先把需要的令牌收敛成 --ad-* 局部别名并带兜底值，
 * 保证任一上下文都能拿到可用颜色，不会因为某个变量缺失而整体失效。
 */
.sph-action-confirm {
  --ad-line: var(--line, var(--border, rgba(120, 113, 108, .22)));
  --ad-card: var(--card, var(--panel, #fff));
  --ad-surface: var(--surface, var(--input-bg, var(--panel, #fff)));
  --ad-elevated: var(--elevated, var(--surface, var(--panel, #f6f2ee)));
  --ad-text: var(--text, var(--t1, #1f1a17));
  --ad-muted: var(--muted, var(--t2, #6b625c));
  --ad-accent: var(--orange, var(--action-accent, #ff682f));
  --ad-soft: var(--orange-soft, var(--action-soft, rgba(255, 104, 47, .12)));
  --ad-danger: var(--danger, #d33a4e);
  --ad-shadow: var(--shadow-lg, 0 20px 50px rgba(31, 26, 23, .16));
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid var(--ad-line);
  border-radius: 14px;
  background: var(--ad-card);
  box-shadow: var(--ad-shadow);
  color: var(--ad-text);
  font-family: var(--font, inherit);
  overflow: auto;
}
.sph-action-confirm::backdrop { background: rgba(20, 19, 17, .36); }
.sph-action-confirm h2 { margin: 0 0 16px; color: var(--ad-text); font-size: 18px; font-weight: 700; line-height: 1.4; }
.sph-action-confirm p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ad-muted); font-size: 14px; line-height: 1.8; }
.sph-action-confirm-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.sph-action-confirm.has-secondary-action .sph-action-confirm-actions { flex-wrap:wrap; gap:8px; }
.sph-action-confirm.has-secondary-action .sph-action-confirm-actions .btn { flex:1 1 auto; }
/* 圆角、光标以及按钮的基础排版都必须在这里显式声明：这些属性来自 `.btn`
 * （style.css / sph-native.css），而那两份样式在生成资源中被包进
 * @scope (.sph-native-content)，挂在 body 上的 dialog 匹配不到 —— 缺哪个属性就
 * 退回浏览器默认值（圆角 0、光标箭头、字重 400、字号 13.33px、不居中）。
 * 下面这组值与 `.btn` 的定义保持一致，改 `.btn` 时记得同步。 */
.sph-action-confirm-actions .btn { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 108px; height: 38px; min-width: 0; margin: 0; padding: 0 12px; border: 0; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; text-align: center; transform: none !important; transition: background-color .15s, color .15s, border-color .15s; }
.sph-action-confirm-actions .btn:disabled { cursor: not-allowed; }
.sph-action-confirm-actions .btn:focus-visible { outline: 2px solid var(--ad-accent); outline-offset: 3px; }
.sph-action-confirm-actions .btn.ghost { border: 1px solid var(--ad-line); background: var(--ad-surface); box-shadow: none; color: var(--ad-text); }
.sph-action-confirm-actions .btn.ghost:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ad-accent) 55%, var(--ad-line)); background: var(--ad-soft); color: var(--ad-accent); }
.sph-action-confirm-actions .btn.danger { border: 0; background: var(--ad-danger); box-shadow: none; color: #fff; }
.sph-action-confirm-actions .btn.danger:hover:not(:disabled) { filter: brightness(1.06); }
.sph-action-confirm-structured { width: min(520px, calc(100vw - 32px)); }
.sph-action-confirm-summary { margin-top: 18px; }
.sph-action-confirm-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.sph-action-confirm-metrics > div { min-width: 0; padding: 14px; border: 1px solid var(--ad-line); border-radius: 10px; background: var(--ad-surface); }
.sph-action-confirm-metrics dt { color: var(--ad-muted); font-size: 12px; line-height: 1.5; }
.sph-action-confirm-metrics dd { margin: 6px 0 0; color: var(--ad-text); font-size: 23px; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
/* 指标卡是两列网格，只有一条（或奇数条的最后一条）时右边会空着半个格子、
 * 内容被挤在窄栏里换行。让这一条横跨整行：两条及以上仍保持左右并排。 */
.sph-action-confirm-metrics > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sph-action-confirm-metrics .is-emphasis { border-color: var(--ad-accent); }
.sph-action-confirm-metrics .is-emphasis dd { color: var(--ad-accent); }
.sph-action-confirm-details { margin: 16px 0 0; padding-top: 8px; border-top: 1px solid var(--ad-line); }
.sph-action-confirm-details > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; padding: 7px 0; font-size: 13px; line-height: 1.6; }
.sph-action-confirm-details dt { color: var(--ad-muted); }
.sph-action-confirm-details dd { margin: 0; color: var(--ad-text); text-align: right; font-weight: 650; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sph-action-confirm-details .is-emphasis dd { color: var(--ad-accent); }
.sph-action-confirm-field { margin-top: 18px; }
.sph-action-confirm-label { display: block; margin-bottom: 7px; color: var(--ad-muted); font-size: 12px; font-weight: 650; }
.sph-action-confirm-control {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--ad-line);
  border-radius: 11px;
  background: var(--ad-surface);
  color: var(--ad-text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.sph-action-confirm-control:focus { border-color: color-mix(in srgb, var(--ad-accent) 62%, var(--ad-line)); box-shadow: 0 0 0 3px var(--ad-soft); }
select.sph-action-confirm-control { cursor: pointer; }
.sync-account-picker{width:min(480px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto}
.sync-picker-search{box-sizing:border-box;width:100%;padding:10px 12px;border:1px solid var(--ad-line);border-radius:10px;background:var(--ad-surface);color:var(--ad-text);font:inherit;margin:4px 0 12px}
.sync-picker-list{max-height:300px;overflow:auto;margin-top:8px}
.sync-picker-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--ad-line);border-radius:10px;margin-bottom:7px;cursor:pointer}
.sync-picker-option:has(input:checked){border-color:var(--ad-accent);background:var(--ad-soft)}
.sync-picker-option input{accent-color:var(--ad-accent);flex:0 0 auto}
.sync-picker-option span{min-width:0;display:flex;flex-direction:column;gap:5px}
.sync-picker-option strong{font-size:13px;overflow-wrap:anywhere}
.sync-picker-option small{font-size:11px;color:var(--ad-muted)}
.sync-picker-option.is-offline{opacity:.6;cursor:not-allowed}
.sync-picker-summary{font-size:12px!important;line-height:1.5!important;margin:10px 0!important}
.sync-account-picker [data-confirm]:disabled{opacity:.45;cursor:not-allowed}
.quick-close-picker .quick-close-presets{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.quick-close-picker > label{display:block;margin:7px 0;font-size:12px;color:var(--ad-muted)}
.quick-close-picker select,.quick-close-picker input[type="number"],.quick-close-picker input[type="datetime-local"]{display:block;width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid var(--ad-line);border-radius:10px;background:var(--ad-surface);color:var(--ad-text);font:inherit;margin:4px 0}
.quick-close-picker [hidden]{display:none!important}
.quick-close-picker .quick-close-hours{margin:8px 0;padding:10px;border:1px solid var(--ad-line);border-radius:12px;background:var(--ad-surface)}
.quick-close-picker .quick-close-hours .quick-close-presets{margin:0 0 8px}
.quick-close-picker [data-hours][aria-pressed="true"]{border-color:var(--ad-accent);background:var(--ad-soft);color:var(--ad-accent)}
.quick-close-picker .quick-close-hours-label{display:block;font-size:13px;color:var(--ad-text)}
.quick-close-picker [data-hours-value]{font-weight:700;color:var(--ad-accent);font-variant-numeric:tabular-nums}
.quick-close-picker input[type="range"]{--hours-fill:0%;appearance:none;-webkit-appearance:none;display:block;width:100%;height:30px;min-height:30px;margin:6px 0 2px;padding:0;border:0;box-shadow:none;background:transparent;cursor:pointer}
.quick-close-picker input[type="range"]::-webkit-slider-runnable-track{height:24px;border:0;border-radius:999px;background:linear-gradient(to right,var(--ad-accent) 0 calc(var(--hours-fill) + var(--hours-offset,0px)),var(--ad-line) calc(var(--hours-fill) + var(--hours-offset,0px)) 100%)}
.quick-close-picker input[type="range"]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:30px;height:30px;margin-top:-3px;border:1px solid var(--ad-line);border-radius:50%;background:var(--ad-surface);box-shadow:0 1px 3px color-mix(in srgb,var(--ad-text) 15%,transparent)}
.quick-close-picker input[type="range"]::-moz-range-track{height:24px;border:0;border-radius:999px;background:var(--ad-line)}
.quick-close-picker input[type="range"]::-moz-range-progress{height:24px;border:0;border-radius:999px;background:var(--ad-accent)}
.quick-close-picker input[type="range"]::-moz-range-thumb{width:28px;height:28px;border:1px solid var(--ad-line);border-radius:50%;background:var(--ad-surface);box-shadow:0 1px 3px color-mix(in srgb,var(--ad-text) 15%,transparent)}
.quick-close-picker .quick-close-range-labels{display:flex;justify-content:space-between;font-size:11px;color:var(--ad-muted)}
@media (max-width: 380px) {
  .sph-action-confirm-structured { padding: 18px; }
  .sph-action-confirm-metrics > div { padding: 10px; }
  .sph-action-confirm-metrics dd { font-size: 20px; }
}

/* Quick close: integer-hour detents and the shared calendar grid inside the dialog. */
.quick-close-hour-ticks{display:flex;justify-content:space-between;margin:0 15px 7px;pointer-events:none}
.quick-close-hour-ticks i{width:3px;height:3px;border-radius:50%;background:var(--ad-muted);opacity:.55}
.quick-close-date-field{margin:10px 0;font-size:12px;color:var(--ad-muted)}
.quick-close-picker [data-date-toggle]{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:42px;margin:6px 0;padding:10px 12px;border:1px solid var(--ad-line);border-radius:10px;background:var(--ad-surface);color:var(--ad-text);font:inherit;cursor:pointer}
.quick-close-picker [data-date-panel]{padding:12px;border:1px solid var(--ad-line);border-radius:12px;background:var(--ad-surface)}
.quick-close-calendar-nav,.quick-close-time,.quick-close-date-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}
.quick-close-picker [data-date-panel] button{font:inherit;border:0;background:transparent;color:var(--ad-text);border-radius:8px;min-height:36px;cursor:pointer}
.quick-close-calendar-nav button{width:36px;background:var(--ad-soft)!important}
.quick-close-picker [data-date-calendar] .sph-range-month-head{display:none}
.quick-close-picker .sph-range-weekdays,.quick-close-picker .sph-range-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}
.quick-close-picker .sph-range-weekdays{margin:12px 0 6px;color:var(--ad-muted)}
.quick-close-picker [data-date-panel] .sph-range-day{min-width:0;width:100%;padding:0;height:36px;margin:0;box-shadow:none}
.quick-close-picker [data-date-panel] .sph-range-day.is-start{background:var(--ad-accent);color:white;font-weight:700}
.quick-close-picker [data-date-panel] button:disabled{opacity:.3;cursor:default}
.quick-close-picker [data-date-panel] button:focus-visible{outline:2px solid var(--ad-accent);outline-offset:1px}
.quick-close-time{justify-content:flex-start;margin-top:10px}
.quick-close-time label{flex:1;min-width:0}
.quick-close-date-actions{justify-content:flex-end;border-top:1px solid var(--ad-line);padding-top:8px;margin-top:8px}
.quick-close-picker [data-date-panel] [data-date-apply]{background:var(--ad-accent);color:white;padding:0 14px}

/* One-key close borrows the ranking batch dialog's clear parent/child hierarchy. */
.quick-close-picker{width:min(560px,calc(100vw - 28px));max-height:min(760px,calc(100dvh - 32px));padding:0;overflow:auto}
.quick-close-picker-head{padding:16px 20px 12px;border-bottom:1px solid var(--ad-line)}
.quick-close-progress-head>span{display:block;margin-bottom:7px;color:var(--ad-muted);font-size:10px;font-weight:800;letter-spacing:.19em}
.quick-close-picker-head h2{margin:0 0 5px;font-size:19px}
.quick-close-picker-head p{font-size:11px;line-height:1.5}
.quick-close-picker .quick-close-method{display:grid;gap:5px;margin:11px 20px 0;color:var(--ad-muted);font-size:12px;font-weight:700}
.quick-close-picker .quick-close-method select{margin:0;min-height:39px;font-size:13px;font-weight:700}
.quick-close-picker>label:not(.quick-close-method),.quick-close-picker>[data-hours-field],.quick-close-picker>[data-date-field]{margin-left:20px;margin-right:20px}
.quick-close-picker>label:not(.quick-close-method){font-weight:700}
.quick-close-picker .quick-close-hours{background:var(--ad-elevated)}
.quick-close-targets{margin:10px 20px 0;padding:10px;border:1px solid var(--ad-line);border-radius:12px;background:var(--ad-elevated)}
.quick-close-targets-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 7px}
.quick-close-targets-head strong{color:var(--ad-text);font-size:13px}
.quick-close-targets-head small{color:var(--ad-muted);font-size:11px;text-align:right}
.quick-close-targets .sync-picker-search{margin:0 0 7px;background:var(--ad-card);font-size:12px}
.quick-close-targets .sync-picker-all{margin-bottom:6px}
.quick-close-targets .sync-picker-all .sync-picker-option{background:var(--ad-card);font-weight:700}
.quick-close-targets .sync-picker-list{display:grid;gap:5px;max-height:min(220px,26dvh);margin:0;overflow:auto}
.quick-close-targets .sync-picker-option{margin:0;background:var(--ad-card);border-color:transparent;border-radius:9px;padding:8px 10px}
.quick-close-targets .sync-picker-option:hover{border-color:color-mix(in srgb,var(--ad-accent) 35%,var(--ad-line))}
.quick-close-targets .sync-picker-option:has(input:checked){border-color:var(--ad-accent);background:var(--ad-soft)}
.quick-close-targets .sync-picker-option strong{font-size:12px;font-weight:600}
.quick-close-picker>.sync-picker-summary{margin:9px 20px!important;color:var(--ad-muted);font-size:12px!important}
.quick-close-picker.has-preview>.sync-picker-summary{padding:9px 10px;border:1px solid color-mix(in srgb,var(--ad-accent) 35%,var(--ad-line));border-radius:10px;background:var(--ad-soft);color:var(--ad-text)}
.quick-close-picker>.sph-action-confirm-actions{position:sticky;bottom:0;z-index:2;margin:0;padding:10px 20px;border-top:1px solid var(--ad-line);background:var(--ad-card)}
.quick-close-picker .sph-action-confirm-actions .btn.danger{background:var(--ad-accent)}

.quick-close-progress-dialog{position:relative;width:min(520px,calc(100vw - 28px));padding:30px 26px 25px;overflow:hidden}
.quick-close-progress-dialog [hidden],.quick-close-progress-float[hidden]{display:none!important}
.quick-close-progress-minimize{position:absolute;top:15px;right:16px;display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--ad-line);border-radius:9px;background:var(--ad-card);color:var(--ad-muted);font-family:inherit;font-size:19px;font-weight:700;line-height:1;cursor:pointer}
.quick-close-progress-minimize:hover{color:var(--ad-accent);border-color:var(--ad-accent)}
.quick-close-progress-card{display:grid;justify-items:center;padding:2px 8px 0;text-align:center}
.quick-close-progress-spinner{display:block;width:28px;height:28px;margin-bottom:15px;border:3px solid var(--ad-line);border-top-color:var(--ad-accent);border-radius:50%;animation:stale-close-spin .8s linear infinite}
.quick-close-progress-dialog.is-finished .quick-close-progress-spinner{animation:none;border-color:var(--ad-accent)}
.quick-close-progress-card>strong{color:var(--ad-muted);font-size:12px;font-weight:750}
.quick-close-progress-card>b{margin:7px 0 12px;color:var(--ad-text);font-size:44px;line-height:1.1;font-variant-numeric:tabular-nums}
.quick-close-progress-card>p{max-width:100%;margin:0 0 19px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ad-muted);font-size:12px}
.quick-close-progress-track{width:100%;height:8px;overflow:hidden;border-radius:999px;background:var(--ad-line)}
.quick-close-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:var(--ad-accent);transition:width .2s ease}
.quick-close-progress-card>small{margin-top:10px;color:var(--ad-muted);font-size:11px}
.quick-close-progress-actions{display:flex;justify-content:flex-end;margin-top:17px}
.quick-close-progress-actions button{min-width:80px;padding:9px 14px;border:1px solid var(--ad-line);border-radius:10px;background:var(--ad-card);color:var(--ad-text);font-family:inherit;font-size:12px;font-weight:700;cursor:pointer}
.quick-close-progress-float{position:fixed;z-index:1150;left:18px;bottom:22px;display:flex;align-items:center;gap:9px;max-width:min(280px,calc(100vw - 36px));padding:11px 14px;border:1px solid color-mix(in srgb,var(--orange,#ff682f) 40%,var(--line,#ddd));border-radius:999px;background:var(--card,var(--panel,#fff));box-shadow:0 12px 34px rgba(31,26,23,.18);color:var(--text,var(--t1,#1f1a17));font-family:inherit;font-size:12px;font-weight:700;cursor:pointer}
.quick-close-progress-float.is-native{left:var(--sph-float-left,18px);bottom:var(--sph-float-bottom,22px)}
.quick-close-progress-float [data-float-text]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quick-close-progress-float-dot{width:9px;height:9px;flex:0 0 9px;border-radius:50%;background:var(--orange,#ff682f);box-shadow:0 0 0 4px var(--orange-soft,rgba(255,104,47,.12))}
@media(max-width:600px){.quick-close-picker-head{padding:14px 16px 11px}.quick-close-picker .quick-close-method,.quick-close-picker>label:not(.quick-close-method),.quick-close-picker>[data-hours-field],.quick-close-picker>[data-date-field]{margin-left:16px;margin-right:16px}.quick-close-targets{margin:10px 16px 0}.quick-close-targets-head{display:grid}.quick-close-picker>.sync-picker-summary{margin:9px 16px!important}.quick-close-picker>.sph-action-confirm-actions{padding:10px 16px}.quick-close-progress-float.is-native{left:var(--sph-float-left,14px);bottom:var(--sph-float-bottom,22px)}}
@media(prefers-reduced-motion:reduce){.quick-close-progress-spinner,.quick-close-progress-float-dot{animation:none}.quick-close-progress-track i{transition:none}}

/* 补齐历史：按计划创建日期选择范围 */
.sync-picker-dates{display:grid;gap:8px;margin:4px 0 12px;padding:12px 14px;border:1px solid var(--ad-line);border-radius:12px;background:var(--ad-surface)}
.sync-picker-dates legend{padding:0 4px;color:var(--ad-muted);font-size:12px}
.sync-picker-scope{display:flex;align-items:center;gap:8px;font-size:14px;cursor:pointer}
.sync-picker-range{display:flex;align-items:center;gap:8px;padding-left:24px;color:var(--ad-muted);font-size:13px}
.sync-picker-range input{height:34px;padding:0 10px;border:1px solid var(--ad-line);border-radius:8px;background:var(--ad-card);color:var(--ad-text);font:inherit}
.sync-picker-presets{display:flex;gap:6px;padding-left:24px}
.sync-picker-presets button{height:28px;padding:0 10px;border:1px solid var(--ad-line);border-radius:999px;background:var(--ad-card);color:var(--ad-text);font:inherit;font-size:12px;cursor:pointer}
.sync-picker-presets button:hover:not(:disabled){border-color:color-mix(in srgb,var(--ad-text) 24%,var(--ad-line))}
.sync-picker-dates :disabled{opacity:.45;cursor:not-allowed}

/* 导入视频号官方成交向导（history-import.js）。
 * 与 action-dialog.css 一样必须放在生成 CSS 的全局段：弹窗走 showModal 顶层，
 * 两种主题上下文的令牌名不同，先收敛成 --hi-* 别名并带兜底值。 */
.hi-wizard {
  --hi-line: var(--line, var(--border, rgba(120, 113, 108, .22)));
  --hi-card: var(--card, var(--panel, #fff));
  --hi-surface: var(--surface, var(--input-bg, #faf8f5));
  --hi-text: var(--text, var(--t1, #1f1a17));
  --hi-muted: var(--muted, var(--t2, #6b625c));
  --hi-faint: var(--faint, var(--t3, #9a918a));
  --hi-accent: var(--orange, var(--action-accent, #d97757));
  --hi-soft: var(--orange-soft, var(--action-soft, rgba(217, 119, 87, .12)));
  --hi-green: var(--green, #3f8f5f);
  --hi-red: var(--danger, #c4453c);
  --hi-amber: #b7791f;
  box-sizing: border-box;
  width: min(760px, calc(100vw - 24px));
  max-height: min(860px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hi-line);
  border-radius: 16px;
  background: var(--hi-card);
  color: var(--hi-text);
  box-shadow: 0 24px 64px rgba(31, 26, 23, .18);
  font-family: var(--font, Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 14px;
  overflow: hidden;
}
.hi-wizard:not([open]) { display: none; }
.hi-wizard::backdrop { background: rgba(20, 19, 17, .38); }
.hi-wizard *, .hi-wizard *::before, .hi-wizard *::after { box-sizing: border-box; }
.hi-wizard svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .hi-wizard[open] { animation: hi-in .22s cubic-bezier(.2, .7, .3, 1); }
  @keyframes hi-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
}

.hi-head { display: flex; align-items: flex-start; gap: 16px; padding: 24px 28px 18px; }
.hi-head-text { flex: 1; min-width: 0; }
.hi-kicker { display: block; margin-bottom: 6px; color: var(--hi-accent); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.hi-head h2 { margin: 0; color: var(--hi-text); font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.hi-head p { margin: 6px 0 0; color: var(--hi-muted); font-size: 13px; line-height: 1.65; }
.hi-close { flex: 0 0 32px; width: 32px; height: 32px; margin: -4px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--hi-muted); font-size: 22px; font-family: inherit; line-height: 1; cursor: pointer; }
.hi-close:hover { background: var(--hi-surface); color: var(--hi-text); }

.hi-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0 28px 18px; list-style: none; border-bottom: 1px solid var(--hi-line); }
.hi-steps li { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding-top: 10px; color: var(--hi-faint); font-size: 13px; }
.hi-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: var(--hi-line); transition: background-color .25s ease; }
.hi-steps li i { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border: 1px solid var(--hi-line); border-radius: 50%; font-style: normal; font-size: 12px; font-variant-numeric: tabular-nums; transition: all .25s ease; }
.hi-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-steps li.is-current { color: var(--hi-text); font-weight: 600; }
.hi-steps li.is-current::before, .hi-steps li.is-done::before { background: var(--hi-accent); }
.hi-steps li.is-current i { border-color: var(--hi-accent); background: var(--hi-accent); color: #fff; }
.hi-steps li.is-done { color: var(--hi-muted); }
.hi-steps li.is-done i { border-color: var(--hi-accent); color: var(--hi-accent); font-size: 0; }
.hi-steps li.is-done i::after { content: "✓"; font-size: 12px; font-weight: 700; }

.hi-body { flex: 1 1 auto; min-height: 0; padding: 20px 28px; overflow: auto; }
.hi-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; border-top: 1px solid var(--hi-line); background: var(--hi-card); }
.hi-foot-actions { display: flex; gap: 10px; margin-left: auto; }
.hi-foot-note { color: var(--hi-faint); font-size: 12px; line-height: 1.5; }
.hi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 96px; height: 38px; margin: 0; padding: 0 16px; border: 1px solid var(--hi-line); border-radius: 8px; background: var(--hi-card); color: var(--hi-text); font-size: 13px; font-weight: 500; font-family: inherit; line-height: 1; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.hi-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--hi-text) 28%, var(--hi-line)); background: var(--hi-surface); }
.hi-btn.is-primary { border-color: var(--hi-accent); background: var(--hi-accent); color: #fff; }
.hi-btn.is-primary:hover:not(:disabled) { border-color: var(--hi-accent); background: var(--hi-accent); filter: brightness(1.06); }
.hi-btn:disabled { opacity: .45; cursor: not-allowed; }
.hi-btn:focus-visible, .hi-close:focus-visible, .hi-link:focus-visible, .hi-segment button:focus-visible { outline: 2px solid var(--hi-accent); outline-offset: 2px; }
.hi-spin { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: hi-spin .8s linear infinite; }
@keyframes hi-spin { to { transform: rotate(360deg); } }
.hi-link { margin: 0; padding: 0; border: 0; background: none; color: var(--hi-muted); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.hi-link:hover { color: var(--hi-red); }

.hi-alert { margin: 0 0 14px; padding: 10px 14px; border: 1px solid; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.hi-alert.is-error { border-color: color-mix(in srgb, var(--hi-red) 35%, transparent); background: color-mix(in srgb, var(--hi-red) 8%, transparent); color: var(--hi-red); }
.hi-alert.is-warn { border-color: color-mix(in srgb, var(--hi-amber) 38%, transparent); background: color-mix(in srgb, var(--hi-amber) 9%, transparent); color: color-mix(in srgb, var(--hi-amber) 75%, var(--hi-text)); }
.hi-empty { padding: 28px 0; color: var(--hi-faint); text-align: center; font-size: 13px; }
.hi-note { margin: 14px 0 0; color: var(--hi-faint); font-size: 12px; line-height: 1.65; }

/* 第一步：视频号 */
.hi-search { position: relative; margin-bottom: 12px; }
.hi-search svg { position: absolute; top: 50%; left: 12px; width: 16px; height: 16px; color: var(--hi-faint); transform: translateY(-50%); pointer-events: none; }
.hi-search input { width: 100%; height: 40px; margin: 0; padding: 0 12px 0 36px; border: 1px solid var(--hi-line); border-radius: 8px; background: var(--hi-surface); color: var(--hi-text); font: inherit; outline: none; }
.hi-search input:focus { border-color: color-mix(in srgb, var(--hi-accent) 60%, var(--hi-line)); box-shadow: 0 0 0 3px var(--hi-soft); }
.hi-authors { display: grid; gap: 8px; }
.hi-author { display: flex; align-items: center; gap: 12px; min-height: 60px; margin: 0; padding: 10px 14px; border: 1px solid var(--hi-line); border-radius: 10px; background: var(--hi-card); cursor: pointer; transition: border-color .15s, background-color .15s; }
.hi-author:hover { border-color: color-mix(in srgb, var(--hi-text) 22%, var(--hi-line)); }
.hi-author.is-selected { border-color: var(--hi-accent); background: var(--hi-soft); }
.hi-author input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: var(--hi-accent); }
.hi-author-main { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.hi-author-main strong { overflow: hidden; color: var(--hi-text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hi-author-main small { overflow: hidden; color: var(--hi-faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.hi-author-side { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 4px; }
.hi-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--hi-line); border-radius: 999px; color: var(--hi-faint); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hi-chip.is-on { border-color: color-mix(in srgb, var(--hi-green) 35%, transparent); background: color-mix(in srgb, var(--hi-green) 9%, transparent); color: var(--hi-green); }

/* 第二步：上传 */
.hi-target { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--hi-muted); font-size: 13px; }
.hi-target strong { color: var(--hi-text); font-weight: 600; }
.hi-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 28px 20px; border: 1.5px dashed color-mix(in srgb, var(--hi-text) 20%, var(--hi-line)); border-radius: 12px; background: var(--hi-surface); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.hi-drop:hover, .hi-drop.is-over { border-color: var(--hi-accent); background: var(--hi-soft); }
.hi-drop svg { width: 30px; height: 30px; margin-bottom: 4px; color: var(--hi-accent); }
.hi-drop strong { color: var(--hi-text); font-size: 14px; font-weight: 600; }
.hi-drop small { color: var(--hi-faint); font-size: 12px; line-height: 1.6; }
.hi-files { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.hi-files li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 8px 6px 12px; border: 1px solid var(--hi-line); border-radius: 8px; font-size: 13px; }
.hi-files svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--hi-green); }
.hi-files span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-files small { color: var(--hi-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.hi-icon { width: 28px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--hi-faint); font-size: 18px; font-family: inherit; line-height: 1; cursor: pointer; }
.hi-icon:hover { background: var(--hi-surface); color: var(--hi-red); }
.hi-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; margin-top: 18px; }
.hi-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.hi-field > span { color: var(--hi-text); font-size: 13px; font-weight: 600; }
.hi-field > small { color: var(--hi-faint); font-size: 12px; line-height: 1.55; }
.hi-field input[type="date"] { width: 100%; height: 38px; margin: 0; padding: 0 12px; border: 1px solid var(--hi-line); border-radius: 8px; background: var(--hi-card); color: var(--hi-text); font: inherit; font-variant-numeric: tabular-nums; color-scheme: light dark; }
.hi-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border: 1px solid var(--hi-line); border-radius: 10px; background: var(--hi-surface); }
.hi-segment button { height: 30px; margin: 0; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; color: var(--hi-muted); font-size: 13px; font-weight: 500; font-family: inherit; line-height: 1; cursor: pointer; transition: background-color .15s, color .15s; }
.hi-segment button:hover { color: var(--hi-text); }
.hi-segment button[aria-checked="true"] { background: var(--hi-card); color: var(--hi-text); box-shadow: 0 1px 3px rgba(31, 26, 23, .12); }

/* 第三步：核对 */
.hi-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hi-metrics > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border: 1px solid var(--hi-line); border-radius: 12px; background: var(--hi-surface); }
.hi-metrics span { color: var(--hi-muted); font-size: 12px; }
.hi-metrics b { color: var(--hi-text); font-size: 24px; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hi-metrics small { overflow: hidden; color: var(--hi-faint); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hi-metrics .is-accent { border-color: color-mix(in srgb, var(--hi-accent) 45%, var(--hi-line)); background: var(--hi-soft); }
.hi-metrics .is-accent b { color: var(--hi-accent); }
.hi-metrics .is-alert b { color: var(--hi-amber); }
.hi-tzline { margin: 12px 0 14px; color: var(--hi-muted); font-size: 12.5px; line-height: 1.65; }
.hi-tzline strong { color: var(--hi-text); font-weight: 600; }
.hi-table-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 4px 0 8px; }
.hi-table-head strong { font-size: 13px; font-weight: 600; }
.hi-table-head small { color: var(--hi-faint); font-size: 12px; }
.hi-table-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--hi-line); border-radius: 10px; }
.hi-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.hi-table th { position: sticky; top: 0; z-index: 1; height: 36px; padding: 0 12px; border-bottom: 1px solid var(--hi-line); background: var(--hi-surface); color: var(--hi-muted); font-size: 12px; font-weight: 500; text-align: left; }
.hi-table th:first-child { width: auto; }
.hi-table th:nth-child(2) { width: 128px; }
.hi-table th:nth-child(n+3) { width: 76px; }
.hi-table td { height: 40px; padding: 0 12px; border-bottom: 1px solid color-mix(in srgb, var(--hi-line) 60%, transparent); color: var(--hi-text); }
.hi-table tr:last-child td { border-bottom: 0; }
.hi-table .hi-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hi-table .hi-time { color: var(--hi-faint); font-size: 12px; }
.hi-table td strong { font-weight: 600; }
.hi-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-new { color: var(--hi-accent); font-size: 12px; }
.hi-delta { color: var(--hi-faint); }
.hi-delta.is-up { color: var(--hi-green); font-weight: 600; }
.hi-delta.is-down { color: var(--hi-red); font-weight: 600; }

/* 完成 */
.hi-done { display: flex; flex-direction: column; align-items: center; padding: 18px 0 6px; text-align: center; }
.hi-done-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 50%; background: color-mix(in srgb, var(--hi-green) 12%, transparent); color: var(--hi-green); }
.hi-done-mark svg { width: 26px; height: 26px; stroke-width: 2.2; }
.hi-done h3 { margin: 0; font-family: "Noto Serif SC", "Songti SC", "STSong", serif; font-size: 19px; font-weight: 700; }
.hi-done > p { max-width: 520px; margin: 8px 0 0; color: var(--hi-muted); font-size: 13px; line-height: 1.7; }
.hi-done-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; width: min(480px, 100%); margin: 18px 0 0; padding: 6px 16px; border: 1px solid var(--hi-line); border-radius: 12px; text-align: left; }
.hi-done-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; }
.hi-done-list dt { color: var(--hi-muted); }
.hi-done-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .hi-wizard { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .hi-head { padding: 18px 18px 14px; }
  .hi-head h2 { font-size: 19px; }
  .hi-steps { padding: 0 18px 14px; }
  .hi-steps li { font-size: 12px; }
  .hi-body { padding: 16px 18px; }
  .hi-foot { padding: 12px 18px; }
  .hi-foot-note { display: none; }
  .hi-btn { min-width: 84px; }
  .hi-author { align-items: flex-start; }
  .hi-author-side { max-width: 46%; }
  .hi-chip { height: auto; min-height: 22px; padding: 2px 8px; white-space: normal; text-align: right; }
  .hi-fields { grid-template-columns: 1fr; }
  .hi-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hi-metrics b { font-size: 20px; }
  .hi-metrics small { white-space: normal; }
  .hi-table th:nth-child(2), .hi-table td:nth-child(2) { display: none; }
  .hi-table th:nth-child(n+3) { width: 58px; }
  .hi-table th, .hi-table td { padding: 0 8px; }
  .hi-done-list { grid-template-columns: 1fr; }
}
/* P1 第五步：@scope 不可用时的保底（基础布局 / 弹层默认隐藏 / 触控尺寸）。
   支持 @scope 的浏览器里这些只是冗余保险；不做正则式作用域改写，不碰 keyframes 与弹窗挂载。 */
.sph-native-host .sph-native-content .container { width: 100%; max-width: none; }
.sph-native-host .dialog-mask, .sph-native-host .qr-mask { position:fixed; z-index:100; inset:0; display:none; align-items:center; justify-content:center; padding:20px; }
@media (max-width: 760px) {
  .sph-native-host :is(button, .btn, select, input:not([type="checkbox"]):not([type="radio"])) { min-height: 44px; }
}

/* 258: selected count stays with the picker heading, above the video grid. */
.video-history-toolbar > .video-selection-heading { display:flex; flex-direction:column; gap:4px; min-width:0; }
.video-selection-heading > label { margin:0; }
.video-selection-heading > #selected-info { margin:0; font-size:12px; line-height:1.5; color:var(--muted); }

/* 259: video picker. Independent scroll viewport keeps the heading/count visible. */
.sph-native-host .video-picker { min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
.sph-native-host .video-picker .video-history-toolbar { position:relative; z-index:2; min-height:56px; margin:0; padding:10px 12px; border-bottom:1px solid var(--line); background:var(--card); gap:8px 12px; }
.sph-native-host .video-picker .video-selection-heading { display:flex; flex-direction:row; align-items:center; flex-wrap:wrap; gap:8px 12px; }
.sph-native-host .video-picker .video-selection-heading>label { margin:0; font-size:14px; font-weight:500; color:var(--text); }
.sph-native-host .video-picker #selected-info { display:inline-flex; align-items:center; margin:0; padding:4px 10px; border:1px solid color-mix(in srgb,var(--orange) 22%,var(--line)); border-radius:999px; background:var(--orange-soft); color:var(--orange); font-size:12px; font-weight:600; line-height:20px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.sph-native-host .video-picker #video-scroll { box-sizing:border-box; position:relative; width:100%; max-height:620px; overflow-y:auto; overflow-x:hidden; padding:12px 12px 0 42px; border:0; border-radius:0; overscroll-behavior-y:contain; scrollbar-gutter:stable; overflow-anchor:none; touch-action:pan-y; }
.sph-native-host .video-picker #video-list { display:grid; width:100%; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); align-items:stretch; gap:12px; }
.sph-native-host .video-picker #video-list .video-item { box-sizing:border-box; width:100%; min-width:0; grid-template-rows:24px auto 48px 30px; border:1px solid var(--line); border-radius:10px; box-shadow:none; background:var(--card); transform:none; transition:border-color .15s,background-color .15s; user-select:none; -webkit-user-select:none; }
.sph-native-host .video-picker #video-list .video-item:hover { border-color:var(--muted); box-shadow:none; transform:none; }
.sph-native-host .video-picker #video-list .video-item.selected { border-color:var(--orange); background:var(--card); box-shadow:none; transform:none; }
.sph-native-host .video-picker #video-list .video-item.selected::after { content:none; }
.sph-native-host .video-picker #video-list .video-cover { aspect-ratio:3/4; height:auto; min-height:0; }
.sph-native-host .video-picker #video-list .video-cover img { -webkit-user-drag:none; user-select:none; }
.sph-native-host .video-picker #video-list .video-title { height:48px; padding:6px 8px; font-size:12px; font-weight:500; line-height:18px; }
.sph-native-host .video-picker #video-list .video-meta { min-height:30px; padding:5px 8px; font-size:12px; line-height:18px; }
.sph-native-host .video-picker #video-list .video-meta .like { color:var(--amber); min-width:0; overflow:hidden; text-overflow:ellipsis; }
.sph-native-host .video-picker #video-list .product-tag { box-sizing:border-box; height:24px; padding:3px 6px; min-width:0; font-size:12px; line-height:18px; }
.sph-native-host .video-picker #video-list .product-tag span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sph-native-host .video-picker #video-list .video-product-icon,.sph-native-host .video-picker #video-list .video-like-icon { display:inline-block; width:14px; height:14px; flex:none; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; vertical-align:-2px; }
.sph-native-host .video-picker #video-list .video-meta .like { display:inline-flex; align-items:center; gap:4px; color:var(--muted); }
.sph-native-host .video-picker #video-list .video-history { font-size:12px; line-height:18px; }
.sph-native-host .video-picker #video-list .video-cover-placeholder { font-size:12px; }
.sph-native-host .video-picker #video-list .video-select-mark { box-sizing:border-box; top:7px; right:7px; width:22px; height:22px; border:1px solid var(--line); background:var(--card); color:transparent; opacity:1; transform:none; transition:background-color .15s,border-color .15s,color .15s; }
.sph-native-host .video-picker #video-list .video-item.selected .video-select-mark { border-color:var(--orange); background:var(--orange); color:var(--card); opacity:1; transform:none; }
.sph-native-host .video-picker #video-list .video-item[aria-disabled="true"]:not(.selected) .video-select-mark { opacity:.45; }
.sph-native-host .video-picker #video-row-controls { position:absolute; top:0; left:0; width:38px; height:0; z-index:2; }
.sph-native-host .video-picker .video-row-select { position:absolute; left:5px; display:grid; place-items:center; box-sizing:border-box; width:30px; height:32px; padding:0; border:0!important; border-radius:8px; color:var(--muted); background:transparent!important; box-shadow:none!important; cursor:pointer; }
.sph-native-host .video-picker .video-row-select:hover { background:var(--elevated)!important; }
.sph-native-host .video-picker .video-row-select::before { content:""; box-sizing:border-box; width:15px; height:15px; border:1px solid var(--muted); border-radius:4px; background:var(--card); }
.sph-native-host .video-picker .video-row-select[aria-checked="true"]::before,.sph-native-host .video-picker .video-row-select[aria-checked="mixed"]::before { border-color:var(--orange); background:var(--orange); }
.sph-native-host .video-picker .video-row-select[aria-checked="true"]::after { content:""; position:absolute; width:7px; height:4px; margin-top:-2px; border-left:1.5px solid var(--card); border-bottom:1.5px solid var(--card); transform:rotate(-45deg); }
.sph-native-host .video-picker .video-row-select[aria-checked="mixed"]::after { content:""; position:absolute; width:7px; height:1.5px; background:var(--card); }
.sph-native-host .video-picker .video-row-select:focus-visible { outline:2px solid var(--orange); outline-offset:-2px; }
.sph-native-host .video-picker .video-selection-box { position:absolute; z-index:4; pointer-events:none; box-sizing:border-box; border:1px solid var(--orange); border-radius:3px; background:color-mix(in srgb,var(--orange) 10%,transparent); }
.sph-native-host .video-picker #video-scroll.is-box-selecting { user-select:none; -webkit-user-select:none; cursor:crosshair; }
.sph-native-host .video-picker #video-page-footer { display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap; min-height:48px; padding:8px; color:var(--muted); font-size:12px; text-align:center; }
.sph-native-host .video-picker #video-page-footer:empty { min-height:0; padding:0; }
.sph-native-host .video-picker #video-page-footer .btn { min-height:32px; font-size:12px; }
.sph-native-host .video-picker #video-page-footer .batch-transcribe-progress-spinner { display:inline-block; flex:none; width:15px; height:15px; margin:0; border-width:2px; }
.sph-native-host .video-picker #video-page-footer [hidden] { display:none!important; }
.sph-native-host .video-picker #video-page-sentinel { height:1px; width:100%; pointer-events:none; }
.sph-native-host .video-picker .video-loading-skeleton { grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:12px; }
.sph-native-host .video-picker .video-skeleton-card { width:100%; padding-top:24px; }
.sph-native-host .video-picker .video-skeleton-cover { height:auto; aspect-ratio:3/4; }
@media(max-width:760px) {
 .sph-native-host .video-picker .video-history-toolbar { padding:10px 8px; }
 .sph-native-host .video-picker .video-history-controls { flex-wrap:wrap; max-width:100%; }
 .sph-native-host .video-picker .video-history-controls>.btn,.sph-native-host .video-picker .video-history-controls select { min-height:44px; height:44px; }
 .sph-native-host .video-picker #video-scroll { max-height:520px; padding:8px 8px 0 38px; }
 .sph-native-host .video-picker #video-list,.sph-native-host .video-picker .video-loading-skeleton { grid-template-columns:repeat(auto-fill,minmax(116px,1fr)); gap:8px; }
 .sph-native-host .video-picker .video-row-select { left:1px; width:36px; height:44px; }
 .sph-native-host .video-picker #video-page-footer .btn { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
 .sph-native-host .video-picker #video-list .video-item,.sph-native-host .video-picker #video-list .video-select-mark { transition:none; }
 .sph-native-host .video-picker .batch-transcribe-progress-spinner { animation:none; }
}

/* 1.0.2: row selection preserves table semantics and native checkboxes. */
.sph-native-host #orders-table tbody tr:has(input[data-pid]){cursor:pointer}
.sph-native-host #orders-table :is(th,td).sticky-left-1{box-sizing:border-box;width:44px!important;min-width:44px;padding:0!important;text-align:center}
.sph-native-host #orders-table .sticky-left-2{left:44px}
.sph-native-host #orders-table .plan-select-hitbox{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;cursor:pointer}
.sph-native-host #orders-table input[type="checkbox"]{width:16px;height:16px;margin:0;accent-color:var(--orange);cursor:pointer}
.sph-native-host #orders-table input[type="checkbox"]:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
.sph-native-host #orders-table tbody tr.is-plan-selected>td{background:color-mix(in srgb,var(--orange) 8%,var(--surface,var(--card)))!important}
@media(hover:hover){
 .sph-native-host #orders-table tbody tr:has(input[data-pid]):hover>td{background:color-mix(in srgb,var(--orange) 4%,var(--surface,var(--card)))!important}
 .sph-native-host #orders-table tbody tr.is-plan-selected:hover>td{background:color-mix(in srgb,var(--orange) 11%,var(--surface,var(--card)))!important}
}
@media(max-width:760px){
 .sph-native-host .plan-detail-card #orders-table td.plan-m-card{grid-template-columns:44px minmax(0,1fr)}
 .sph-native-host .plan-detail-card #orders-table .pmc-check{box-sizing:border-box;min-width:44px;min-height:44px;margin:0;padding-top:2px}
}

/* 1.0.3: hide the external filter trigger while the full-screen sheet is open.
   visibility preserves its layout slot and removes the hidden trigger from focus/hit testing. */
@media(max-width:760px){
 .sph-native-host .plan-filter-card.plan-filter-open>#mobile-filter-toggle{visibility:hidden!important;pointer-events:none!important}
}

/* Work/read status is scoped to the existing More control; healthy/minute sampling is not a banner. */
html body #sphNativeHost #monitor-engine-status[hidden],html body .sph-native-host .monitor-title-row:has(#monitor-engine-status[hidden]):not(:has(.sph-native-tabs)){display:none!important}
html body #sphNativeHost .monitor-title-row #monitor-engine-status{min-height:32px;height:auto;gap:8px;padding:5px 10px;border-radius:8px;cursor:pointer}
html body #sphNativeHost #monitor-engine-status::before{background:currentColor;box-shadow:none}
html body #sphNativeHost #monitor-engine-status #sync-state{display:block;font-size:13px;font-weight:500;line-height:1.4;white-space:nowrap}
html body #sphNativeHost #monitor-engine-status:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.sph-native-tabs>.sph-native-tab[data-sph-native-page="recovery"][hidden]{display:none!important}
.monitor-work-notice{position:fixed;z-index:88;box-sizing:border-box;display:grid;gap:3px;max-width:calc(100vw - 24px);padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--t1);box-shadow:var(--card-shadow);pointer-events:none;opacity:0;clip-path:inset(0 0 0 100% round 12px);transition:clip-path .2s ease,opacity .15s ease}
.monitor-work-notice.is-open{opacity:1;clip-path:inset(0 round 12px)}
.monitor-work-notice[hidden]{display:none!important}
.monitor-work-notice strong{font:500 13px/1.5 var(--font-cjk,system-ui,sans-serif);color:var(--orange)}
.monitor-work-notice span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--t2);font:400 12px/1.6 var(--font-cjk,system-ui,sans-serif);overflow-wrap:anywhere}
.monitor-status-dialog .monitor-status-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.monitor-status-dialog .monitor-status-head h2{margin:0}
html body .monitor-status-dialog [data-ms-x]{display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;padding:0!important;border:0!important;border-radius:8px;background:transparent!important;color:var(--t2)!important}
html body .monitor-status-dialog [data-ms-x]:hover{background:var(--elevated)!important}
.monitor-status-dialog [data-ms-x] svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.monitor-status-dialog .monitor-status-label{color:var(--ad-text);font-size:14px;line-height:1.6}
.monitor-status-dialog .monitor-status-times{margin:16px 0;padding:0;border-block:1px solid var(--ad-line)}
.monitor-status-dialog .monitor-status-times>div{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;align-items:baseline;padding:12px 0}
.monitor-status-dialog .monitor-status-times>div+div{border-top:1px solid var(--ad-line)}
.monitor-status-dialog dt{margin:0;color:var(--ad-muted);font-size:13px;line-height:1.6}
.monitor-status-dialog dd{margin:0;color:var(--ad-text);font-size:14px;font-variant-numeric:tabular-nums;line-height:1.6;overflow-wrap:anywhere}
.monitor-status-dialog p.monitor-status-note{color:var(--ad-muted);font-size:12px;line-height:1.6}
.monitor-status-dialog .monitor-status-progress{display:grid;gap:10px;padding:12px;margin:0 0 16px;border:1px solid var(--ad-line);border-radius:8px;background:var(--ad-surface);font-size:13px;line-height:1.6}
.monitor-status-dialog .monitor-status-progress>div{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.monitor-status-dialog .monitor-status-progress strong{font-weight:500;color:var(--ad-text)}
.monitor-status-dialog .monitor-status-progress span{color:var(--ad-muted)}
.monitor-status-dialog [hidden]{display:none!important}
.monitor-status-dialog[open]{animation:monitor-status-in .18s ease both}
@keyframes monitor-status-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){
 html body #sphNativeHost .monitor-title-row:has(#monitor-engine-status[hidden]):not(:has(.sph-native-tabs)){display:none!important}
 .monitor-status-dialog{padding:20px;width:calc(100vw - 24px)}
 .monitor-status-dialog .monitor-status-times>div{grid-template-columns:70px minmax(0,1fr);gap:8px}
 .monitor-status-dialog .sph-action-confirm-actions{flex-wrap:wrap;gap:8px}
}
@media(prefers-reduced-motion:reduce){.monitor-status-dialog[open]{animation:none}.monitor-work-notice{transition:none}}

/* 掉线提醒胶囊：没有需要提醒的投放号时整块隐藏，不占位、不常驻。 */
html body .sph-native-host .monitor-title-row:has(#monitor-engine-status[hidden]):has(#offline-reminder:not([hidden])){display:flex!important}
html body #sphNativeHost .offline-reminder-chip[hidden],html body .sph-native-host .offline-reminder-chip[hidden]{display:none!important}
.offline-reminder-chip{display:inline-flex;align-items:center;gap:7px;flex:0 1 auto;min-width:0;max-width:min(320px,100%);height:32px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--t1);font:500 13px var(--font-cjk,var(--font));white-space:nowrap;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}
.offline-reminder-chip:hover{border-color:color-mix(in srgb,var(--danger) 35%,var(--line));background:color-mix(in srgb,var(--danger) 5%,var(--card))}
.offline-reminder-chip:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.offline-reminder-chip .offline-reminder-dot{flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:var(--danger)}
.offline-reminder-chip [data-offline-label]{min-width:0;overflow:hidden;text-overflow:ellipsis}
@media (max-width:760px){.offline-reminder-chip{height:36px;max-width:100%}}
.offline-reminder-dialog .offline-reminder-list{display:grid;margin:14px 0 4px;padding:0;list-style:none;border-block:1px solid var(--ad-line,var(--line))}
.offline-reminder-dialog .offline-reminder-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:8px 0}
.offline-reminder-dialog .offline-reminder-list li+li{border-top:1px solid var(--ad-line,var(--line))}
.offline-reminder-dialog .offline-reminder-list strong{min-width:0;overflow:hidden;color:var(--ad-text,var(--t1));font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.offline-reminder-dialog .offline-reminder-list span{display:flex;flex:none;gap:8px}
@media (max-width:480px){.offline-reminder-dialog .offline-reminder-list li{flex-wrap:wrap}.offline-reminder-dialog .offline-reminder-list span{width:100%}.offline-reminder-dialog .offline-reminder-list span .btn{flex:1;min-height:44px}}

@media (max-width:760px){html body #sphNativeHost .offline-reminder-chip{font-size:13px!important}}

/* 创建队列胶囊：和掉线提醒并排在监控标题行；有进行中或待支付批次才出现。 */
html body #sphNativeHost .monitor-queue-chip[hidden],html body .sph-native-host .monitor-queue-chip[hidden]{display:none!important}
.monitor-queue-chip{display:inline-flex;align-items:center;gap:8px;flex:0 1 auto;min-width:0;max-width:min(340px,100%);height:32px;padding:0 12px 0 10px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--t1);font:500 13px var(--font-cjk,var(--font));white-space:nowrap;cursor:pointer;transition:border-color .15s ease,background-color .15s ease}
.monitor-queue-chip:hover,.monitor-queue-chip[aria-expanded="true"]{border-color:var(--line-strong,var(--line));background:var(--hover-bg)}
.monitor-queue-chip:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.monitor-queue-chip [data-mq-label]{min-width:0;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.monitor-queue-chip em{color:var(--orange);font-style:normal}
.monitor-queue-chip small{color:var(--t3);font-size:12px}
.monitor-queue-ring{position:relative;flex:0 0 14px;width:14px;height:14px;border-radius:50%;background:conic-gradient(var(--orange) var(--p,0%),var(--elevated) 0)}
.monitor-queue-ring::after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--card)}
.monitor-queue-pop{position:fixed;z-index:95;box-sizing:border-box;max-width:calc(100vw - 24px);border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--t1);box-shadow:var(--shadow-lg);font-family:var(--font-cjk,var(--font))}
.monitor-queue-pop[hidden]{display:none!important}
@media (prefers-reduced-motion:no-preference){.monitor-queue-pop:not([hidden]){animation:monitor-queue-pop .16s ease-out both}}
@keyframes monitor-queue-pop{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
.monitor-queue-head{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 10px 0 16px}
.monitor-queue-head strong{font:700 14px var(--font-serif,serif)}
.monitor-queue-head [data-mq-summary]{flex:1;min-width:0;overflow:hidden;color:var(--t3);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.monitor-queue-all,.monitor-queue-more{padding:6px;border:0;background:none;color:var(--t2);font-size:13px;cursor:pointer}
.monitor-queue-all:hover,.monitor-queue-more:hover{color:var(--orange)}
.monitor-queue-more{display:block;width:100%;padding:10px 16px;border-top:1px solid var(--sep,var(--line));text-align:left}
.monitor-queue-line{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(90px,1fr) 190px 84px;align-items:center;gap:12px;min-height:46px;padding:6px 12px 6px 16px;border-top:1px solid var(--sep,var(--line));font-size:13px}
.monitor-queue-name{min-width:0}
.monitor-queue-name strong{display:block;overflow:hidden;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.monitor-queue-name small{display:block;overflow:hidden;color:var(--t3);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.monitor-queue-bar{display:block;height:4px;border-radius:999px;background:var(--elevated);overflow:hidden}
.monitor-queue-bar i{display:block;height:100%;border-radius:inherit;background:var(--orange)}
.monitor-queue-bar.is-done i{background:var(--green)}
.monitor-queue-num{max-width:none;min-width:0;overflow:hidden;color:var(--t2);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}
.monitor-queue-tag{color:var(--t3);font-size:12px;white-space:nowrap}
.monitor-queue-dialog{width:min(820px,calc(100vw - 24px))!important;max-width:820px!important}
.monitor-queue-dialog .monitor-queue-dialog-tools{display:flex;align-items:center;gap:6px}
.monitor-queue-dialog .monitor-queue-full{max-height:min(62vh,640px);overflow:auto;margin-top:8px}
@media (max-width:760px){
  .monitor-queue-chip{height:36px;font-size:13px!important}
  .monitor-queue-pop{left:8px!important;right:8px;top:auto!important;bottom:8px;width:auto!important;max-height:70dvh;overflow:auto}
  .monitor-queue-line{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 12px}
  .monitor-queue-line>.monitor-queue-name{grid-column:1;grid-row:1}
  .monitor-queue-line>.monitor-queue-bar{grid-column:1;grid-row:2}
  .monitor-queue-line>.monitor-queue-num{grid-column:1;grid-row:3;max-width:none;font-size:12px}
  .monitor-queue-line>:last-child{grid-column:2;grid-row:1/4;align-self:center}
  .monitor-queue-line .btn{min-height:44px}
}@media (max-width:760px){html body #sphNativeHost .monitor-title-row:has(#offline-reminder:not([hidden])):has(#monitor-queue:not([hidden])) :is(#offline-reminder,#monitor-queue){max-width:calc(50% - 4px)}}
.monitor-queue-line>:last-child{justify-self:end}

/* 1.0.5 投放管理：分组、关停策略在上排，账号占满下排；「查看全部」为居中弹窗，内容是原页面完整界面。 */
.manage-page>.manage-page-intro{margin-bottom:22px!important}
.manage-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:stretch}
.manage-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--shadow-sm);scroll-margin-top:16px}
.manage-card-accounts{grid-column:1/-1}
.manage-card-head{display:flex;align-items:center;gap:10px;min-height:56px;padding:12px 16px 8px 18px}
.manage-card-head h2,.manage-full-head h2{margin:0;color:var(--t1);font:700 18px/1.3 var(--font-serif,serif)}
.manage-card-meta{min-width:0;overflow:hidden;color:var(--t3);font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.manage-card-actions{display:flex;flex:none;align-items:center;gap:6px;margin-left:auto}
.manage-card-loading,.manage-card-empty{margin:0;padding:18px;color:var(--t3);font-size:13px}
.manage-card-empty.is-error{color:var(--danger)}
.manage-card-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:0 18px;border-top:1px solid var(--sep,var(--line));color:var(--t3);font-size:12px}
.manage-card-all[hidden]{display:none!important}
.manage-card-all{padding:6px 0;border:0;background:none;color:var(--t2);font-size:13px;cursor:pointer}
.manage-card-all:hover{color:var(--orange)}
.manage-card-all:focus-visible{outline:2px solid var(--orange);outline-offset:2px;border-radius:4px}
.manage-row{display:flex;align-items:center;gap:12px;min-height:54px;padding:8px 12px 8px 18px;border-top:1px solid var(--sep,var(--line))}
.manage-row.is-link{cursor:pointer;transition:background-color .15s ease}
.manage-row.is-link:hover{background:var(--hover-bg)}
.manage-row.is-link:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}
.manage-row-name{flex:1;min-width:0}
.manage-row-name strong{display:block;overflow:hidden;color:var(--t1);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.manage-row-name small{display:block;overflow:hidden;color:var(--t3);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.manage-row-value{flex:none;color:var(--t2);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
.manage-card-accounts .manage-row-value{min-width:130px}
.manage-row-spacer{width:32px;flex:none}
.manage-avatar{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:50%;background:var(--elevated);color:var(--t2);font:600 13px var(--font-serif,serif)}
.manage-chip{display:inline-flex;flex:none;align-items:center;gap:6px;height:22px;padding:0 8px;border-radius:999px;background:var(--elevated);color:var(--t2);font-size:12px;white-space:nowrap}
.manage-chip i{width:6px;height:6px;border-radius:50%;background:currentColor}
.manage-chip.is-ok{background:var(--green-soft);color:var(--green)}
.manage-chip.is-bad{background:color-mix(in srgb,var(--danger) 10%,transparent);color:var(--danger)}
.manage-chip.is-accent{background:var(--orange-soft);color:var(--orange);font-variant-numeric:tabular-nums}
.manage-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));padding:2px 0 12px}
.manage-kpis>div{min-width:0;padding:0 18px}
.manage-kpis>div+div{border-left:1px solid var(--sep,var(--line))}
.manage-kpis span{display:block;color:var(--t3);font-size:12px}
.manage-kpis strong{display:block;overflow:hidden;color:var(--t1);font:600 19px/1.35 var(--font);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}
.manage-kpis strong.is-accent{color:var(--orange)}
.manage-switch{position:relative;flex:none;width:34px;height:20px;padding:0;border:0;border-radius:999px;background:var(--line-strong,#CFC9BC);cursor:pointer;transition:background-color .18s ease}
.manage-switch::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:transform .18s cubic-bezier(.2,.7,.3,1)}
.manage-switch.is-on{background:var(--orange)}
.manage-switch.is-on::after{transform:translateX(14px)}
.manage-switch:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.manage-icon-btn{width:32px;min-width:32px;padding:0!important}
.manage-icon-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
:is(html body #sphNativeHost,html body .sph-native-host) .btn.manage-login{border:1px solid color-mix(in srgb,var(--orange) 50%,var(--line))!important;background:transparent!important;color:var(--orange)!important}
:is(html body #sphNativeHost,html body .sph-native-host) .btn.manage-login:hover{background:var(--orange-soft)!important}
:is(.manage-more,.manage-row-more){position:relative;flex:none}
:is(.manage-more,.manage-row-more)>summary{display:grid;place-items:center;width:32px;min-width:32px;padding:0;list-style:none}
:is(.manage-more,.manage-row-more)>summary::-webkit-details-marker{display:none}
:is(.manage-more,.manage-row-more)>summary svg{width:16px;height:16px;fill:currentColor}
:is(.manage-more,.manage-row-more) .action-menu-pop{left:auto;right:0;z-index:45;width:170px}
.manage-row-more .action-menu-pop button.is-danger{color:var(--danger)}
.manage-row-more>summary{border-color:transparent!important;background:transparent!important}
/* 「查看全部」：遮罩淡入，弹窗不加位移变换（内部原页面的 fixed 浮层需要以视口为基准）。 */
.manage-full{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:24px;background:var(--overlay,rgba(20,19,17,.36))}
.manage-full[hidden]{display:none!important}
@media (prefers-reduced-motion:no-preference){.manage-full:not([hidden]){animation:manage-full-in .2s ease-out both}}
@keyframes manage-full-in{from{opacity:0}to{opacity:1}}
.manage-full-box{display:flex;flex-direction:column;width:min(1180px,100%);max-height:100%;overflow:hidden;border:1px solid var(--line);border-radius:16px;background:var(--bg);box-shadow:var(--shadow-lg)}
.manage-full-head{display:flex;flex:none;align-items:center;gap:10px;min-height:60px;padding:12px 16px 12px 22px;border-bottom:1px solid var(--line);background:var(--card)}
.manage-full-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.manage-full-close{width:32px;min-width:32px;padding:0!important}
.manage-full-body{flex:1;min-height:0;overflow:auto;padding:18px 20px 22px;overscroll-behavior:contain}
html.manage-full-open{overflow:hidden}
/* 弹窗里已有标题和操作：隐藏原页面自带的标题行、按钮行和贴边入口；去掉重复卡片外框。 */
.manage-sub-accounts .acc-head-actions,.manage-sub-accounts>.sph-side-tools,.manage-sub-rules .rules-card-head,.manage-sub-groups .group-page-head{display:none!important}
.manage-sub-accounts .acc-page-head{min-height:0!important;margin:0 0 10px!important;padding:0!important;border:0!important;background:none!important}
.manage-sub-groups .group-page-card{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.manage-sub :is(.card,.accounts-card,.group-page-card){margin:0!important}
.manage-sub-rules .btn.danger{background:transparent!important;border-color:var(--line)!important;color:var(--danger)!important;box-shadow:none!important}
@media (max-width:1100px){.manage-grid{grid-template-columns:1fr}.manage-card-accounts{grid-column:auto}}
@media (max-width:760px){
  .manage-grid{gap:14px}
  .manage-card-head{flex-wrap:wrap;padding:12px 12px 6px 14px}
  .manage-card-meta{order:3;flex:1 1 100%}
  .manage-row{flex-wrap:nowrap;gap:8px;min-height:58px;padding:8px 8px 8px 14px}
  .manage-row-name{flex:1 1 auto}
  .manage-row-value{display:none}
  html body #sphNativeHost .manage-card-all{font-size:13px!important}
  html body #sphNativeHost :is(.manage-more,.manage-row-more)>summary{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important}
  html body #sphNativeHost .manage-card-head .btn{min-height:40px}
  .manage-kpis{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:10px}
  .manage-kpis>div:nth-child(3){border-left:0}
  .manage-kpis>div{padding:0 14px}
  .manage-card-foot{padding:0 14px}
  .manage-full{padding:0;place-items:end stretch}
  .manage-full-box{width:100%;max-height:94dvh;border-radius:16px 16px 0 0}
  .manage-full-head{padding:10px 10px 10px 16px}
  .manage-full-body{padding:12px 12px 24px}
}
/* 手机全局按钮最小高度会把开关撑高：开关固定尺寸，外加透明触控区。 */
html body #sphNativeHost .manage-switch,html body .sph-native-host .manage-switch{width:34px!important;min-width:34px!important;height:20px!important;min-height:0!important;padding:0!important;border-radius:999px!important}
html body #sphNativeHost .manage-switch::before{content:"";position:absolute;inset:-12px -6px}
html body #sphNativeHost .manage-row .btn{white-space:nowrap}@media (max-width:760px){.manage-row-spacer{width:40px}}
/* 上排两张卡片等高：内容区撑开，底栏贴底，不在卡片之间留大块空白。 */
.manage-card-body{flex:1 1 auto}
.manage-card-foot{margin-top:auto}
.manage-card-accounts{align-self:start}
/* 「查看全部」弹窗与外面卡片同一套行样式。 */
.manage-origin[hidden]{display:none!important}
.manage-full-box{background:var(--card)!important}
.manage-full-tools{display:flex;flex:none;align-items:center;gap:12px;padding:12px 22px;border-bottom:1px solid var(--sep,var(--line))}
.manage-full-search{width:min(320px,100%);height:34px;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--input-bg,var(--card));color:var(--t1);font-size:13px}
.manage-full-search:focus{outline:none;border-color:color-mix(in srgb,var(--orange) 55%,var(--line))}
.manage-full-count{color:var(--t3);font-size:12px}
.manage-full-body{padding:0!important}
.manage-full-body>.manage-kpis{padding-top:14px}
.manage-full-body>.manage-row:first-child{border-top:0}
.manage-row.is-child{padding-left:58px;background:color-mix(in srgb,var(--elevated) 35%,transparent)}
.manage-avatar.is-small{width:24px;height:24px;font-size:12px}
@media (max-width:1100px){.manage-card-accounts{align-self:auto}}
@media (max-width:760px){
  .manage-full-tools{padding:10px 14px}
  .manage-full-search{width:100%}
  .manage-full-count{display:none}
  .manage-row.is-child{padding-left:30px}
}/* 列对齐：账号卡片用固定列网格（头像 / 名称 / 状态 / 余额 / 在线时长 / 操作 / 更多），子账号同列；分组、策略的数字列定宽右对齐。 */
@media (min-width:761px){
  .manage-card-accounts .manage-row{display:grid;grid-template-columns:30px minmax(0,1fr) 120px 160px 170px 80px 32px;column-gap:12px}
  .manage-card-accounts .manage-row>.manage-chip{justify-self:start}
  .manage-card-accounts .manage-row>.manage-row-value{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .manage-card-accounts .manage-row>.btn{justify-self:end}
  .manage-card-accounts .manage-row.is-child{grid-template-columns:30px minmax(0,1fr) 120px 160px 170px 80px 32px;padding-left:18px}
  .manage-card-accounts .manage-row.is-child>.manage-avatar{justify-self:end}
  .manage-card-groups .manage-row-value{min-width:76px;text-align:right}
  .manage-card-groups .manage-chip{min-width:66px;justify-content:center}
  .manage-card-rules .manage-row-value{min-width:150px;text-align:right}
}
/* 1.0.5 紧凑队列行：全部任务弹窗、创建计划页队列、旧队列页统一为一批一行（名称 / 4px 进度 / 数字 / 操作）。 */
html body .sph-native-host .batch-job.batch-job-row,html body .monitor-queue-dialog .batch-job.batch-job-row{margin:0!important;padding:10px 0!important;border:0!important;border-top:1px solid var(--sep,var(--line))!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
html body :is(.sph-native-host,.monitor-queue-dialog) .batch-job.batch-job-row:first-child{border-top:0!important}
.batch-job-list:has(>.batch-job-row){display:block!important;gap:0!important}
.batch-row-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(120px,1fr) 250px 150px;align-items:center;gap:14px;min-height:36px}
.batch-row-name{min-width:0}
.batch-row-name strong{display:block;overflow:hidden;color:var(--t1);font-size:14px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.batch-row-name small{display:block;overflow:hidden;color:var(--t3);font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.batch-row-bar{display:block;height:4px;border-radius:999px;background:var(--elevated);overflow:hidden}
.batch-row-bar i{display:block;height:100%;border-radius:inherit;background:var(--orange);transition:width .4s ease}
.batch-row-bar.is-done i{background:var(--green)}
.batch-row-num{max-width:none;min-width:0;overflow:hidden;color:var(--t2);font-size:13px;font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap}
.batch-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.batch-row-actions .btn{white-space:nowrap}
.batch-row-tag{color:var(--t3);font-size:12px;white-space:nowrap}
.batch-row-facts{margin-top:4px;color:var(--t3);font-size:12px;font-variant-numeric:tabular-nums}
.batch-row-facts .is-ok{color:var(--green);font-weight:600}
.batch-row-facts .is-bad{color:var(--danger);font-weight:600}
.batch-row-facts .is-hot{color:var(--orange)}
.batch-job-row .batch-job-error{margin-top:6px;color:var(--danger);font-size:12px}
.batch-job-row .batch-job-stop-state{margin-top:6px;color:var(--t2);font-size:12px}
.batch-job-row .batch-login{margin-top:10px!important;background:var(--amber-soft,rgba(200,135,26,.13))!important;color:var(--t1)}
.batch-row-results{margin-top:6px}
.batch-row-results>summary{display:inline-flex;align-items:center;gap:4px;color:var(--t2);font-size:12px;cursor:pointer;list-style:none}
.batch-row-results>summary::-webkit-details-marker{display:none}
.batch-row-results>summary::after{content:"›";display:inline-block;transition:transform .15s ease}
.batch-row-results[open]>summary::after{transform:rotate(90deg)}
.batch-row-results>summary:hover{color:var(--t1)}
.batch-row-results .batch-job-results{max-height:180px;margin-top:6px;padding:6px 10px;overflow:auto;border-radius:8px;background:var(--elevated)}
.monitor-queue-dialog .monitor-queue-full{padding:2px 16px;border:1px solid var(--line);border-radius:12px;background:var(--card)}
.monitor-queue-dialog .batch-queue-empty{padding:18px 0;color:var(--t3);font-size:13px}
@media (max-width:760px){
  .batch-row-main{grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}
  .batch-row-main>.batch-row-name{grid-column:1;grid-row:1}
  .batch-row-main>.batch-row-bar{grid-column:1;grid-row:2}
  .batch-row-main>.batch-row-num{grid-column:1;grid-row:3;max-width:none;font-size:12px}
  .batch-row-main>.batch-row-actions{grid-column:2;grid-row:1/4;flex-direction:column;align-items:stretch}
  .batch-row-actions .btn{min-height:40px}
}
@media (prefers-reduced-motion:reduce){.batch-row-bar i,.batch-row-results>summary::after{transition:none}}

/* 1.0.5 创建计划页美化：结构与字段不变，只收敛视觉。
   去掉卡片套卡片（外层容器透明，分区各自成卡）；分区标题改衬线 + 序号圆点，去掉橙色竖条；
   字段标签 13px 次要色；目标选项改为分段胶囊；卡赔付区、提交区、队列卡统一到发丝边与暖白卡片。 */
@media (min-width:761px){
  html body .sph-native-host .card.create-plan-card{counter-reset:create-step;margin:0 0 20px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  html body .sph-native-host .create-plan-heading{margin:0 0 18px!important}
  html body .sph-native-host .create-plan-heading h3{font:700 24px/1.3 var(--font-serif,serif)!important;color:var(--t1)}
  html body .sph-native-host .create-section{margin:0 0 16px!important;padding:20px 24px 22px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--card)!important;box-shadow:var(--shadow-sm)!important}
  html body .sph-native-host .create-section .row{gap:16px 20px!important}
  html body .sph-native-host .create-section .form-item{margin-bottom:14px}
}
html body .sph-native-host .create-section .section-title{display:flex!important;align-items:center;gap:10px;margin:0 0 16px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;color:var(--t1)!important;font:700 17px/1.4 var(--font-serif,serif)!important}
html body .sph-native-host .create-section .section-title::after{display:none!important}
/* 序号只在桌面显示；手机已有「选视频 / 预算目标 / 定向确认」三步进度，避免两套编号。 */
@media (min-width:761px){html body .sph-native-host .create-section .section-title::before{counter-increment:create-step;content:counter(create-step);display:inline-grid!important;place-items:center;flex:none;width:22px!important;height:22px!important;margin:0!important;border:0!important;border-radius:50%!important;background:var(--elevated)!important;color:var(--t2)!important;font:600 12px/1 var(--font)!important;position:static!important}}
@media (max-width:760px){html body .sph-native-host .create-section .section-title::before{display:none!important}}
html body .sph-native-host .create-section .form-item>label{color:var(--t2)!important;font-size:13px!important;font-weight:500!important;letter-spacing:0}
/* 优先提升目标：分段胶囊，选中为橙色细边 + 橙浅底；原生单选保留给键盘与读屏。 */
html body .sph-native-host .target-radio-group{display:flex!important;flex-wrap:wrap;gap:8px!important}
html body .sph-native-host .target-radio-group>label{position:relative;display:inline-flex!important;align-items:center;height:36px!important;min-height:36px!important;margin:0!important;padding:0 14px!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--card)!important;color:var(--t1)!important;font-size:13px!important;font-weight:500!important;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
html body .sph-native-host .target-radio-group>label:hover{border-color:var(--line-strong,var(--line))!important;background:var(--hover-bg)!important}
html body .sph-native-host .target-radio-group>label>input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;margin:0}
html body .sph-native-host .target-radio-group>label:has(input:checked){border-color:color-mix(in srgb,var(--orange) 55%,var(--line))!important;background:var(--orange-soft)!important;color:var(--orange)!important}
html body .sph-native-host .target-radio-group>label:has(input:focus-visible){outline:2px solid var(--orange);outline-offset:2px}
html body .sph-native-host .target-radio-group>label:has(input:disabled){opacity:.5;cursor:not-allowed}
/* 预算快捷金额：小胶囊。 */
html body .sph-native-host .quota-quick{height:40px!important;min-height:40px!important;padding:0 12px!important;border-radius:8px!important;font-variant-numeric:tabular-nums}
html body .sph-native-host .quota-quick.active{border-color:color-mix(in srgb,var(--orange) 55%,var(--line))!important;background:var(--orange-soft)!important;color:var(--orange)!important}
/* 视频选择区与卡赔付区：去灰底，改发丝边浅面板。 */
html body .sph-native-host .video-picker{border-color:var(--line)!important;border-radius:12px!important;background:var(--card)!important}
html body .sph-native-host .video-history-toolbar{border-bottom:1px solid var(--sep,var(--line))!important;background:transparent!important}
html body .sph-native-host .auto-stop-guard{border-color:var(--sep,var(--line))!important;background:color-mix(in srgb,var(--elevated) 45%,transparent)!important}
/* 提交区：与表单分开，按钮右对齐。 */
@media (min-width:761px){
  html body .sph-native-host .create-submit-area{margin-top:6px!important;padding-top:18px!important;border-top:1px solid var(--sep,var(--line))!important}
  html body .sph-native-host #btn-create{height:40px!important;min-width:140px;padding:0 22px!important;border-radius:8px!important;font-size:14px!important}
  html body .sph-native-host .card#batch-card{padding:20px 24px!important;border-radius:12px!important;box-shadow:var(--shadow-sm)!important}
}
html body .sph-native-host #batch-card .batch-heading h3{font:700 18px/1.4 var(--font-serif,serif)!important;color:var(--t1)}
html body .sph-native-host #batch-card .batch-heading small{color:var(--t3);font-size:12px}
@media (prefers-reduced-motion:reduce){html body .sph-native-host .target-radio-group>label{transition:none}}

/* ---------- 第二轮：网格对齐与控件统一（仅桌面布局；手机沿用原三步流程） ---------- */
@media (min-width:761px){
  /* 每行用网格，控件撑满列宽、底边对齐，不再长短不一。 */
  html body .sph-native-host .create-object-row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:grid!important;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);align-items:start;margin-bottom:6px!important}
  html body .sph-native-host .create-section-object>.form-item:has(#author-combobox){width:calc((100% - 40px) / 2);max-width:none;margin-top:4px}
  html body .sph-native-host #author-combobox{width:100%!important;max-width:none!important}
  html body .sph-native-host .author-combobox-control{display:flex;gap:8px}
  html body .sph-native-host .author-combobox-control>input{flex:1 1 auto;min-width:0}
  /* 基础信息：条数 + 名称前缀一行，优先提升目标独占一行。 */
  html body .sph-native-host .create-basic-row{grid-template-columns:260px minmax(0,1fr)!important;grid-template-areas:"count name" "target target";gap:18px 20px!important;align-items:start;justify-content:stretch!important}
  html body .sph-native-host .create-basic-row>.create-count-item{grid-area:count}
  html body .sph-native-host .create-basic-row>.create-name-item{grid-area:name;max-width:520px}
  html body .sph-native-host .create-basic-row>.create-target-item{grid-area:target}
  html body .sph-native-host .create-budget-row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end}
  html body .sph-native-host .create-section-other .row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]),html body .sph-native-host .create-section-targeting .row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
  html body .sph-native-host :is(.create-object-row,.create-basic-row,.create-budget-row,.create-section-other .row,.create-section-targeting .row) .form-item{min-width:0;margin-bottom:0}
  html body .sph-native-host :is(.create-object-row,.create-budget-row,.create-section-other .row,.create-section-targeting .row) :is(.ui-select,.ui-select-trigger,select,input:not([type=radio]):not([type=checkbox])){width:100%!important;min-width:0!important;max-width:none!important}
  html body .sph-native-host .create-section :is(.ui-select-trigger,input:not([type=radio]):not([type=checkbox]),select){height:40px!important;min-height:40px!important;border-radius:8px!important}
  html body .sph-native-host .create-budget-row .form-item:first-child>div,html body .sph-native-host .create-budget-row .form-item:first-child .quota-input-row{display:flex;gap:8px}
  html body .sph-native-host .create-budget-row .form-item:first-child input{flex:1 1 auto}
  html body .sph-native-host .create-section .row+.row{margin-top:16px}
}
/* 视频区：工具条去灰底；空状态横跨整行居中。 */
html body .sph-native-host .video-history-controls{gap:8px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
html body .sph-native-host .video-history-controls :is(.ui-select-trigger,.btn){height:36px!important;min-height:36px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--card)!important;box-shadow:none!important;font-size:13px!important}
html body .sph-native-host .video-selection-heading>label{color:var(--t1)!important;font-size:14px!important;font-weight:600!important}
html body .sph-native-host #video-verification-workspace p.muted{grid-column:1/-1;margin:0;padding:40px 0;color:var(--t3);font-size:13px;text-align:center}
/* 基础信息字段：条数用加减控件并加重；说明改为下方小字。 */
html body .sph-native-host .create-basic-row .form-item{grid-template-rows:auto auto auto!important;gap:6px}
html body .sph-native-host .create-basic-row .form-item>label{align-self:start!important}
html body .sph-native-host .create-count-item>label{color:var(--t1)!important;font-weight:600!important}
html body .sph-native-host .count-stepper{display:flex;align-items:stretch;height:40px;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:var(--input-bg,var(--card));transition:border-color .15s ease}
html body .sph-native-host .count-stepper:focus-within{border-color:color-mix(in srgb,var(--orange) 55%,var(--line))}
html body .sph-native-host .count-step{flex:0 0 40px;width:40px!important;min-width:40px!important;height:auto!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--t2)!important;font-size:16px!important;cursor:pointer}
html body .sph-native-host .count-step:hover{background:var(--hover-bg)!important;color:var(--t1)!important}
html body .sph-native-host .count-step:first-child{border-right:1px solid var(--sep,var(--line))!important}
html body .sph-native-host .count-step:last-child{border-left:1px solid var(--sep,var(--line))!important}
html body .sph-native-host .count-stepper #in-count{flex:1 1 0;width:0!important;min-width:0!important;height:auto!important;min-height:0!important;padding:0 2px 0 8px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:right;font-size:16px!important;font-weight:600;font-variant-numeric:tabular-nums;-moz-appearance:textfield}
html body .sph-native-host .count-stepper #in-count::-webkit-inner-spin-button,html body .sph-native-host .count-stepper #in-count::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
html body .sph-native-host .count-stepper #in-count:focus{outline:none}
html body .sph-native-host .count-unit{display:flex;flex:1 1 0;align-items:center;padding:0 8px 0 4px;color:var(--t3);font-size:13px}
html body .sph-native-host .create-basic-row .field-hint,html body .sph-native-host .create-basic-row .target-radio-hint{color:var(--t3);font-size:12px;line-height:1.5}

/* Quick naming only fills the existing order prefix. */
html body .sph-native-host .create-name-control{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:8px;min-width:0;width:100%;max-width:400px}
html body .sph-native-host .create-name-control>input{width:100%!important;min-width:0}
html body .sph-native-host .create-name-control>input,html body .sph-native-host .create-name-control>button{height:40px;min-height:40px;box-sizing:border-box}
html body .sph-native-host .create-name-control>button{display:inline-grid;place-items:center;width:40px;min-width:40px;padding:0;white-space:nowrap}
html body .sph-native-host .create-name-control>button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){html body .sph-native-host .create-name-control>button{width:44px;min-width:44px}}

html body .sph-native-host .create-name-item #in-name{width:100%!important}
@media (max-width:760px){html body .sph-native-host .count-step{flex-basis:48px;width:48px!important;min-width:48px!important}html body .sph-native-host .count-stepper{height:44px}}

/* ---------- 第三轮：吸底提交栏、预算控件、定向胶囊 ---------- */
/* 提交栏贴在表单底部：滚动时一直可见，左侧实时汇总（条数 / 视频数 / 单条预算 / 合计），右侧提交。 */
html body .sph-native-host .create-plan-card>.create-submit-area{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 16px;margin:4px 0 0!important;padding:12px 14px 12px 20px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--card)!important}
html body .sph-native-host .create-plan-card>.create-submit-area>#btn-create{grid-column:2;grid-row:1/span 3}
html body .sph-native-host .create-plan-card>.create-submit-area>:not(#btn-create){grid-column:1;margin:0!important}
html body .sph-native-host .create-submit-summary{display:flex;flex-wrap:wrap;gap:4px 18px;color:var(--t2);font-size:13px}
html body .sph-native-host .create-submit-summary:empty{display:none}
html body .sph-native-host .create-submit-summary b{color:var(--t1);font-weight:600;font-variant-numeric:tabular-nums}
html body .sph-native-host .create-submit-summary .is-total b{color:var(--orange);font-size:15px}
html body .sph-native-host .create-plan-card>.create-submit-area .create-submit-feedback{color:var(--t3);font-size:12px}
@media (min-width:761px){
  html body .sph-native-host .create-plan-card>.create-submit-area{position:sticky;bottom:14px;z-index:20;box-shadow:var(--shadow-lg)!important}
}
/* 手机三步流程：前两步不显示提交栏，第三步出现在表单末尾。 */
@media (max-width:760px){
  html body .sph-native-host .create-plan-card[data-mobile-step]:not([data-mobile-step="3"])>.create-submit-area{display:none!important}
  html body .sph-native-host .create-plan-card>.create-submit-area{margin:12px 0 84px!important;padding:12px 14px!important}
  html body .sph-native-host .create-submit-summary{display:grid;grid-template-columns:repeat(2,minmax(0,auto));gap:2px 14px}
}
/* 预算：快捷金额与自定义输入同一行，输入框撑满。 */
html body .sph-native-host .quota-control-group{display:flex!important;gap:8px;width:100%}
html body .sph-native-host .quota-control-group #in-quota{flex:1 1 auto;width:auto!important;min-width:80px!important;font-weight:600;font-variant-numeric:tabular-nums}
/* 年龄、地区勾选改为胶囊（原生勾选框保留给键盘与读屏）。 */
html body .sph-native-host .create-section .check-group{display:flex!important;flex-wrap:wrap;gap:8px!important}
html body .sph-native-host .create-section .check-group>label{position:relative;display:inline-flex!important;align-items:center;height:32px;margin:0!important;padding:0 12px!important;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--t1);font-size:13px;font-weight:400;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
html body .sph-native-host .create-section .check-group>label:hover{border-color:var(--line-strong,var(--line));background:var(--hover-bg)}
html body .sph-native-host .create-section .check-group>label>input{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;margin:0}
html body .sph-native-host .create-section .check-group>label:has(input:checked){border-color:color-mix(in srgb,var(--orange) 55%,var(--line));background:var(--orange-soft);color:var(--orange)}
html body .sph-native-host .create-section .check-group>label:has(input:focus-visible){outline:2px solid var(--orange);outline-offset:2px}
html body .sph-native-host #province-group{max-height:168px!important;padding:2px 2px 2px 0}
html body .sph-native-host #region-row .form-item>label a{text-decoration:none;font-weight:500}
@media (prefers-reduced-motion:reduce){html body .sph-native-host .create-section .check-group>label{transition:none}}/* 关停策略：选择框与上方字段同宽，卡赔付整行一条，读起来是一句完整的话。 */
@media (min-width:761px){
  html body .sph-native-host #create-rule-select{width:calc((100% - 40px) / 2)!important;max-width:none!important}
  html body .sph-native-host #create-rule-select .rule-multiselect-toggle{width:100%!important;height:40px;min-height:40px;border-radius:8px}
  html body .sph-native-host #auto-stop-guard{display:flex!important;width:100%;margin-top:12px!important;padding:10px 14px!important;border-radius:10px!important}
}
html body .sph-native-host #auto-stop-guard .guard-condition{color:var(--t2);font-size:13px}
html body .sph-native-host #auto-stop-guard>strong{color:var(--t1);font-size:14px}@media (min-width:761px){html body .sph-native-host #region-row>.form-item:first-child{grid-column:span 2}}
/* 预算与时间：字段按内容定宽、从左依次排列（不再三等分铺满整行），减少鼠标来回移动。 */
@media (min-width:761px){
  html body .sph-native-host .create-section-budget .create-budget-row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:flex!important;flex-wrap:wrap;align-items:flex-end;justify-content:flex-start;gap:16px!important}
  html body .sph-native-host .create-section-budget .create-budget-row>.form-item{flex:0 0 auto}
  html body .sph-native-host .create-section-budget .form-item:has(#in-quota){width:300px}
  html body .sph-native-host .create-section-budget .form-item:has(#sel-bid){width:320px}
  html body .sph-native-host .create-section-budget #bid-price-box{width:230px}
  html body .sph-native-host .create-section-budget #roi-bid-box{width:200px}
  html body .sph-native-host .create-section-budget .form-item:has(#sel-duration){width:150px}
  html body .sph-native-host .create-section-budget .form-item:has(#sel-schedule){width:210px}
  html body .sph-native-host .create-section-budget #schedule-box{width:230px}
  html body .sph-native-host .create-section-budget .form-item:has(#sel-currency){width:250px}
  html body .sph-native-host .create-section-budget .form-item:has(#sel-billing){width:330px}
  html body .sph-native-host .create-section-budget :is(#bid-price-box,#roi-bid-box)>label{color:var(--t1)!important;font-weight:600!important}
  html body .sph-native-host .create-section-budget :is(#in-bid,#in-roi-bid){font-weight:600;font-variant-numeric:tabular-nums}
}/* 余额已并入投放号下拉的已选项显示。 */
html body .sph-native-host #selected-account-meta{display:none!important}
/* 修正：自定义预算输入在 300px 格内自适应，不再挤出到相邻字段。 */
html body .sph-native-host .quota-control-group>.quota-quick{flex:0 0 auto}
html body .sph-native-host .create-section-budget .quota-control-group #in-quota{flex:1 1 0!important;width:0!important;min-width:0!important}
/* 卡赔付：收成按内容宽的一行（不再整行灰底长条），读作一句完整设置。 */
html body .sph-native-host #auto-stop-guard{display:inline-flex!important;width:auto!important;max-width:100%;flex-wrap:wrap;gap:10px 12px;margin-top:12px!important;padding:8px 14px 8px 12px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--card)!important;box-shadow:none!important}
html body .sph-native-host #auto-stop-guard .guard-condition{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px}
html body .sph-native-host #auto-stop-guard .guard-condition .ui-select{width:auto!important}
html body .sph-native-host #auto-stop-guard .guard-condition .ui-select-trigger{height:32px!important;min-height:32px!important;border-color:transparent!important;background:var(--elevated)!important}
html body .sph-native-host #auto-stop-guard .guard-stepper{height:32px}
html body .sph-native-host #auto-stop-guard:has(#auto-stop-guard-enabled:not(:checked)) .guard-condition{opacity:.5}
/* 返回：标题左侧同一行的方形图标按钮（悬停提示「返回计划监控」），不额外占一行。 */
@media (min-width:761px){
  html body .sph-native-host .create-plan-heading{flex-direction:row!important;align-items:center!important;gap:12px!important}
  html body .sph-native-host .create-page-return{display:grid!important;place-items:center;width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--card)!important;color:var(--t2)!important;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
  html body .sph-native-host .create-page-return>span{display:none}
  html body .sph-native-host .create-page-return svg{width:16px!important;height:16px!important}
  html body .sph-native-host .create-page-return:hover{border-color:var(--line-strong,var(--line))!important;background:var(--hover-bg)!important;color:var(--t1)!important}
}
/* 1.0.5 监控页批量操作条：中性浅底细边，左侧计数，右侧统一次按钮；关停用红字，不再红绿橙实心按钮并排。
   批量关停进度提示改为条下方一行轻提示。只调整桌面布局，手机沿用 monitor-mobile.css。 */
@media (min-width:761px){
  html body .sph-native-host #batch-bar.batch-bar{align-items:center;gap:8px;color:var(--t1);font-size:13px}
  html body .sph-native-host #batch-bar .n{margin:0 2px;color:var(--orange);font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
  html body .sph-native-host #batch-bar>#batch-close-button{margin-left:auto}
  html body .sph-native-host #batch-bar>.btn{height:32px!important;min-height:32px!important;padding:0 12px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--card)!important;color:var(--t1)!important;font-size:13px!important;font-weight:500!important;box-shadow:none!important}
  html body .sph-native-host #batch-bar>.btn:hover{border-color:var(--line-strong,var(--line))!important;background:var(--hover-bg)!important}
  html body .sph-native-host #batch-bar>#batch-close-button{border-color:color-mix(in srgb,var(--danger) 35%,var(--line))!important;color:var(--danger)!important}
  html body .sph-native-host #batch-bar>#batch-close-button:hover{background:color-mix(in srgb,var(--danger) 7%,var(--card))!important}
  html body .sph-native-host #batch-bar>.btn[onclick*="clearSel"]{border-color:transparent!important;background:transparent!important;color:var(--t2)!important}
  html body .sph-native-host #batch-bar>.btn[onclick*="clearSel"]:hover{color:var(--t1)!important;background:var(--hover-bg)!important}
  html body .sph-native-host #batch-bar>#batch-rule-button{border-color:var(--line)!important;background:var(--card)!important;color:var(--t1)!important;background-image:none!important}
  html body .sph-native-host #batch-bar>#batch-rule-button:hover{border-color:var(--line-strong,var(--line))!important;background:var(--hover-bg)!important}
  html body .sph-native-host #batch-close-status.stale-close-status:not([hidden]){display:flex!important;align-items:center;gap:8px;margin:-2px 0 10px!important;padding:0 2px 0 12px!important;border:0!important;border-left:2px solid var(--amber)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--t2)!important;font-size:12px!important;line-height:1.6}
}
/* 1.0.6 计划监控内容区（不含顶栏）：汇总改为一张卡内发丝线分隔的指标格，去掉彩色图标块；
   筛选栏与明细表同一张卡的上下两段；表头无底色、行内操作轻量细边。只调桌面，手机沿用 monitor-mobile.css。 */
@media (min-width:761px){
  html body #sphNativeHost .plan-overview-card{padding:0!important;border-radius:12px!important;background:var(--card)!important;box-shadow:var(--shadow-sm)!important;overflow:visible!important}
  html body #sphNativeHost .primary-metrics{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:0!important}
  html body #sphNativeHost .primary-metrics>.primary-metric{min-height:0!important;margin:0!important;padding:16px 22px 18px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  html body #sphNativeHost .primary-metrics>.primary-metric:not(:nth-child(3n+1)){box-shadow:inset 1px 0 0 var(--sep,var(--line))!important}
  html body #sphNativeHost .primary-metrics>.primary-metric:nth-child(n+4){border-top:1px solid var(--sep,var(--line))!important}
  html body #sphNativeHost .primary-metric .metric-icon{display:none!important}
  html body #sphNativeHost .primary-metric .metric-label{position:static!important;display:flex!important;align-items:center;gap:6px;margin:0 0 6px!important;padding:0!important;color:var(--t2)!important;font:500 13px/1.4 var(--font-cjk,var(--font))!important}
  html body #sphNativeHost .primary-metric>strong{display:block;margin:0!important;color:var(--t1)!important;font:600 26px/1.2 var(--font)!important;font-variant-numeric:tabular-nums;letter-spacing:0}
  html body #sphNativeHost .primary-metric .metric-help{width:16px;height:16px;font-size:11px}

  /* 展开提示：保持原来的轻量——右下角一个小折角箭头（弱色），展开后朝上；悬停时箭头变橙、整块极浅底，不加文字。 */
  html body #sphNativeHost #primary-metrics{position:relative;border-radius:12px;cursor:pointer;transition:background-color .15s ease}
  html body #sphNativeHost #primary-metrics[aria-expanded="true"]{border-radius:12px 12px 0 0}
  html body #sphNativeHost .primary-metric .metric-help{z-index:5}
  /* 指标卡紧贴顶栏，提示向上弹会被顶栏/滚动区盖住，改为向下弹出。 */
  html body #sphNativeHost .primary-metric .metric-help::after{top:calc(100% + 8px)!important;bottom:auto!important}
  html body #sphNativeHost #primary-metrics:hover{background:color-mix(in srgb,var(--t1) 2%,transparent)}
  html body #sphNativeHost #primary-metrics:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}
  html body #sphNativeHost #primary-metrics::before{display:none!important}
  html body #sphNativeHost #primary-metrics::after{content:""!important;position:absolute!important;left:auto!important;top:auto!important;right:14px!important;bottom:12px!important;width:6px!important;height:6px!important;padding:0!important;border:0!important;border-right:1.5px solid currentColor!important;border-bottom:1.5px solid currentColor!important;border-radius:0 0 1px 0!important;background:transparent!important;color:var(--t3)!important;transform:rotate(45deg)!important;transition:transform .2s ease,color .15s ease}
  html body #sphNativeHost #primary-metrics[aria-expanded="true"]::after{bottom:9px!important;transform:rotate(-135deg)!important}
  html body #sphNativeHost #primary-metrics:hover::after{color:var(--orange)!important}

  /* 展开后的次级指标：同一张卡，去掉一格一框，改为浅色网格分隔。 */
  html body #sphNativeHost #expand-body{margin:0!important;padding:0!important;border:0!important;border-top:0 solid var(--sep,var(--line))!important;border-radius:0 0 12px 12px!important;overflow:hidden;background:color-mix(in srgb,var(--elevated) 30%,transparent)!important;box-shadow:none!important}
  /* 展开动画：始终用网格占位，收起时行高 0fr，展开到 1fr，高度平滑过渡；内容同时淡入下移。收起后隐藏，读屏不读。 */
  html body #sphNativeHost #expand-body{display:grid!important;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows .26s cubic-bezier(.2,.7,.2,1),border-top-width 0s linear .26s,visibility 0s linear .26s}
  html body #sphNativeHost #expand-body.show{grid-template-rows:1fr;visibility:visible;border-top-width:1px!important;transition:grid-template-rows .26s cubic-bezier(.2,.7,.2,1)}
  html body #sphNativeHost #expand-body>#secondary-stats{min-height:0;overflow:hidden;opacity:0;transform:translateY(-4px);transition:opacity .18s ease,transform .26s cubic-bezier(.2,.7,.2,1)}
  html body #sphNativeHost #expand-body.show>#secondary-stats{opacity:1;transform:none;transition-delay:.06s}
  html body #sphNativeHost #secondary-stats{gap:0!important;padding:0!important;margin:0!important}
  html body #sphNativeHost #secondary-stats>.secondary-stat{margin:0!important;padding:12px 22px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:inset 1px 0 0 var(--sep,var(--line)),inset 0 -1px 0 var(--sep,var(--line))!important}
  html body #sphNativeHost #secondary-stats>.secondary-stat:nth-child(6n+1){box-shadow:inset 0 -1px 0 var(--sep,var(--line))!important}
  html body #sphNativeHost #secondary-stats>.secondary-stat span{display:block;color:var(--t3);font-size:12px}
  html body #sphNativeHost #secondary-stats>.secondary-stat strong{display:block;margin-top:2px;color:var(--t1);font:600 16px/1.35 var(--font);font-variant-numeric:tabular-nums}

  /* 筛选栏：与明细表同底色；所有下拉（含被投作者）与右侧「一键关停/导出」同一套细边按钮，不再用灰块；悬停/展开边线加深、浅底；清空为文字按钮。 */
  html body #sphNativeHost .plan-filter-card{padding:8px 18px!important;border-bottom:0!important;border-radius:12px 12px 0 0!important;background:var(--card)!important;box-shadow:none!important}
  /* 方案 B：「计划明细 · 条数」靠左，搜索、筛选和图标（高级筛选 / 清空）整组靠右；下拉为细框，悬停/展开边框加深。 */
  html body #sphNativeHost .plan-filter-card .plan-filter-strip{display:flex!important;align-items:center;flex-wrap:wrap;gap:4px!important}
  html body #sphNativeHost .plan-filter-strip>.plan-title-block{display:flex;align-items:baseline;gap:8px;margin:0 auto 0 2px}
  html body #sphNativeHost .plan-filter-strip>.plan-title-block h3{margin:0;color:var(--t1);font:700 17px/1.3 var(--font-serif,var(--font-cjk,var(--font)));white-space:nowrap}
  html body #sphNativeHost .plan-filter-strip>.plan-title-block .orders-summary-count{padding:0!important;border:0!important;background:transparent!important;color:var(--t3)!important;font-size:13px!important;white-space:nowrap}
  html body #sphNativeHost .plan-filter-strip>.plan-title-block .orders-summary-count b{margin-right:2px;color:var(--t2);font-weight:600;font-variant-numeric:tabular-nums}
  html body #sphNativeHost .plan-filter-strip>.plan-title-block .orders-summary-count i{font-style:normal}
  html body #sphNativeHost .plan-filter-card :is(.ui-select-trigger,.author-filter-trigger){width:auto!important;min-width:0!important;height:30px!important;min-height:30px!important;padding:0 8px 0 10px!important;border:1px solid var(--line)!important;border-radius:8px!important;background:var(--card)!important;box-shadow:none!important;color:var(--t1)!important;font-size:13px!important;font-weight:500!important;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
  html body #sphNativeHost .plan-filter-card :is(.ui-select,.author-filter-combobox){width:auto!important;min-width:0!important;flex:none!important}
  html body #sphNativeHost .plan-filter-card :is(.ui-select-trigger,.author-filter-trigger):hover,html body #sphNativeHost .plan-filter-card :is(.ui-select-trigger,.author-filter-trigger)[aria-expanded="true"]{border-color:var(--line-strong,var(--t3))!important;background:var(--card)!important;color:var(--t1)!important}
  html body #sphNativeHost .plan-filter-card .plan-filter-actions{display:flex;align-items:center;gap:2px;width:auto!important;min-width:0!important;margin:0!important;justify-content:flex-start!important}
  html body #sphNativeHost .plan-filter-card #apply-filter-button{display:none!important}
  html body #sphNativeHost .plan-filter-card .advanced-filter-anchor{margin:0 0 0 4px!important;padding-left:8px;border-left:1px solid var(--sep,var(--line))}
  html body #sphNativeHost .plan-filter-card .plan-filter-strip{min-height:36px}
  html body #sphNativeHost .plan-filter-card :is(.ui-select,.author-filter-combobox,.advanced-filter-anchor,.plan-filter-actions){height:30px!important;min-height:30px!important;display:flex;align-items:center}
  html body #sphNativeHost .plan-filter-card #clear-filter-button{width:32px!important;min-width:32px!important;padding:0!important;font-size:0!important;color:var(--t2)!important}
  html body #sphNativeHost .plan-filter-card #clear-filter-button::before{content:"";display:block;width:16px;height:16px;margin:auto;background:currentColor;-webkit-mask:var(--plan-clear-icon) center/16px no-repeat;mask:var(--plan-clear-icon) center/16px no-repeat}
  html body #sphNativeHost .plan-filter-card{--plan-clear-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 21-4.3-4.3a2.4 2.4 0 0 1 0-3.4l9.6-9.6a2.4 2.4 0 0 1 3.4 0l5.6 5.6a2.4 2.4 0 0 1 0 3.4L13 21'/%3E%3Cpath d='M22 21H7'/%3E%3Cpath d='m5 11 9 9'/%3E%3C/svg%3E")}
  html body #sphNativeHost .plan-filter-card .plan-filter-icon{width:32px!important;min-width:32px!important;height:32px!important;padding:0!important;color:var(--t2)!important}
  /* 原标题行整行收起（标题已并入筛选行；一键关停在顶栏「⋮」；导出在桌面隐藏）。 */
  html body #sphNativeHost .plan-detail-card>.plan-table-head{display:none!important}
  html body #sphNativeHost section.plan-detail-card{position:relative;padding-top:0!important}
  html body #sphNativeHost .deep-sync-menu .action-menu-pop>button.mobile-menu-only[onclick*="openQuickClosePicker"]{display:flex!important}
  /* 自定义列：收进顶栏「⋮」菜单；列设置面板挂在「⋮」旁，从按钮下方向左展开，不随表格上方的批量条移动。 */
  html body #sphNativeHost .plan-column-anchored{position:static!important;width:0;height:0;margin:0!important}
  html body #sphNativeHost .plan-column-anchored>summary{display:none!important}
  html body #sphNativeHost .plan-column-anchored>#column-menu-body{position:fixed!important;z-index:80!important;top:var(--plan-column-top,80px)!important;right:var(--plan-column-right,24px)!important;left:auto!important;box-shadow:0 12px 32px rgba(31,30,27,.14)!important}
  html body #sphNativeHost .deep-sync-menu .action-menu-pop>.plan-column-menu-item{display:flex}
  html body #sphNativeHost .plan-filter-card :is(.ui-select-chevron,.author-filter-trigger svg){color:var(--t3)}
  html body #sphNativeHost .plan-filter-card .btn.ghost{border-color:transparent!important;background:transparent!important;color:var(--t2)!important}
  html body #sphNativeHost .plan-filter-card .btn.ghost:hover{background:var(--hover-bg)!important;color:var(--t1)!important}
  html body #sphNativeHost .plan-filter-card :is(button,.btn){height:34px!important;min-height:34px!important}

  /* 明细卡：标题行右侧统一次按钮；表头不用灰底，只留下方一条分隔线；行间发丝分隔、悬停浅底。 */
  html body #sphNativeHost .plan-detail-card{padding:16px 18px 18px!important;border-top:1px solid var(--sep,var(--line))!important;border-radius:0 0 12px 12px!important;background:var(--card)!important;box-shadow:var(--shadow-sm)!important}
  /* 标题行：条数不再装进小框，跟在标题后面做弱色计数；右侧三个操作改为无框文字按钮，悬停浅底——避免和下拉、表格边框叠成一排排盒子。 */
  html body #sphNativeHost .plan-table-head{margin:0 0 12px!important;padding:0!important}
  html body #sphNativeHost .plan-table-head>div:first-child{display:flex;align-items:baseline;gap:10px}
  html body #sphNativeHost .plan-table-head .orders-summary-count{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:var(--t3)!important;font-size:13px!important}
  html body #sphNativeHost .plan-table-head .orders-summary-count b{color:var(--t2);font-weight:600;font-variant-numeric:tabular-nums;margin-right:2px}
  html body #sphNativeHost .plan-table-head .orders-summary-count i{font-style:normal}
  html body #sphNativeHost .plan-table-head .order-actions{gap:2px!important}
  html body #sphNativeHost .plan-detail-card .plan-table-head .btn.sm{height:32px!important;min-height:32px!important;padding:0 10px!important;border:1px solid transparent!important;background:transparent!important;box-shadow:none!important;color:var(--t2)!important;font-size:13px!important;font-weight:500!important}
  html body #sphNativeHost .plan-detail-card .plan-table-head .btn.sm:hover,html body #sphNativeHost .plan-detail-card .plan-table-head details[open]>.btn.sm{background:var(--hover-bg,var(--elevated))!important;color:var(--t1)!important}
  /* 表格贴满卡片：去掉表格自己的一圈边框（卡片里再套一个框），表头底色通栏，首尾列与标题对齐。 */
  html body #sphNativeHost .plan-detail-card{padding-bottom:0!important}
  html body #sphNativeHost .plan-detail-card .table-scroll{width:auto!important;max-width:none!important;margin:0 -18px!important;border:0!important;border-radius:0!important}
  html body #sphNativeHost #orders-table thead th{border-top:1px solid var(--sep,var(--line))!important}
  html body #sphNativeHost #orders-table :is(th,td):first-child{padding-left:18px!important}
  html body #sphNativeHost #orders-table :is(th,td):last-child{padding-right:18px!important}
  html body #sphNativeHost #orders-table tbody tr:last-child td{border-bottom:0!important}
  html body #sphNativeHost #orders-table{border-collapse:separate;border-spacing:0}
  /* 表头：比原来的灰块浅一半的暖底，加深字色与下边线，和数据行拉开层次又不显得重。 */
  html body #sphNativeHost #orders-table thead th{height:40px!important;padding-top:0!important;padding-bottom:0!important;background:color-mix(in srgb,var(--elevated) 45%,var(--card))!important;color:var(--t2)!important;font-size:12px!important;font-weight:600!important;border-bottom:1px solid var(--line)!important;border-radius:0!important}
  html body #sphNativeHost #orders-table thead .plan-select-hitbox{height:38px!important;min-height:38px!important}
  html body #sphNativeHost #orders-table thead th.sorted-asc,html body #sphNativeHost #orders-table thead th.sorted-desc{color:var(--t1)!important}
  html body #sphNativeHost #orders-table tbody td{height:52px;background:var(--card)!important;color:var(--t1);border-top:0!important;border-bottom:1px solid var(--sep,var(--line))!important}
  html body #sphNativeHost #orders-table tbody tr:hover td{background:color-mix(in srgb,var(--t1) 3%,var(--card))!important}
  html body #sphNativeHost #orders-table tbody tr:has(input:checked) td{background:color-mix(in srgb,var(--orange) 6%,var(--card))!important}

  /* 计划名即详情入口：名称做成可点击样式，去掉每行重复的「查看详情」按钮；关停红字、续投中性细边。 */
  html body #sphNativeHost #orders-table .plan-action.plan-action-detail{display:none!important}
  html body #sphNativeHost #orders-table .plan-detail-link{cursor:pointer}
  html body #sphNativeHost #orders-table .plan-detail-link strong{transition:color .15s ease}
  html body #sphNativeHost #orders-table .plan-detail-link:hover strong{color:var(--orange);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
  html body #sphNativeHost #orders-table .op-links{gap:6px}
  /* 「查看详情」已并入计划名，操作列只剩「关停 / 续投」两个按钮：列宽从 188 收到刚好放下两个按钮。 */
  html body #sphNativeHost #orders-table :is(th,td).sticky-right{width:124px!important;min-width:124px!important;max-width:124px!important}
  /* 计划列限宽 168：名称与 ID 超出省略，悬停整格显示完整名称（原有 title）。 */
  html body #sphNativeHost #orders-table :is(th,td)[data-column="plan"]{width:168px!important;min-width:168px!important;max-width:168px!important}
  html body #sphNativeHost #orders-table td[data-column="plan"] .plan-detail-link{display:block;max-width:100%}
  html body #sphNativeHost #orders-table td[data-column="plan"] :is(strong,small){display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  /* 列头一律居中；数据格同样居中对齐列头，只有计划列（长文本）保持左对齐。 */
  html body #sphNativeHost #orders-table thead th{text-align:center!important}
  html body #sphNativeHost #orders-table tbody td:not([data-column="plan"]){text-align:center!important}
  html body #sphNativeHost #orders-table tbody td .op-links{justify-content:center!important}
  html body #sphNativeHost #orders-table .plan-action{height:28px!important;min-height:28px!important;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:7px!important;background:var(--card)!important;color:var(--t1)!important;font-size:12px!important;font-weight:500!important;box-shadow:none!important}
  html body #sphNativeHost #orders-table .plan-action:hover{border-color:var(--line-strong,var(--line))!important;background:var(--hover-bg)!important}
  html body #sphNativeHost #orders-table .plan-action.danger{border-color:color-mix(in srgb,var(--danger) 28%,var(--line))!important;color:var(--danger)!important}
}
@media (min-width:1280px){
  html body #sphNativeHost .primary-metrics{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  html body #sphNativeHost .primary-metrics>.primary-metric:nth-child(n+4){border-top:0!important}
  html body #sphNativeHost .primary-metrics>.primary-metric:not(:first-child){box-shadow:inset 1px 0 0 var(--sep,var(--line))!important}
  html body #sphNativeHost .primary-metric>strong{font-size:24px!important}
}
@media (prefers-reduced-motion:reduce){html body #sphNativeHost #primary-metrics,html body #sphNativeHost #primary-metrics::after,html body #sphNativeHost #orders-table .plan-detail-link strong,html body #sphNativeHost #expand-body,html body #sphNativeHost #expand-body>#secondary-stats{transition:none!important}}
@media (max-width:760px){html body #sphNativeHost .deep-sync-menu .action-menu-pop>.plan-column-menu-item{display:none!important}}

/* 1.0.6 离开创建页：返回按钮下方的小气泡，替代整屏遮罩弹窗（仅桌面）。 */
html body #sphNativeHost .create-plan-heading{position:relative}
html body #sphNativeHost .create-leave-pop{position:absolute;z-index:40;top:calc(100% + 10px);left:0;width:288px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:0 10px 28px rgba(31,30,27,.12),0 2px 6px rgba(31,30,27,.06);transform-origin:20px 0;animation:create-leave-pop-in .16s cubic-bezier(.2,.7,.2,1)}
html body #sphNativeHost .create-leave-pop::before{content:"";position:absolute;top:-6px;left:18px;width:10px;height:10px;border-left:1px solid var(--line);border-top:1px solid var(--line);background:var(--card);transform:rotate(45deg)}
html body #sphNativeHost .create-leave-pop.is-leaving{opacity:0;transform:scale(.98);transition:opacity .12s ease,transform .12s ease}
html body #sphNativeHost .create-leave-pop p{margin:0;color:var(--t2);font-size:13px;line-height:1.6}
html body #sphNativeHost .create-leave-pop p b{display:block;margin-bottom:2px;color:var(--t1);font-size:14px;font-weight:600}
html body #sphNativeHost .create-leave-pop-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:10px}
html body #sphNativeHost .create-leave-pop-actions .btn{height:30px!important;min-height:30px!important;padding:0 12px!important;font-size:13px!important}
html body #sphNativeHost .create-leave-pop-actions .btn.is-danger{border-color:transparent!important;background:transparent!important;color:var(--danger)!important}
html body #sphNativeHost .create-leave-pop-actions .btn.is-danger:hover{background:color-mix(in srgb,var(--danger) 8%,transparent)!important}
@keyframes create-leave-pop-in{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){html body #sphNativeHost .create-leave-pop{animation:none}html body #sphNativeHost .create-leave-pop.is-leaving{transition:none}}

/* 1.0.12: compact creation controls; the video canvas keeps its full width. */
html body .sph-native-host .create-author-row{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;gap:14px 16px;margin:0 0 14px}
html body .sph-native-host .create-author-row>.create-author-item{flex:0 1 380px;width:380px;max-width:100%;min-width:0;margin:0}
html body .sph-native-host .create-author-row>.create-object-kind{flex:0 0 150px;width:150px;max-width:100%;min-width:0;margin:0;display:grid;grid-template-rows:auto 40px;gap:0}
html body .sph-native-host .create-author-row :is(select,.ui-select,.ui-select-trigger,#author-combobox){width:100%!important;min-width:0!important;max-width:100%!important}
html body .sph-native-host .create-author-row .author-combobox-control{display:flex;gap:8px}
html body .sph-native-host .create-author-row #author-search{flex:1 1 auto;width:0;min-width:0}
html body .sph-native-host .create-count-item .count-stepper{width:100%;max-width:300px;box-sizing:border-box}
html body .sph-native-host .create-count-item .count-stepper .count-step{flex:0 0 38px;width:38px!important;min-width:38px!important;border:0!important;border-radius:0!important}
html body .sph-native-host .create-count-item .count-stepper .count-step-ten{flex-basis:44px;width:44px!important;min-width:44px!important;font-size:12px!important;font-variant-numeric:tabular-nums}
html body .sph-native-host .create-count-item .count-stepper #in-count{flex:1 1 auto;width:0!important;min-width:60px!important;padding:0 6px!important;text-align:center!important;border-inline:1px solid var(--line)!important}
html body .sph-native-host .create-count-item .count-stepper .count-step{display:grid;place-items:center;line-height:1!important}
html body .sph-native-host #auto-stop-guard .guard-stepper{box-sizing:border-box;height:32px;grid-template-columns:34px 58px 34px;grid-template-rows:minmax(0,1fr);align-items:stretch}
html body .sph-native-host #auto-stop-guard .guard-stepper>button{display:grid;place-items:center;box-sizing:border-box;width:34px!important;min-width:0!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;line-height:1!important;border:0!important;border-radius:0!important}
html body .sph-native-host #auto-stop-guard .guard-stepper>button svg{display:block;width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
html body .sph-native-host #auto-stop-guard .guard-stepper>input{box-sizing:border-box;align-self:stretch;width:58px!important;min-width:0!important;height:100%!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;border-inline:1px solid var(--line)!important;border-radius:0!important;text-align:center!important;font:500 14px/normal var(--font)!important;font-variant-numeric:tabular-nums;appearance:textfield}
html body .sph-native-host #auto-stop-guard .guard-stepper>input::-webkit-inner-spin-button,html body .sph-native-host #auto-stop-guard .guard-stepper>input::-webkit-outer-spin-button{appearance:none;margin:0}
html body .sph-native-host .video-history-toolbar .video-history-controls{align-items:center}
html body .sph-native-host .video-history-toolbar .video-history-controls :is(.ui-select,select){height:36px!important;min-height:36px!important}
html body .sph-native-host .video-history-toolbar .video-history-controls :is(.ui-select-trigger,#video-history-import,#video-history-retry){box-sizing:border-box;height:36px!important;min-height:36px!important;padding-block:0!important;border-radius:8px!important;font-size:13px!important;display:inline-flex!important;align-items:center!important}
html body .sph-native-host .create-submit-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px!important}
html body .sph-native-host .create-submit-summary>.create-summary-item{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;box-sizing:border-box;min-width:112px;min-height:58px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;background:var(--elevated,var(--card));white-space:nowrap}
html body .sph-native-host .create-submit-summary .create-summary-label{font-size:12px;line-height:1.2;color:var(--t2)}
html body .sph-native-host .create-submit-summary .create-summary-item>b{display:flex;align-items:baseline;gap:5px;font-size:18px!important;font-weight:600;line-height:1.15;font-variant-numeric:tabular-nums;color:var(--t1)}
html body .sph-native-host .create-submit-summary b>small{font-size:12px;font-weight:400;color:var(--t2)}
html body .sph-native-host .create-submit-summary>.is-total{border-color:color-mix(in srgb,var(--orange) 22%,var(--line));background:color-mix(in srgb,var(--orange) 6%,var(--card))}
html body .sph-native-host .create-submit-summary>.is-total>b{color:var(--orange)}
@media(min-width:761px){
 html body .sph-native-host .create-object-row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:block!important;width:min(440px,100%);max-width:440px;margin-bottom:14px!important}
 html body .sph-native-host .create-object-row>.create-account-item{width:100%;max-width:440px;min-width:0;margin:0}
 html body .sph-native-host .create-basic-row{grid-template-columns:300px minmax(0,400px)!important;justify-content:start!important}
 html body .sph-native-host .create-basic-row>.create-name-item{max-width:400px}
 html body .sph-native-host .create-plan-card .create-section-targeting>.row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]),html body .sph-native-host .create-plan-card .create-section-other>.row:not([hidden]):not([style*="display:none"]):not([style*="display: none"]){display:flex!important;flex-wrap:wrap;justify-content:flex-start!important;gap:16px!important}
 html body .sph-native-host .create-section-targeting>.row>.form-item,html body .sph-native-host .create-section-other>.row>.form-item{flex:0 1 280px;width:280px;max-width:100%}
 html body .sph-native-host .create-section-targeting>.row:first-of-type{align-items:flex-start}
 html body .sph-native-host .create-section-targeting .form-item:has(#sel-plan){flex:0 0 260px;width:260px}
 html body .sph-native-host .create-section-targeting #gender-box{flex:0 0 170px;width:170px}
 html body .sph-native-host .create-section-targeting #age-box{flex:0 1 440px;width:440px}
 html body .sph-native-host .create-section-targeting #age-group{display:flex;flex-wrap:wrap;gap:8px;max-height:none}
 html body .sph-native-host .create-section-targeting #relax-box{flex:0 0 300px;width:300px}
 html body .sph-native-host .create-section-targeting #region-row{max-width:1040px}
 html body .sph-native-host .create-section-targeting #region-row>.form-item{flex:1 1 100%!important;width:100%;max-width:100%}
 html body .sph-native-host .create-section-targeting #province-group{max-height:none!important;overflow:visible!important;display:flex;flex-wrap:wrap;gap:8px}
 html body .sph-native-host .create-section-other>.row>.create-voucher-item{flex-basis:360px;width:360px}
 html body .sph-native-host #create-rule-select{width:min(560px,100%)!important;max-width:560px!important}
 html body .sph-native-host .create-section-budget .form-item:has(#in-quota){width:320px}
 html body .sph-native-host .create-section-budget .form-item:has(#sel-bid){width:300px}
 html body .sph-native-host .create-section-budget #bid-price-box{width:230px}
 html body .sph-native-host .create-section-budget #roi-bid-box{width:180px}
 html body .sph-native-host .create-section-budget .form-item:has(#sel-currency){width:240px}
 html body .sph-native-host .create-section-budget .form-item:has(#sel-billing){width:310px}
}
@media(max-width:760px){
 html body .sph-native-host .create-author-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 8px}
 html body .sph-native-host .create-author-row>.create-author-item{grid-column:1/-1;width:100%}
 html body .sph-native-host .create-author-row>.create-object-kind{width:100%;min-width:0;grid-template-rows:auto 42px}
 html body .sph-native-host .create-count-item .count-stepper{max-width:320px;height:44px}
 html body .sph-native-host .create-count-item .count-stepper .count-step{flex-basis:42px;width:42px!important;min-width:42px!important}
 html body .sph-native-host .create-count-item .count-stepper .count-step-ten{flex-basis:44px;width:44px!important;min-width:44px!important}
 html body .sph-native-host .video-history-toolbar .video-history-controls :is(.ui-select,.ui-select-trigger,select,#video-history-import,#video-history-retry){height:40px!important;min-height:40px!important}
 html body .sph-native-host .create-submit-summary{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body .sph-native-host .create-submit-summary>.create-summary-item{min-width:0;padding:8px 10px}
 html body .sph-native-host .create-submit-summary .create-summary-item>b{font-size:16px!important}
 html body .sph-native-host .create-plan-card>.create-submit-area{grid-template-columns:minmax(0,1fr)}
 html body .sph-native-host .create-plan-card>.create-submit-area>#btn-create{grid-column:1;grid-row:auto;width:100%}
}


/* 1.0.13: one-line summary chips; validation remains on the submit button. */
html body .sph-native-host #create-submit-feedback{display:none!important}
html body .sph-native-host .create-plan-card>.create-submit-area{padding:10px 14px!important;gap:0 16px!important}
html body .sph-native-host .create-plan-card>.create-submit-area>#btn-create{grid-row:1;align-self:center}
html body .sph-native-host .create-submit-summary>.create-summary-item{flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;min-width:0;min-height:36px;padding:6px 12px}
html body .sph-native-host .create-submit-summary .create-summary-item>b{font-size:16px!important;line-height:1.2}
@media(max-width:760px){
 html body .sph-native-host .create-plan-card>.create-submit-area{gap:10px!important}
 html body .sph-native-host .create-plan-card>.create-submit-area>#btn-create{grid-row:auto}
 html body .sph-native-host .create-submit-summary>.create-summary-item{padding:6px 8px;gap:6px;flex-wrap:wrap}
 html body .sph-native-host .create-submit-summary .create-summary-item>b{font-size:14px!important}
}

/* 1.0.14: give desktop monitoring pagination breathing room inside its card. */
@media(min-width:761px){html body #sphNativeHost .plan-detail-card{padding-bottom:16px!important}}

/* Per-material authors, same existing type scale and neutral palette. */
html body .sph-native-host .video-author-name{font-size:11px;line-height:16px;color:var(--t2);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:4px 7px 0}
html body .sph-native-host .mixed-material-author{font-size:12px;line-height:18px;color:var(--t2);margin:7px 0 3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body #detail-body .video-card{grid-template-rows:auto auto auto auto;grid-template-areas:"img author" "img vd" "img metrics" "img tip";height:auto!important;min-height:138px}
html body #detail-body .video-card .mixed-material-author{grid-area:author;margin:0 0 4px;min-width:0}
html body #detail-body .video-card.has-order .mixed-material-author{padding-right:88px}
html body #detail-body .video-card.has-order .vd{padding-right:0}

/* Human-readable audit records. Scoped to the operation-log drawer only. */
#logs-side-panel{display:flex;flex-direction:column;overflow:hidden}
#logs-side-panel .sph-side-panel-head{position:static;flex:none;margin-bottom:0;background:var(--bg)}
#logs-side-panel #logs{display:flex;flex:1;min-height:0;flex-direction:column}
.audit-log-toolbar{flex:none;display:grid;gap:12px;padding:16px 0 12px;border-bottom:1px solid var(--line)}
.audit-log-categories{display:flex;flex-wrap:wrap;gap:6px}
#logs-side-panel .audit-category{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:3px 9px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--muted);font:inherit;font-size:13px;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
#logs-side-panel .audit-category span{font-size:12px;font-variant-numeric:tabular-nums}
#logs-side-panel .audit-category:hover,#logs-side-panel #audit-log-problems:hover{background:var(--surface)}
#logs-side-panel .audit-category[aria-pressed=true],#logs-side-panel #audit-log-problems[aria-pressed=true]{border-color:var(--orange);color:var(--orange);background:color-mix(in srgb,var(--orange) 8%,var(--card))}
.audit-log-controls{display:flex;align-items:center;gap:8px}
#logs-side-panel #audit-log-search{flex:1;min-width:0;height:38px;border:1px solid var(--line);border-radius:8px;padding:0 10px;background:var(--card);color:var(--text);font:inherit;font-size:13px}
#logs-side-panel #audit-log-problems{flex:none;height:38px;white-space:nowrap}
.audit-log-count{margin:0;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
#audit-log-entries{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.audit-record{border-bottom:1px solid var(--line)}
.audit-record>summary{display:grid;grid-template-columns:68px minmax(0,1fr) auto 12px;align-items:start;gap:12px;padding:13px 2px;list-style:none;cursor:pointer;border-radius:6px}
.audit-record>summary::-webkit-details-marker{display:none}
.audit-record>summary:hover{background:color-mix(in srgb,var(--orange) 4%,transparent)}
.audit-record time{padding-top:2px;color:var(--muted);font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.audit-record-main{display:grid;min-width:0;gap:4px}
.audit-record-main strong{font-size:14px;line-height:1.5;font-weight:500;color:var(--text)}
.audit-record-meta{color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.audit-repeat{font-size:12px;color:var(--muted)}
.audit-result{padding:2px 8px;border-radius:999px;background:var(--surface);font-size:12px;line-height:20px;white-space:nowrap;color:var(--muted)}
.audit-result.is-ok{background:color-mix(in srgb,var(--green,#1a9e54) 10%,var(--card));color:var(--green,#1a9e54)}
.audit-result.is-warn{background:color-mix(in srgb,var(--orange) 9%,var(--card));color:var(--orange)}
.audit-result.is-error{background:color-mix(in srgb,var(--danger,#d64550) 9%,var(--card));color:var(--danger,#d64550)}
.audit-chevron{color:var(--muted);transition:transform .15s}
.audit-record[open] .audit-chevron{transform:rotate(180deg)}
.audit-record-detail{margin:0 0 12px 80px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--card);font-size:12px;line-height:1.6;color:var(--text)}
.audit-record-detail dl{margin:0;display:grid;gap:7px}.audit-record-detail dl>div{display:grid;grid-template-columns:64px minmax(0,1fr);gap:8px}.audit-record-detail dt{color:var(--muted)}.audit-record-detail dd{margin:0;overflow-wrap:anywhere}.audit-record-detail code{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.audit-update-times{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}.audit-update-times>span{color:var(--muted)}.audit-update-times p{margin:4px 0 0;font-variant-numeric:tabular-nums}
.audit-empty{padding:30px 12px;text-align:center;color:var(--muted);font-size:13px}
#logs-side-panel :is(button,input,summary):focus-visible{outline:2px solid var(--orange);outline-offset:2px}
@media(max-width:760px){#logs-side-panel{width:100vw;max-width:100vw}.audit-log-toolbar{padding-top:12px}.audit-record>summary{grid-template-columns:60px minmax(0,1fr) auto 10px;gap:8px}.audit-record-detail{margin-left:0}.audit-record-main strong{font-size:14px}.audit-log-categories{gap:6px}}
@media(prefers-reduced-motion:reduce){#logs-side-panel .audit-category,.audit-chevron{transition:none}}

.audit-day{position:sticky;top:0;z-index:1;margin:0;padding:12px 2px 6px;background:var(--bg);color:var(--muted);font-family:var(--font-cjk,sans-serif);font-weight:400;font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}

@media(max-width:760px){#view-sph-monitor:has(#logs-side-panel.show) .monitor-create-button,body:has(>#logs-side-panel.show) .monitor-create-button{display:none!important}}


/* Desktop selection: full-width colour band, without a frame or added divider. */
@media (min-width:761px) {
  .plan-detail-card #batch-bar {
    margin:0 calc(0px - var(--batch-inset-right,0px)) 0 calc(0px - var(--batch-inset-left,0px));
    padding:10px var(--batch-inset-right,18px) 10px var(--batch-inset-left,18px);
    width:calc(100% + var(--batch-inset-left,0px) + var(--batch-inset-right,0px));
    min-height:0;
    border:0;
    border-radius:0;
    background:color-mix(in srgb,var(--orange) 4%,var(--card,var(--surface)));
    box-shadow:none;
    flex-wrap:wrap;
    row-gap:8px;
  }
  .plan-detail-card #batch-bar.is-batch-animating {overflow:hidden;}
}

/* Skeleton cards share the actual video card structure and resolved grid tracks. */
 .sph-native-host #video-list .video-loading-skeleton{grid-template-columns:inherit;gap:inherit;align-items:stretch}
 .sph-native-host #video-list .video-loading-skeleton .video-skeleton-card{padding:0;margin:0;width:100%;pointer-events:none;cursor:default}
 .sph-native-host #video-list .video-skeleton-line, .sph-native-host #video-list .video-skeleton-fill{position:relative;overflow:hidden;background:color-mix(in srgb,var(--muted) 10%,var(--elevated));border-radius:4px}
 .sph-native-host #video-list .video-skeleton-line{display:inline-block;width:72%;height:8px;vertical-align:middle}
 .sph-native-host #video-list .video-skeleton-short{width:36%}
 .sph-native-host #video-list .video-skeleton-card .video-cover>.video-skeleton-fill{position:absolute;inset:0;border-radius:0}
 .sph-native-host #video-list .video-skeleton-line::after, .sph-native-host #video-list .video-skeleton-fill::after{position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,color-mix(in srgb,var(--surface) 72%,transparent),transparent);animation:video-skeleton-shimmer 1.25s infinite;content:""}
@media(prefers-reduced-motion:reduce){ .sph-native-host #video-list .video-skeleton-line::after, .sph-native-host #video-list .video-skeleton-fill::after{animation:none}}

/* These controls travel with the create fragment so an older open shell stays usable. */
html body .create-plan-card .create-name-control{display:grid;grid-template-columns:minmax(0,1fr) 40px;align-items:stretch;gap:8px;width:100%;max-width:400px;min-width:0}
html body .create-plan-card .create-name-control>input{width:100%!important;min-width:0;box-sizing:border-box}
html body .create-plan-card .create-name-control>.quick-name-button{display:inline-grid;place-items:center;box-sizing:border-box;width:40px;min-width:40px;height:40px;min-height:40px;margin:0;padding:0}
html body .create-plan-card .quick-name-button>svg{display:block;flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html body .create-plan-card .create-basic-row>.form-item{grid-template-rows:auto auto auto!important;gap:6px;min-width:0}
html body .create-plan-card .create-basic-row>.form-item>label{align-self:start!important}
html body .create-plan-card .create-count-item .count-stepper{width:224px;max-width:100%;height:40px;box-sizing:border-box}
html body .create-plan-card .create-count-item .count-stepper>.count-step{display:grid;place-items:center;flex:0 0 36px;width:36px!important;min-width:36px!important;padding:0!important;font-size:18px!important;line-height:1!important}
html body .create-plan-card .create-count-item .count-stepper>.count-step-ten{flex-basis:28px;width:28px!important;min-width:28px!important;font-size:11px!important;font-weight:400}
html body .create-plan-card .create-count-item .count-stepper>#in-count{flex:1 1 0;width:0!important;min-width:64px!important;padding:0 6px!important;text-align:center!important;font-size:16px!important;font-weight:600;font-variant-numeric:tabular-nums}
@media(min-width:761px){
 html body .create-plan-card .create-basic-row{grid-template-columns:224px minmax(0,400px)!important;grid-template-areas:"count name" "target target";align-items:start;justify-content:start!important;gap:18px 20px!important}
 html body .create-plan-card .create-basic-row>.create-count-item{grid-area:count}
 html body .create-plan-card .create-basic-row>.create-name-item{grid-area:name}
 html body .create-plan-card .create-basic-row>.create-target-item{grid-area:target}
}
@media(max-width:760px){
 html body .create-plan-card .create-name-control{grid-template-columns:minmax(0,1fr) 44px}
 html body .create-plan-card .create-name-control>.quick-name-button{width:44px;min-width:44px;height:44px;min-height:44px}
 html body .create-plan-card .create-count-item .count-stepper{width:256px;height:44px}
 html body .create-plan-card .create-count-item .count-stepper>.count-step{flex-basis:44px;width:44px!important;min-width:44px!important}
 html body .create-plan-card .create-count-item .count-stepper>.count-step-ten{font-size:11px!important}
}

/* 1.0.31: keep stop and account payment alongside the same queue entry. */
.monitor-queue-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;white-space:nowrap}
@media(min-width:761px){.monitor-queue-line{grid-template-columns:minmax(0,1.2fr) minmax(50px,.7fr) minmax(0,1fr) auto}}
@media(max-width:760px){.monitor-queue-actions{flex-direction:column;align-items:stretch}}

/* 1.0.32: animate More and keep its hint/threshold inside the popup. */
.deep-sync-menu>.action-menu-pop{box-sizing:border-box;max-width:calc(100vw - 24px);overflow-x:hidden;transform-origin:top right}
.deep-sync-menu[open]>.action-menu-pop{animation:workbench-popover-enter .18s cubic-bezier(.2,.7,.3,1) both}
.deep-sync-menu .action-menu-pop>button{box-sizing:border-box;min-width:0;max-width:100%}
.deep-sync-menu .action-menu-threshold{display:grid;grid-template-columns:minmax(0,86px) max-content;align-items:center;gap:6px;min-width:0;max-width:100%}
.deep-sync-menu .action-menu-threshold input{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
.deep-sync-menu .action-menu-threshold button{box-sizing:border-box;width:auto;min-width:0;max-width:100%}
.deep-sync-menu .action-menu-help{position:static}
.deep-sync-menu .action-menu-help::after{left:0;right:0;width:auto;max-width:none;box-sizing:border-box}
@media(prefers-reduced-motion:reduce){.deep-sync-menu[open]>.action-menu-pop{animation:none}}

/* Drawer close buttons share the usual button interaction states. */
.sph-side-panel .btn.sph-side-panel-close{flex:0 0 36px;width:36px;height:36px;min-width:36px;min-height:36px;padding:0}
.sph-side-panel-close svg{flex:0 0 20px;width:20px;height:20px}
@media(max-width:760px){.sph-side-panel .btn.sph-side-panel-close{flex-basis:44px;width:44px;height:44px;min-width:44px;min-height:44px}}

/* Compact account login dialog; interaction states remain shared. */
#qr-dialog.dialog-mask { padding:16px; }
#qr-dialog .qr-login-dialog { box-sizing:border-box; width:min(400px,calc(100vw - 32px)); padding:22px; }
#qr-dialog .qr-login-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#qr-dialog .qr-login-dialog h3 { margin:0; font-size:18px; }
#qr-dialog .qr-login-image { display:flex; justify-content:center; padding-top:18px; }
#qr-dialog #qr-img { box-sizing:border-box; width:200px; height:200px; max-width:100%; margin:0; }
#qr-dialog #qr-status { margin:14px 0 0; text-align:center; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
#qr-dialog .qr-login-actions { display:flex; align-items:center; flex:0 0 auto; gap:8px; }
#qr-dialog .qr-login-actions .btn { display:grid; place-items:center; flex:0 0 36px; width:36px; min-width:36px; height:36px; min-height:36px; padding:0; }
#qr-dialog .qr-login-actions svg { width:18px; height:18px; flex:none; }
@media (max-width:760px) {
  #qr-dialog.dialog-mask.show { align-items:center!important; padding:12px!important; }
  #qr-dialog.dialog-mask.show > .qr-login-dialog { width:min(400px,calc(100vw - 24px))!important; max-height:calc(100dvh - 24px)!important; padding:16px!important; border-radius:16px!important; }
  #qr-dialog .qr-login-actions .btn { flex-basis:44px; width:44px; min-width:44px; height:44px; min-height:44px; }
}

/* 1.0.38 layout only: round count steps, count presets, author switch choice, selected-author chips. States stay in interaction.css. */
html body .create-plan-card .create-count-item .count-dial{display:flex;align-items:center;gap:6px;width:100%;max-width:100%;height:40px;box-sizing:border-box}
html body .create-plan-card .create-count-item .count-dial>.count-round{display:grid;place-items:center;flex:0 0 36px;box-sizing:border-box;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;margin:0;padding:0!important;border:1px solid var(--line)!important;border-radius:50%!important;background:var(--card);color:var(--t1);font-size:18px!important;line-height:1!important}
html body .create-plan-card .create-count-item .count-dial>.count-round-ten{flex-basis:44px;width:44px!important;min-width:44px!important;height:30px!important;min-height:30px!important;border-radius:999px!important;color:var(--t2);font-size:12px!important;font-variant-numeric:tabular-nums}
html body .create-plan-card .create-count-item .count-dial>#in-count{flex:1 1 0;box-sizing:border-box;width:0!important;min-width:56px!important;height:40px!important;min-height:40px!important;padding:0 4px!important;text-align:center!important;font-size:16px!important;font-weight:600;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield}
html body .create-plan-card .create-count-item .count-dial>#in-count::-webkit-inner-spin-button,html body .create-plan-card .create-count-item .count-dial>#in-count::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
html body .create-plan-card .create-count-item .count-presets{display:flex;align-items:center;gap:6px;margin-top:8px;min-width:0}
html body .create-plan-card .create-count-item .count-presets-label{flex:none;color:var(--t2);font-size:12px}
html body .create-plan-card .create-count-item .count-preset{flex:0 0 auto;box-sizing:border-box;min-width:40px!important;height:26px!important;min-height:26px!important;margin:0;padding:0 10px!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--card);color:var(--t1);font-size:12px!important;line-height:1!important;font-variant-numeric:tabular-nums}
@media(min-width:761px){
 html body .create-plan-card .create-basic-row{grid-template-columns:248px minmax(0,400px)!important}
}
@media(max-width:760px){
 html body .create-plan-card .create-count-item .count-dial{max-width:300px;height:44px}
 html body .create-plan-card .create-count-item .count-dial>.count-round{flex-basis:44px;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
 html body .create-plan-card .create-count-item .count-dial>.count-round-ten{flex-basis:52px;width:52px!important;min-width:52px!important}
 html body .create-plan-card .create-count-item .count-dial>#in-count{height:44px!important;min-height:44px!important}
 html body .create-plan-card .create-count-item .count-preset{height:36px!important;min-height:36px!important;min-width:48px!important}
}
html body #author-switch-offer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;box-sizing:border-box;margin:0 0 10px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--orange,#EF4A1F) 26%,var(--line));border-radius:10px;background:color-mix(in srgb,var(--orange,#EF4A1F) 6%,var(--card));color:var(--t1);font-size:13px;line-height:1.5}
html body #author-switch-offer[hidden]{display:none!important}
html body #author-switch-offer .author-switch-text{flex:1 1 320px;min-width:0}
html body #author-switch-offer .author-switch-actions{display:flex;flex:none;gap:8px}
html body #author-switch-offer .author-switch-actions>.btn{box-sizing:border-box;height:32px!important;min-height:32px!important;margin:0;padding:0 14px!important;font-size:13px!important;white-space:nowrap}
html body #selected-authors{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
html body #selected-authors[hidden]{display:none!important}
html body #selected-authors .selected-author-chip{display:inline-flex;align-items:center;gap:4px;box-sizing:border-box;max-width:220px;height:26px;padding:0 2px 0 10px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--t1);font-size:12px;line-height:1}
html body #selected-authors .selected-author-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #selected-authors .selected-author-chip>b{flex:none;color:var(--orange);font-weight:600;font-variant-numeric:tabular-nums}
html body #selected-authors .selected-author-remove{display:grid;place-items:center;flex:none;box-sizing:border-box;width:22px!important;min-width:22px!important;height:22px!important;min-height:22px!important;margin:0;padding:0!important;border:0!important;border-radius:50%!important;background:transparent;color:var(--t2)}
html body #selected-authors .selected-author-remove>svg{display:block;width:12px;height:12px;fill:none;stroke:currentColor}
@media(max-width:760px){
 html body #author-switch-offer .author-switch-actions{width:100%}
 html body #author-switch-offer .author-switch-actions>.btn{flex:1 1 0;height:44px!important;min-height:44px!important}
 html body #selected-authors .selected-author-chip{height:32px}
 html body #selected-authors .selected-author-remove{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important}
}
