:root {
  --bg: #f0f2f5;
  --card: #fff;
  --line: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --primary: #1a73e8;
  --accent: #188038;
  --err: #d93025;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; background: var(--bg); color: var(--text); }
.top { background: var(--card); border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.top h1 { margin: 0; font-size: 1.2rem; }
.badge { font-size: .7rem; background: #e8f0fe; color: var(--primary); padding: .2rem .5rem; border-radius: 4px; }
.sub { margin: .3rem 0 0; font-size: .78rem; color: var(--muted); }
.api-box { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.api-box input { width: min(300px, 65vw); padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; }
.api-box input#apiToken { width: min(220px, 55vw); font-family: ui-monospace, monospace; font-size: .8rem; }
.pill { font-size: .75rem; padding: .2rem .5rem; border-radius: 6px; background: #f1f3f4; }
.pill.ok { background: #e6f4ea; color: var(--accent); }
.pill.err { background: #fce8e6; color: var(--err); }
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; padding: .6rem 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.tabs button { border: 1px solid var(--line); background: #fff; padding: .4rem .75rem; border-radius: 8px; cursor: pointer; font-size: .82rem; color: var(--muted); }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
main { max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.panel { display: none; }
.panel.active { display: block; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.card h2 { margin: 0 0 .7rem; font-size: .95rem; }
.card.nested { background: #f8f9fa; }
.callout { font-size: .78rem; line-height: 1.45; padding: .5rem .65rem; background: #e8f0fe; border-radius: 8px; border-left: 3px solid var(--primary); }
.callout code { font-size: .85em; }
.log.compact { max-height: 220px; font-size: .72rem; }
.env-hint { background: #f8f9fa; color: #3c4043; }
.consent-block { border: 1px solid #f9ab00; background: #fffbf0; }
.consent-block h3 { margin: 0 0 .4rem; font-size: .88rem; color: #b06000; }
.muted.small { font-size: .75rem; line-height: 1.4; }
.panel-digital-highlight .card.step-card { border-color: var(--primary); box-shadow: 0 0 0 1px #d2e3fc; }
.workshop-self-v52 .pipeline-overview { border: 1px solid #c2d7f7; background: linear-gradient(180deg, #f8fbff 0%, #fff 100%); }
.workshop-self-v52 .checklist { margin: .5rem 0 0; padding-left: 1.1rem; line-height: 1.55; }
.hidden-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
label { display: block; font-size: .76rem; color: var(--muted); margin: .45rem 0 .2rem; }
input, textarea, select { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .88rem; font-family: inherit; }
textarea { resize: vertical; }
.lg-select { font-size: .9rem; padding: .55rem; }
.row, .row2, .row3 { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row2 > * { flex: 1; min-width: 200px; }
.row3 > * { flex: 1; min-width: 140px; }
.btn { border: none; border-radius: 8px; padding: .5rem 1rem; font-size: .86rem; cursor: pointer; font-weight: 500; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.ghost { background: #f1f3f4; color: var(--text); }
.btn.lg { padding: .7rem 1.5rem; font-size: .95rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.chk { display: flex; align-items: center; gap: .35rem; font-size: .85rem; margin: .35rem 0; }
.chk input { width: auto; }
.chk.inline { display: inline-flex; margin-left: .5rem; }
.meta { font-size: .78rem; color: var(--muted); }
.muted { color: var(--muted); font-size: .8rem; }
.flow { display: flex; flex-wrap: wrap; gap: .35rem; margin: .5rem 0; }
.flow span { font-size: .72rem; padding: .3rem .55rem; border-radius: 999px; background: #f1f3f4; color: var(--muted); }
.flow span.done { background: #e6f4ea; color: var(--accent); }
.flow span.fail { background: #fce8e6; color: var(--err); }
.flow span.run { background: #e8f0fe; color: var(--primary); }
.flow span.core { background: #e8f0fe; color: #174ea6; border: 1px solid #c6dafc; }
.flow span.render { background: #fef7e0; color: #b06000; border: 1px solid #f9ab00; }
.flow span.post { background: #f3e8fd; color: #6a1b9a; }
.card-recommended { border-color: var(--accent); box-shadow: 0 0 0 1px #ceead6; }
.copy-pipeline-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; margin: .65rem 0; padding: .55rem .65rem; background: #f8f9fa; border-radius: 8px; font-size: .72rem; }
.copy-pipeline-banner .label { font-weight: 600; color: var(--text); margin-right: .25rem; }
.copy-pipeline-banner .step.core { padding: .2rem .45rem; border-radius: 999px; background: #e8f0fe; color: #174ea6; }
.copy-pipeline-banner .step.render { padding: .2rem .45rem; border-radius: 999px; background: #fef7e0; color: #b06000; }
.copy-pipeline-banner .arrow { color: var(--muted); }
.copy-pipeline-card { border-left: 3px solid var(--accent); }
.advanced-route { margin-top: .75rem; font-size: .8rem; color: var(--muted); }
.advanced-route summary { cursor: pointer; margin-bottom: .35rem; }
.hidden { display: none !important; }
.duration-stepper {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: .15rem;
}
.duration-stepper input[type="number"] {
  width: 3.2rem;
  text-align: center;
  padding: .45rem .3rem;
  font-weight: 600;
}
.duration-stepper .stepper-btn {
  min-width: 2.2rem;
  padding: .45rem .55rem;
  font-size: 1rem;
  line-height: 1;
}
.log { background: #f8f9fa; border: 1px solid var(--line); border-radius: 8px; padding: .65rem; font-size: .72rem; overflow: auto; max-height: 240px; white-space: pre-wrap; word-break: break-all; }
.hooks { display: flex; flex-direction: column; gap: .35rem; margin: .5rem 0; }
.hook-item { display: flex; gap: .4rem; font-size: .85rem; cursor: pointer; }
.player { width: 100%; margin-top: .5rem; border-radius: 8px; }
#mp4Preview,
#produceMp4Preview { display: none; background: #000; max-height: 480px; width: 100%; border-radius: 8px; }
#mp4Preview.show,
#produceMp4Preview.show { display: block; }
.variant-cards { display: flex; flex-direction: column; gap: .5rem; margin: .5rem 0; }
.variant-card {
  border: 1px solid var(--line); border-radius: 10px; padding: .55rem .65rem; cursor: pointer;
  background: #fafbfc;
}
.variant-card.selected { border-color: var(--accent); background: #eef4ff; }
.variant-card .style-label { font-weight: 600; font-size: .9rem; }
.variant-card .preview { font-size: .82rem; color: var(--muted); margin-top: .25rem; line-height: 1.35; }
.radar-list li { cursor: pointer; padding: .25rem 0; }
.radar-list li.selected { color: var(--accent); font-weight: 600; }
.duration-picker { margin-bottom: .35rem; }
#durationMinutesWrap.hidden { display: none; }
#benchmarkVideo.show { display: block; }
.share { margin-top: .75rem; }
.subs { max-height: 360px; overflow-y: auto; }
.sub-row { display: grid; grid-template-columns: 100px 1fr; gap: .5rem; margin-bottom: .5rem; align-items: start; }
.sub-time { font-size: .72rem; color: var(--muted); padding-top: .5rem; }
.task-table { display: flex; flex-direction: column; gap: .35rem; margin: .5rem 0; }
.task-row { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; text-align: left; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fafafa; cursor: pointer; font-size: .8rem; }
.task-row:hover { border-color: var(--primary); }
.foot { text-align: center; padding: 1rem; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--primary); }
.step-card { border-left: 3px solid var(--primary); }
.step-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.step-actions .btn.primary { min-width: 7rem; }
.status-line { font-size: .8rem; color: var(--muted); margin: .35rem 0 .5rem; }
.status-line.ok { color: var(--accent); }
.status-line.run { color: var(--primary); }
.btn.link { background: transparent; color: var(--primary); border: 1px dashed var(--primary); text-decoration: none; display: inline-block; padding: .4rem .7rem; border-radius: 6px; cursor: pointer; font-size: .85rem; }
.btn.link:disabled { opacity: .4; cursor: not-allowed; }
.player.mini { max-height: 200px; margin-top: .5rem; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal.hidden { display: none; }
.modal-inner { background: #fff; border-radius: 12px; padding: 1.2rem; max-width: 520px; width: 92vw; max-height: 80vh; overflow: auto; }
.duration-picker { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; margin-top: .35rem; }
.duration-picker select { padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; }
.duration-picker .chk { font-size: .82rem; margin: 0; }
.stepper { display: inline-flex; align-items: center; gap: .35rem; }
.stepper input[type="number"] { width: 2.8rem; text-align: center; padding: .3rem; border: 1px solid var(--line); border-radius: 6px; }
.stepper-unit { font-size: .85rem; }
.btn.sm { padding: .25rem .55rem; font-size: .9rem; min-width: 2rem; }
.asset-upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0; }
.asset-upload-row .muted { flex: 1 1 100%; }
@media (max-width: 640px) { .row2 > *, .row3 > * { min-width: 100%; } .sub-row { grid-template-columns: 1fr; } }
