:root {
  --paper: #f3f0e8;
  --paper-deep: #ebe6db;
  --card: #fffdf8;
  --ink: #1b1e23;
  --muted: #6c7078;
  --faint: #9a9b98;
  --line: #d8d2c4;
  --line-dark: #bdb6a8;
  --accent: #2c5b8f;
  --accent-dark: #20456e;
  --accent-soft: #e5edf5;
  --red: #b6422f;
  --green: #2f7555;
  --code-bg: #151b23;
  --code-ink: #e9edf2;
  --code-dim: #8e9baa;
  --shadow: 0 18px 44px rgba(44, 38, 29, 0.08);
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Songti SC", "SimSun", serif;
  --mono: "Cascadia Code", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9), transparent 34rem),
    radial-gradient(circle at 88% 4%, rgba(209, 220, 228, 0.55), transparent 30rem),
    linear-gradient(135deg, var(--paper) 0%, #f7f4ed 48%, var(--paper-deep) 100%);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }

.paper-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    radial-gradient(rgba(35, 30, 22, 0.14) 0.5px, transparent 0.5px),
    radial-gradient(rgba(35, 30, 22, 0.08) 0.5px, transparent 0.5px);
  background-size: 7px 7px, 13px 13px;
  background-position: 0 0, 4px 5px;
  z-index: 0;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(155, 147, 129, 0.32);
  background: rgba(243, 240, 232, 0.76);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fffdf7;
  background: var(--ink);
  border-radius: 9px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.12);
}

.brand-word {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-tag {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
  border-left: 1px solid var(--line-dark);
  padding-left: 10px;
  margin-left: 1px;
}

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

.header-nav a {
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}
.header-nav a:hover { color: var(--ink); border-color: var(--ink); }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.live-dot i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 117, 85, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: clamp(36px, 6vw, 86px);
  align-items: center;
  padding: 76px 0 70px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(46px, 4.7vw, 62px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-lede {
  max-width: 540px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

.btn-primary {
  color: #fffdf7;
  background: var(--accent);
  box-shadow: 0 9px 20px rgba(44, 91, 143, 0.22);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-primary span { font-weight: 400; opacity: 0.8; }

.btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-dark);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.62); }

.btn-wide { width: 100%; min-height: 50px; margin-top: 22px; font-size: 15px; }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 12px; border-radius: 7px; }

.hero-note {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.hero-coverage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
}
.hero-coverage > span {
  padding: 3px 8px;
  border: 1px solid rgba(189, 182, 168, 0.75);
  border-radius: 4px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.42);
  font-size: 10.5px;
  line-height: 1.45;
}
.hero-coverage .coverage-label {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  padding: 16px 0 10px;
}

