:root {
  --ink: #151b1a;
  --muted: #5e6b67;
  --paper: #f3f4f0;
  --surface: #ffffff;
  --surface-soft: #eef1ed;
  --line: #d7dcd8;
  --dark: #111a19;
  --teal: #087d76;
  --teal-dark: #06635e;
  --coral: #e66245;
  --blue: #2563a7;
  --danger: #a7372b;
  --success: #16734f;
  --focus: #156dca;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 74%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
.tool-layout {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--dark);
  color: white;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.18;
}

.brand strong {
  font-size: 14px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.site-header nav a:hover {
  color: var(--ink);
}

.site-header .back-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}

.tool-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  padding: 62px 0 72px;
}

.tool-main {
  min-width: 0;
}

.intro {
  max-width: 750px;
  margin-bottom: 35px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: var(--teal-dark);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow span {
  width: 18px;
  height: 3px;
  background: var(--coral);
}

.intro h1 {
  margin: 0;
  font-size: 42px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

.intro > p:last-child {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.parser,
.status-panel,
.result-panel,
.error-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.parser {
  overflow: hidden;
}

.parser-heading,
.status-header,
.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
  background: var(--surface-soft);
}

.parser-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.parser-heading span,
.status-kicker,
.guide-index {
  color: var(--teal-dark);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.parser-heading h2,
.status-header h2,
.result-heading h2,
.error-panel h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.parser-heading > p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#parse-form {
  padding: 26px 24px 24px;
}

#parse-form label,
.formats legend {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 800;
}

.url-control {
  position: relative;
  display: flex;
  min-width: 0;
}

.url-control input {
  width: 100%;
  min-width: 0;
  height: 54px;
  border: 1px solid #aeb8b3;
  border-radius: 6px;
  padding: 0 82px 0 15px;
  background: #fbfcfa;
  color: var(--ink);
  font-size: 15px;
}

.url-control input:hover {
  border-color: #7d8b85;
}

.url-control input:focus {
  border-color: var(--focus);
}

.url-control input::placeholder {
  color: #7b8782;
}

.paste-button {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 62px;
  height: 40px;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.field-help {
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 12px;
}

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-list > span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 10px;
  color: #33403c;
  font-size: 12px;
  font-weight: 700;
}

.platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.platform-dot.xhs {
  background: #d9443e;
}

.platform-dot.bili {
  background: #2f87ad;
}

.platform-dot.douyin {
  background: #171717;
}

.platform-dot.kuaishou {
  background: #e86c2b;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.save-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-radius: 5px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 800;
}

.primary-button,
.save-button {
  min-width: 166px;
  background: var(--dark);
  color: white;
}

.primary-button:hover,
.save-button:hover {
  background: var(--teal-dark);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.text-button {
  min-height: 44px;
  padding: 0 4px;
  background: transparent;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

.rights-note {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 16px 24px;
  background: #f8f8f5;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.status-panel,
.result-panel,
.error-panel {
  margin-top: 20px;
}

.status-header h2,
.result-heading h2 {
  margin-top: 4px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 0;
  padding: 26px 24px 20px;
  list-style: none;
}

.steps li {
  display: flex;
  min-width: 0;
  gap: 9px;
  opacity: 0.48;
}

.steps li.active,
.steps li.done {
  opacity: 1;
}

.steps li > span {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid #aeb8b3;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.steps li.active > span {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.steps li.done > span {
  border-color: var(--success);
  color: var(--success);
}

.steps p {
  min-width: 0;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.steps small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.progress-track {
  height: 5px;
  margin: 0 24px;
  overflow: hidden;
  background: #dce2de;
}

.progress-track span {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--teal);
  transition: width 250ms ease;
}

.status-message {
  margin: 0;
  padding: 15px 24px 21px;
  color: var(--muted);
  font-size: 13px;
}

.error-panel {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-color: #e1b5ad;
  padding: 24px;
  background: #fff8f6;
}

.error-panel[hidden] {
  display: none;
}

.error-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  font-weight: 900;
}

.error-panel p {
  margin: 7px 0 17px;
  color: #6d3c35;
}

.result-platform {
  color: var(--teal-dark);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.ready-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.ready-mark i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-style: normal;
}

.media-summary {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 22px;
  padding: 24px;
}

.media-preview {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  place-items: center;
  border-radius: 6px;
  background: var(--dark);
  color: white;
}

.media-preview::before,
.media-preview::after {
  position: absolute;
  content: "";
}

.media-preview::before {
  inset: 0;
  border: 18px solid rgba(255, 255, 255, 0.08);
  transform: rotate(12deg) scale(1.2);
}

.media-preview::after {
  width: 54px;
  height: 4px;
  background: var(--coral);
  transform: translateY(31px);
}

.media-preview span {
  z-index: 1;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 38px;
  font-weight: 900;
}

.media-copy {
  min-width: 0;
}

.media-copy h3 {
  overflow-wrap: anywhere;
  margin: 1px 0 15px;
  font-size: 18px;
  line-height: 1.45;
}

.media-copy dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.media-copy dl div {
  min-width: 0;
}

.media-copy dt {
  color: var(--muted);
  font-size: 10px;
}

.media-copy dd {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.formats {
  min-width: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 23px 24px 24px;
}

.formats legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

.formats > p {
  clear: both;
  margin: 5px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.format-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.format-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.format-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.format-option > span {
  display: grid;
  min-height: 69px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 11px 12px;
  background: #fbfcfa;
  transition: border-color 150ms ease, background 150ms ease;
}

.format-option input:checked + span {
  border-color: var(--teal);
  background: #eef8f5;
  box-shadow: inset 0 0 0 1px var(--teal);
}

.format-option input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 74%, white);
  outline-offset: 2px;
}

.format-option strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.format-option small {
  color: var(--muted);
  font-size: 10px;
}

.download-actions {
  display: flex;
  align-items: center;
  gap: 17px;
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  background: var(--surface-soft);
}

.download-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.guide {
  align-self: start;
  border-top: 3px solid var(--dark);
  padding-top: 18px;
}

.guide h2 {
  margin: 10px 0 23px;
  font-size: 23px;
  line-height: 1.3;
}

.guide > ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide > ol li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 15px 0;
}

.guide > ol span {
  color: var(--coral);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}

.guide > ol p {
  margin: 0;
  color: #3c4844;
  font-size: 13px;
}

.guide-note {
  margin-top: 18px;
  border-left: 3px solid var(--teal);
  padding: 2px 0 2px 15px;
}

.guide-note strong {
  font-size: 12px;
}

.guide-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.guide > a {
  display: inline-flex;
  margin-top: 24px;
  gap: 7px;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer strong {
  font-size: 13px;
}

.site-footer p {
  max-width: 680px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.site-footer > a {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

@media (max-width: 900px) {
  .tool-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .guide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }

  .guide-index,
  .guide h2,
  .guide > a {
    grid-column: 1 / -1;
  }

  .guide h2 {
    margin-bottom: 16px;
  }

  .guide-note {
    align-self: start;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer,
  .tool-layout {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 68px;
  }

  .site-header nav > a:first-child {
    display: none;
  }

  .site-header .back-link {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }

  .tool-layout {
    padding: 40px 0 52px;
  }

  .intro {
    margin-bottom: 27px;
  }

  .intro h1 {
    font-size: 29px;
    line-height: 1.3;
  }

  .intro > p:last-child {
    font-size: 15px;
  }

  .parser-heading,
  .status-header,
  .result-heading {
    padding: 19px 17px;
  }

  .parser-heading > p {
    display: none;
  }

  #parse-form {
    padding: 21px 17px;
  }

  .url-control input {
    height: 52px;
    padding-right: 76px;
    font-size: 16px;
  }

  .platform-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-list > span {
    justify-content: center;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .primary-button,
  .secondary-button,
  .save-button {
    width: 100%;
  }

  .rights-note {
    padding: 15px 17px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 10px;
    padding: 22px 17px 18px;
  }

  .progress-track {
    margin: 0 17px;
  }

  .status-message {
    padding: 14px 17px 19px;
  }

  .error-panel {
    padding: 20px 17px;
  }

  .media-summary {
    grid-template-columns: 1fr;
    padding: 19px 17px;
  }

  .media-preview {
    max-width: none;
    aspect-ratio: 16 / 8.5;
  }

  .formats {
    padding: 20px 17px;
  }

  .format-list {
    grid-template-columns: 1fr;
  }

  .format-option > span {
    min-height: 60px;
  }

  .download-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 18px 17px;
  }

  .guide {
    display: block;
  }

  .guide-note {
    margin-top: 18px;
  }

  .site-footer {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* 单任务解析工作台：让链接输入、进度与下载决策成为页面的明确主线。 */
:root { --paper:#edf3f1; --surface:#ffffff; --surface-soft:#e5efed; --dark:#102226; --teal:#107f7d; --teal-dark:#09625f; --line:#ccdcd8; --ink:#132427; --muted:#607579; }
 body { background:linear-gradient(135deg,#e8f0ee 0%,#f7faf8 48%,#e5edef 100%); }
 .site-header { width:min(1180px,calc(100% - 48px)); min-height:76px; margin:0 auto; border-bottom-color:#cad9d5; }
 .brand-mark { border-radius:9px; background:linear-gradient(145deg,#107f7d,#1c5965); box-shadow:0 8px 18px rgba(16,127,125,.18); }
 .brand { gap:11px; }
 .back-link { border-radius:8px; border:1px solid #c6d8d4; background:rgba(255,255,255,.66); padding:8px 11px; }
 .tool-band { padding:48px 0 72px; }
 .tool-layout { width:min(1180px,calc(100% - 48px)); gap:32px; }
 .tool-main { min-width:0; }
 .intro { max-width:760px; border-left-color:#107f7d; padding:3px 0 25px 20px; }
 .intro h1 { max-width:620px; color:#102a30; font-size:clamp(36px,4.4vw,58px); line-height:1.13; }
 .intro > p:last-child { max-width:560px; font-size:16px; }
 .eyebrow { color:#107f7d; }
 .tool-flow { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; max-width:670px; margin:0 0 22px 20px; padding:0; list-style:none; }
 .tool-flow li { min-height:58px; display:grid; grid-template-columns:25px minmax(0,1fr); align-items:center; gap:9px; border:1px solid #cbdcd8; border-radius:8px; background:rgba(255,255,255,.62); padding:9px 11px; box-shadow:0 6px 16px rgba(20,54,54,.035); }
 .tool-flow span { color:#107f7d; font:800 11px/1 ui-monospace,SFMono-Regular,Consolas,monospace; }
 .tool-flow strong { color:#334b4e; font-size:12px; line-height:1.35; }
 .parser,.status-panel,.result-panel,.error-panel { border-radius:12px; border-color:#c8d9d5; box-shadow:0 16px 34px rgba(20,54,54,.08); }
 .parser { overflow:hidden; background:rgba(255,255,255,.94); }
 .parser-heading { min-height:88px; padding:19px 24px; background:linear-gradient(120deg,#f7fbfa,#ebf4f2); }
 .parser-heading > div > span { color:#107f7d; }
 .url-control input { height:58px; border-radius:8px; background:#fbfdfc; }
 .paste-button { top:9px; right:8px; height:40px; border-radius:6px; background:#eff7f5; }
 .platform-list > span { min-height:34px; border-radius:999px; background:#f7faf9; }
 .primary-button,.secondary-button,.save-button { min-height:50px; border-radius:8px; }
 .primary-button,.save-button { background:#102226; box-shadow:0 8px 18px rgba(16,34,38,.15); }
 .primary-button:hover,.save-button:hover { background:#107f7d; }
 .guide { position:sticky; top:24px; border-radius:12px; border-color:#c8d9d5; background:rgba(255,255,255,.76); box-shadow:0 16px 34px rgba(20,54,54,.055); }
 .guide::before { display:block; width:34px; height:3px; border-radius:99px; background:#107f7d; content:""; }
 .guide-index { color:#107f7d; }
 .guide h2 { color:#173237; }
 .site-footer { width:min(1180px,calc(100% - 48px)); border-top-color:#c9d8d5; }
 @media (max-width:760px){.site-header,.tool-layout,.site-footer{width:min(100% - 28px,1180px)}.site-header{min-height:64px}.site-header nav>a:first-child{display:none}.tool-band{padding:31px 0 52px}.intro{padding-left:16px}.intro h1{font-size:34px}.tool-flow{grid-template-columns:1fr;margin-left:0}.tool-flow li{min-height:50px}.parser-heading{padding:17px}.guide{position:static}.site-footer{width:min(100% - 28px,1180px)}}