.demo-card {
  position: relative;
  background: #fffdf8;
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

.demo-top, .demo-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
}
.demo-top { justify-content: space-between; margin-bottom: 2px; }
.demo-label, .demo-zoom {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.demo-chart { width: 100%; height: auto; display: block; overflow: visible; }
.axis-line { stroke: #30343a; stroke-width: 1.4; }
.grid-line { stroke: #dcd8cf; stroke-width: 1; }
.dot { stroke: #fffdf8; stroke-width: 1.5; }
.dot.red { fill: #c4412e; }
.dot.blue { fill: #356c9f; }
.dot.green { fill: #4a8b64; }
.select-box { fill: none; stroke: var(--accent); stroke-width: 1.3; stroke-dasharray: 5 4; animation: scan-dash 9s linear infinite; }
@keyframes scan-dash { to { stroke-dashoffset: -72; } }
.select-label { fill: var(--accent); font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; }

.demo-bottom { margin-top: 2px; }
.swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.swatch.red { background: #c4412e; }
.swatch.blue { background: #356c9f; }
.swatch.green { background: #4a8b64; }
.demo-caption { margin-left: auto; color: var(--faint); font-size: 10px; font-family: var(--mono); }

.demo-code {
  position: relative;
  width: min(92%, 380px);
  margin: -8px 0 0 auto;
  padding: 16px 18px;
  color: var(--code-ink);
  background: var(--code-bg);
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  transform: rotate(-1.1deg);
  box-shadow: 0 15px 30px rgba(27, 30, 35, 0.2);
  overflow: hidden;
}
.code-dim { color: var(--code-dim); }
.visual-caption {
  display: block;
  margin-top: 20px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-align: right;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 22px;
  align-items: start;
  scroll-margin-top: 26px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(45, 39, 29, 0.045);
}

.input-card { padding: 26px 26px 24px; }
.result-card { position: sticky; top: 18px; padding: 26px; min-height: 460px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.card-title { display: flex; align-items: flex-start; gap: 12px; }
.step-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(44, 91, 143, 0.18);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.card-title h2 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.card-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.card-status {
  flex: 0 0 auto;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}
.card-status.ready { color: var(--green); border-color: rgba(47, 117, 85, 0.28); background: rgba(47, 117, 85, 0.06); }
.card-status.busy { color: var(--accent); border-color: rgba(44, 91, 143, 0.3); background: var(--accent-soft); }
.card-status.error { color: var(--red); border-color: rgba(182, 66, 47, 0.3); background: rgba(182, 66, 47, 0.06); }

.progress-panel {
  position: relative;
  isolation: isolate;
  padding: 6px 0 2px;
}
.progress-fx {
  position: absolute;
  inset: -18px -16px -14px;
  z-index: 0;
  overflow: hidden;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0.95;
}
.progress-content { position: relative; z-index: 1; }
.progress-aurora {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.52;
  will-change: transform;
}
.progress-aurora-a {
  top: -150px;
  left: -80px;
  background: radial-gradient(circle, rgba(78, 137, 194, 0.5), transparent 68%);
  animation: progress-aurora-a 9s ease-in-out infinite alternate;
}
.progress-aurora-b {
  right: -100px;
  bottom: -150px;
  background: radial-gradient(circle, rgba(182, 122, 72, 0.28), transparent 70%);
  animation: progress-aurora-b 12s ease-in-out infinite alternate;
}
.progress-grid {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  background-image: radial-gradient(rgba(44, 91, 143, 0.34) 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 76%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 76%, transparent);
  animation: progress-grid 16s linear infinite;
}
.progress-scan {
  position: absolute;
  top: -50%;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(93, 151, 209, 0.04) 28%, rgba(93, 151, 209, 0.16) 68%, rgba(151, 198, 239, 0.38) 70%, transparent 72%);
  filter: blur(0.5px);
  animation: progress-scan 4.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.progress-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.62;
}
.progress-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.progress-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(44, 91, 143, 0.4);
  animation: progress-pulse 1.8s ease-out infinite;
}
.progress-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 108px;
  margin-top: 4px;
}
.progress-number {
  position: relative;
  margin: 10px 0 2px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 62px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.progress-number span {
  display: inline-block;
  color: var(--accent);
  background: linear-gradient(118deg, var(--accent-dark) 0%, #477fb1 38%, #7fb3dd 55%, var(--accent-dark) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: progress-digits 5.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 20px rgba(44, 91, 143, 0.18));
}
.progress-number small {
  margin-left: 3px;
  color: var(--faint);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0;
  -webkit-text-fill-color: currentColor;
}
.progress-orbit {
  position: relative;
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  margin: 4px 6px 0 0;
  opacity: 0.95;
}
.progress-orbit::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(44, 91, 143, 0) 0deg, rgba(44, 91, 143, 0.68) 68deg, rgba(44, 91, 143, 0) 150deg, rgba(44, 91, 143, 0.18) 230deg, rgba(44, 91, 143, 0) 330deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: progress-orbit-spin 8s linear infinite;
}
.progress-orbit::after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(44, 91, 143, 0.22);
  border-radius: 50%;
  animation: progress-orbit-spin 18s linear infinite reverse;
}
.progress-orbit-core {
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent-soft) 58%, rgba(44, 91, 143, 0.2));
  box-shadow: 0 0 0 1px rgba(44, 91, 143, 0.14), 0 0 24px rgba(44, 91, 143, 0.22);
  animation: progress-core 3.6s ease-in-out infinite;
}
.progress-message {
  min-height: 22px;
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.progress-track {
  position: relative;
  height: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--paper-deep), #e3ded2);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(45, 39, 29, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(255, 255, 255, 0.38) 13px 14px);
  opacity: 0.36;
  pointer-events: none;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 1%;
  border-radius: inherit;
  background: linear-gradient(90deg, #173e65, var(--accent) 48%, #4b86b9 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 18px rgba(44, 91, 143, 0.42);
  transition: width 0.45s ease;
  animation: progress-flow 2.4s linear infinite, progress-glow 2s ease-in-out infinite;
}
.progress-fill::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, #9cc7ea 30%, rgba(83, 143, 195, 0.6) 55%, transparent 72%);
  box-shadow: 0 0 14px rgba(151, 198, 239, 0.9);
  transform: translate(50%, -50%);
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: progress-sheen 2.2s linear infinite;
}
.progress-stats {
  display: flex;
  gap: 34px;
  margin-top: 14px;
}
.progress-stats span {
  display: block;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.progress-stats strong {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.progress-steps {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.progress-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  overflow: hidden;
  transition: color 0.25s ease, background 0.25s ease;
}
.progress-steps li span {
  width: 22px;
  color: inherit;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}
.progress-steps li.active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(44, 91, 143, 0.09), transparent 74%);
}
.progress-steps li.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--accent), rgba(44, 91, 143, 0.15));
  box-shadow: 0 0 9px rgba(44, 91, 143, 0.6);
  animation: progress-step-glow 1.7s ease-in-out infinite;
}
.progress-steps li.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-100%);
  pointer-events: none;
  animation: progress-step-sheen 2.8s ease-in-out infinite;
}
.progress-steps li.active span { color: var(--accent); text-shadow: 0 0 10px rgba(44, 91, 143, 0.35); }
.progress-steps li.done { color: var(--green); }
.progress-note {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.65;
}
@keyframes progress-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
@keyframes progress-pulse {
  0% { box-shadow: 0 0 0 0 rgba(44, 91, 143, 0.35); }
  70% { box-shadow: 0 0 0 7px rgba(44, 91, 143, 0); }
  100% { box-shadow: 0 0 0 0 rgba(44, 91, 143, 0); }
}
.result-card.is-converting {
  border-color: rgba(44, 91, 143, 0.4);
  box-shadow: 0 20px 55px rgba(44, 91, 143, 0.14), 0 8px 24px rgba(45, 39, 29, 0.05);
}
@supports (-webkit-mask-composite: xor) {
  .result-card.is-converting::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 2;
    padding: 1px;
    border-radius: 17px;
    background: linear-gradient(115deg, transparent 24%, rgba(44, 91, 143, 0.75) 38%, rgba(135, 187, 232, 0.95) 46%, transparent 60%, transparent 100%);
    background-size: 260% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
    animation: progress-border-sweep 3.4s linear infinite;
  }
}
.progress-panel.is-finishing .progress-number span,
.result-card.is-finishing .progress-number span {
  background: linear-gradient(118deg, #225b40 0%, #3d8c67 42%, #8ac7a9 55%, #225b40 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.progress-panel.is-finishing .progress-fill,
.result-card.is-finishing .progress-fill {
  background: linear-gradient(90deg, #236044, #3d8c67 52%, #78b695 100%);
  background-size: 200% 100%;
  box-shadow: 0 0 20px rgba(47, 117, 85, 0.42);
}
.progress-panel.is-finishing .progress-orbit::before {
  background: conic-gradient(from 0deg, rgba(47, 117, 85, 0) 0deg, rgba(47, 117, 85, 0.65) 68deg, rgba(47, 117, 85, 0) 150deg, rgba(47, 117, 85, 0.2) 230deg, rgba(47, 117, 85, 0) 330deg);
  animation-duration: 3s;
}
.progress-panel.is-finishing .progress-orbit-core {
  background: radial-gradient(circle at 35% 30%, #fff, #e3f1e8 58%, rgba(47, 117, 85, 0.24));
}
.progress-panel.is-finishing .progress-steps li.active { color: var(--green); }
.progress-panel.is-finishing .progress-steps li.active::before { background: linear-gradient(var(--green), rgba(47, 117, 85, 0.15)); box-shadow: 0 0 9px rgba(47, 117, 85, 0.55); }
@keyframes progress-aurora-a {
  from { transform: translate3d(-16px, -12px, 0) scale(1); opacity: 0.42; }
  to { transform: translate3d(28px, 20px, 0) scale(1.14); opacity: 0.64; }
}
@keyframes progress-aurora-b {
  from { transform: translate3d(14px, 10px, 0) scale(1.05); opacity: 0.34; }
  to { transform: translate3d(-22px, -16px, 0) scale(0.94); opacity: 0.52; }
}
@keyframes progress-grid { to { background-position: 17px 17px; } }
@keyframes progress-scan {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.85; }
  60% { opacity: 0.38; }
  100% { transform: translateY(340%); opacity: 0; }
}
@keyframes progress-digits {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@keyframes progress-orbit-spin { to { transform: rotate(360deg); } }
@keyframes progress-core {
  0%, 100% { transform: scale(0.9); box-shadow: 0 0 0 1px rgba(44, 91, 143, 0.14), 0 0 18px rgba(44, 91, 143, 0.18); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 1px rgba(44, 91, 143, 0.2), 0 0 30px rgba(44, 91, 143, 0.34); }
}
@keyframes progress-flow { to { background-position: -200% 0; } }
@keyframes progress-glow {
  0%, 100% { box-shadow: 0 0 14px rgba(44, 91, 143, 0.32); }
  50% { box-shadow: 0 0 24px rgba(44, 91, 143, 0.58); }
}
@keyframes progress-step-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes progress-step-sheen {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(100%); }
}
@keyframes progress-border-sweep {
  0% { background-position: 160% 0; }
  100% { background-position: -160% 0; }
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 26px;
  border: 1.5px dashed var(--line-dark);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.55), rgba(245,241,232,0.35));
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease;
}
.dropzone:hover, .dropzone:focus, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
}
.dropzone input { display: none; }
.drop-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  color: var(--accent);
  border: 1px solid rgba(44, 91, 143, 0.3);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}
.drop-copy { display: flex; flex-direction: column; gap: 2px; }
.drop-copy strong { font-size: 15px; }
.drop-copy span { color: var(--muted); font-size: 12px; }
.dropzone small { margin-top: 11px; color: var(--faint); font-size: 10px; letter-spacing: 0.02em; }

.upload-progress {
  margin-top: 12px;
  padding: 13px 16px 12px;
  border: 1px solid rgba(44, 91, 143, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(44, 91, 143, 0.055), rgba(255, 255, 255, 0.5));
  animation: upload-progress-in 0.24s ease-out;
}
@keyframes upload-progress-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.upload-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-progress-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.upload-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(44, 91, 143, 0.4);
  animation: progress-pulse 1.8s ease-out infinite;
}
.upload-progress-percent {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.upload-progress-percent small { margin-left: 2px; color: var(--faint); font-size: 11px; font-weight: 500; letter-spacing: 0; }
.upload-track {
  position: relative;
  height: 7px;
  margin-top: 9px;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.upload-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width 0.18s ease;
}
.upload-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: progress-sheen 1.6s linear infinite;
}
.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}
.upload-progress.done { border-color: rgba(47, 117, 85, 0.28); background: rgba(47, 117, 85, 0.055); }
.upload-progress.done .upload-progress-kicker,
.upload-progress.done .upload-progress-percent { color: var(--green); }
.upload-progress.done .upload-fill { background: linear-gradient(90deg, #34785a, var(--green)); }

.image-panel { margin-top: 18px; }
.stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  cursor: crosshair;
  user-select: none;
}
.stage img { display: block; max-width: 100%; max-height: 480px; width: auto; height: auto; }
.box-overlay {
  position: absolute;
  border: 2px solid var(--accent);
  background: rgba(44, 91, 143, 0.12);
  box-shadow: 0 0 0 9999px rgba(30, 35, 40, 0.12);
  pointer-events: none;
}
.box-overlay::before, .box-overlay::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  background: #fffdf8;
}
.box-overlay::before { left: -4px; top: -4px; }
.box-overlay::after { right: -4px; bottom: -4px; }
.stage-tip {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 8px;
  color: #fffdf8;
  background: rgba(27, 30, 35, 0.74);
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
  transition: opacity 180ms ease;
}
.stage-tip.hidden { opacity: 0; }

.image-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.image-meta span { display: inline-flex; align-items: center; gap: 5px; }
.image-meta b { color: var(--ink); font-weight: 600; }
.mini-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px; }
.text-btn {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
}
.text-btn:hover { border-color: var(--accent); }

.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.box-grid { margin-top: 14px; }
.range-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.option-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 9px; margin-top: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.field input, .field select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 91, 143, 0.1);
}
.field input::placeholder { color: #b1b0a8; }
.field select { cursor: pointer; }
.field-help { margin: 9px 0 0; color: var(--faint); font-size: 10.5px; line-height: 1.6; }
.check-field { display: flex; align-items: flex-start; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 11px; line-height: 1.45; cursor: pointer; }
.check-field input { width: 14px; height: 14px; margin: 1px 0 0; accent-color: var(--accent); }
.category-field { margin-top: 9px; }

.auto-detect-panel {
  margin-top: 14px;
  padding: 12px 13px;
  border: 1px solid rgba(44, 91, 143, 0.2);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(229, 237, 245, 0.7), rgba(255, 253, 248, 0.72));
}
.auto-detect-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.auto-detect-head strong { font-weight: 700; letter-spacing: -0.01em; }
.auto-detect-head #autoDetectNote { flex: 1 1 260px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.scan-pulse {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 117, 85, 0.35);
  animation: scan-pulse 2.2s ease-out infinite;
}
@keyframes scan-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 117, 85, 0.35); }
  60% { box-shadow: 0 0 0 8px rgba(47, 117, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 117, 85, 0); }
}
.detect-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.detect-tag {
  padding: 3px 7px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(44, 91, 143, 0.18);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
}
.detect-tag.muted { color: var(--faint); border-color: var(--line); }

.advanced-settings {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.advanced-settings > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}
.advanced-settings > summary::-webkit-details-marker { display: none; }
.advanced-settings > summary::before { content: "+"; color: var(--accent); font-family: var(--mono); margin-right: 7px; }
.advanced-settings[open] > summary::before { content: "−"; }
.advanced-settings > summary span { color: var(--faint); font-size: 10px; }
.advanced-settings .section-rule:first-of-type { margin-top: 17px; padding-top: 0; border-top: 0; }
.advanced-settings .btn-wide { margin-top: 18px; }

.section-rule {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.section-rule span { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.section-rule small { color: var(--faint); font-size: 10px; }

.palette-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; min-height: 18px; }
.palette-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  cursor: pointer;
}
.palette-chip:hover { border-color: var(--accent); color: var(--accent); }
.palette-chip i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.08); }

.more-options {
  margin-top: 17px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.more-options summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.more-options summary::-webkit-details-marker { display: none; }
.more-options summary::before { content: "+"; color: var(--accent); font-family: var(--mono); }
.more-options[open] summary::before { content: "−"; }
.more-options summary span { color: var(--faint); font-size: 10px; }
.more-options .field-grid { margin-top: 13px; }
.more-options .field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.fineprint { margin: 12px 0 0; color: var(--faint); font-size: 10.5px; line-height: 1.6; }

.empty-state { padding: 36px 24px 26px; text-align: center; border: 1px dashed var(--line); border-radius: 12px; background: rgba(255,255,255,0.35); }
.empty-glyph { margin-bottom: 14px; color: var(--line-dark); font-family: var(--mono); font-size: 30px; letter-spacing: -0.14em; }
.empty-state h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.empty-state p { max-width: 330px; margin: 10px auto 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 22px auto 0;
  max-width: 340px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.empty-features > div { padding: 10px 12px; background: rgba(255, 253, 248, 0.72); }
.empty-features span { display: block; color: var(--accent); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.empty-features p { max-width: none; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.empty-hints { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.empty-hints span { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font-family: var(--mono); font-size: 9px; }

.result-panel { min-width: 0; }
.result-summary {
  padding: 11px 13px;
  color: var(--ink);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.6;
}
.result-summary strong { font-family: var(--mono); font-size: 12px; }
.result-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.render-preview { margin-top: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.render-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 11px; border-bottom: 1px solid var(--line); background: #f7f3ea; color: var(--muted); font-size: 10px; }
.render-head a { color: var(--accent); text-decoration: none; }
.render-head a:hover { text-decoration: underline; }
.render-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: #fff; }
.render-note { margin: 0; padding: 8px 11px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.render-note.error { color: #8f2f1f; background: rgba(182, 66, 47, 0.05); }
.tabs { display: flex; gap: 2px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 7px 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tab-pane { min-width: 0; }
.code-block {
  max-height: 480px;
  margin: 12px 0 0;
  padding: 16px;
  overflow: auto;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid #252d38;
  border-radius: 9px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  tab-size: 2;
}
.code-block code { white-space: pre; }
.table-wrap { max-height: 480px; margin-top: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; }
.data-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10px; }
.data-table th, .data-table td { padding: 6px 9px; border-bottom: 1px solid #eee9dd; text-align: left; white-space: nowrap; }
.data-table th { position: sticky; top: 0; z-index: 1; background: #f7f3ea; color: var(--muted); font-weight: 600; font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.num { text-align: right; }

.notes-box { margin-top: 12px; padding: 9px 11px; border: 1px solid #e4d7b8; border-radius: 6px; background: #fbf5e7; color: #7a612b; font-size: 10.5px; line-height: 1.6; }
.notes-box p { margin: 0; }
.notes-box p + p { margin-top: 4px; }

.error-box { margin-top: 18px; padding: 12px 14px; border: 1px solid rgba(182, 66, 47, 0.28); border-radius: 8px; background: rgba(182, 66, 47, 0.06); color: #8f2f1f; font-size: 12px; line-height: 1.6; }
.error-box strong { display: block; margin-bottom: 3px; font-size: 12px; }

.how { padding: 94px 0 74px; scroll-margin-top: 20px; }
.section-heading { max-width: 620px; }
.section-heading h2, .about h2 { margin: 0; font-family: var(--serif); font-size: clamp(32px, 3.8vw, 48px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; }
.section-heading > p:last-child { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.how-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 36px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.how-item { padding: 23px 20px 24px; background: rgba(255,253,248,0.72); }
.how-num { color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; }
.how-item h3 { margin: 20px 0 7px; font-family: var(--serif); font-size: 20px; font-weight: 600; }
.how-item p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 60px;
  align-items: start;
  padding: 60px 0 80px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 20px;
}
.about-copy > p:not(.kicker) { max-width: 520px; margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.about-list { border-top: 1px solid var(--line); }
.about-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.about-list span { color: var(--faint); font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.about-list strong { font-size: 11.5px; font-weight: 500; text-align: right; }

.site-footer { border-top: 1px solid rgba(155, 147, 129, 0.35); padding: 20px 0 28px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; color: var(--faint); font-size: 10px; }
.footer-row strong { color: var(--ink); font-family: var(--serif); font-size: 13px; }

[hidden] { display: none !important; }

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 42px; padding: 54px 0 48px; }
  .hero-visual { max-width: 520px; }
  .workspace { grid-template-columns: 1fr; }
  .result-card { position: static; min-height: 0; }
  .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .header-row { min-height: 58px; }
  .brand-tag { display: none; }
  .header-nav { gap: 12px; }
  .header-nav a { display: none; }
  body { overflow-x: hidden; }
  .hero { padding-top: 42px; }
  .hero h1 { font-size: clamp(34px, 10.2vw, 46px); letter-spacing: -0.035em; }
  .hero-lede { font-size: 14px; }
  .hero-visual { width: 100%; max-width: 100%; }
  .hero-coverage { gap: 5px; }
  .empty-features { max-width: 100%; }
  .progress-number { font-size: 50px; }
  .progress-readout { min-height: 86px; gap: 10px; }
  .progress-orbit { width: 72px; height: 72px; margin-right: 2px; }
  .progress-orbit::after { inset: 13px; }
  .progress-orbit-core { inset: 27px; }
  .progress-fx { inset: -14px -12px -12px; border-radius: 15px; }
  .progress-steps li { padding: 8px; }
  .progress-stats { gap: 18px; }
  .progress-note { font-size: 10.5px; }
  .upload-progress { padding: 12px 13px 11px; }
  .upload-progress-percent { font-size: 20px; }
  .upload-progress-kicker { letter-spacing: 0.06em; }
  .upload-progress-meta { font-size: 9px; }
  .demo-card { transform: rotate(0.4deg); }
  .demo-code { width: 100%; font-size: 10.5px; }
  .input-card, .result-card { padding: 19px; border-radius: 13px; }
  .card-title h2 { font-size: 21px; }
  .field-grid, .range-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .more-options .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-grid { grid-template-columns: 1fr; }
  .stage img { max-height: 360px; }
  .how { padding: 64px 0 48px; }
  .how-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 32px; padding: 46px 0 56px; }
  .footer-row { flex-direction: column; gap: 5px; }
  .demo-code { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .progress-aurora,
  .progress-grid,
  .progress-scan,
  .progress-orbit::before,
  .progress-orbit::after,
  .progress-orbit-core,
  .progress-fill,
  .progress-number span,
  .progress-steps li.active::before,
  .progress-steps li.active::after,
  .result-card.is-converting::after { animation: none !important; }
  .progress-scan,
  .progress-canvas { display: none; }
  .progress-number span {
    color: var(--accent);
    background: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }
}