:root {
  color-scheme: light;
  --brand-50: #eef5f1;
  --brand-100: #dcebe4;
  --brand-200: #b7d7c6;
  --brand-500: #2d6a4f;
  --brand-600: #1b4332;
  --brand-700: #143326;
  --paper: #f2ebd9;
  --card: #fdfbf7;
  --border: #e8dfd1;
  --hover: #f4ebdc;
  --ink: #2f2a24;
  --muted: #57534e;
  --rose: #e11d48;
  --amber: #d97706;
  --danger: #c9342f;
  --success: #2f8f6f;
  --shadow-card: 0 18px 42px rgba(139, 115, 85, 0.12);
  --shadow-soft: 0 2px 12px rgba(139, 115, 85, 0.07), 0 1px 4px rgba(139, 115, 85, 0.05);
  --shadow-button: 0 8px 20px rgba(45, 106, 79, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 106, 79, 0.14), transparent 28rem),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(232, 223, 209, 0.7);
  background: rgba(253, 251, 247, 0.86);
  backdrop-filter: blur(16px);
}

.nav-inner {
  display: flex;
  width: min(1240px, calc(100% - 40px));
  min-height: 70px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand b {
  color: var(--rose);
}

.brand-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  background: var(--brand-500);
  box-shadow: var(--shadow-button);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.nav-links a {
  color: rgba(47, 42, 36, 0.66);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--brand-700);
}

.nav-actions,
.actions,
.compare-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 0 22px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn-primary {
  color: #fff;
  background: var(--brand-500);
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background: var(--brand-600);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  border-color: var(--brand-200);
  color: var(--brand-700);
  background: var(--hover);
  transform: translateY(-2px);
}

.btn-primary.is-loading::after,
.btn-secondary.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.section-block {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0;
}

.section-title {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-title span,
.workspace-head > div > span,
.panel-title span:not(.status-badge) {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: 12px;
  font-weight: 950;
}

.section-title h2,
.workspace-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.section-title p,
.workspace-head p {
  margin: 0;
  color: rgba(47, 42, 36, 0.56);
  line-height: 1.8;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.workspace-shell {
  padding-top: 52px;
}

.workspace-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.workspace-head > div:first-child {
  max-width: 760px;
}

.stepper {
  display: inline-flex;
  max-width: 100%;
  gap: 6px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px;
  background: rgba(253, 251, 247, 0.72);
  box-shadow: var(--shadow-soft);
}

.stepper span {
  white-space: nowrap;
  border-radius: 16px;
  padding: 9px 12px;
  color: rgba(47, 42, 36, 0.46);
  font-size: 12px;
  font-weight: 900;
}

.stepper span.active {
  color: #fff;
  background: var(--brand-500);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1.18fr) minmax(420px, 0.82fr);
  gap: 22px;
  align-items: start;
}

.input-panel,
.result-panel,
.compare-panel {
  padding: 24px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title h3 {
  margin: 10px 0 0;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tool-tabs button {
  min-height: 36px;
  border-radius: 999px;
  padding: 0 13px;
  color: rgba(47, 42, 36, 0.55);
  background: rgba(47, 42, 36, 0.06);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.tool-tabs button.active {
  color: var(--brand-700);
  background: var(--brand-50);
}

textarea,
select,
input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea {
  min-height: 300px;
  padding: 16px;
  line-height: 1.75;
  resize: vertical;
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea:focus,
select:focus,
input:focus {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.1), var(--shadow-soft);
}

.field-block {
  display: block;
  margin-bottom: 14px;
}

.options {
  display: grid;
  grid-template-columns: 0.76fr 1fr 1.3fr 1.1fr;
  gap: 10px;
  margin-top: 14px;
}

label span,
.field-block span {
  display: block;
  margin-bottom: 7px;
  color: rgba(47, 42, 36, 0.56);
  font-size: 13px;
  font-weight: 800;
}

.mock-option {
  min-width: 0;
}

.toggle-row {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 12px;
  color: rgba(47, 42, 36, 0.62);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.toggle-row input {
  width: 17px;
  min-height: 17px;
  height: 17px;
  border-radius: 5px;
  padding: 0;
  accent-color: var(--brand-500);
  box-shadow: none;
}

.toggle-row small {
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
}

.actions {
  margin-top: 16px;
}

.actions .btn-primary,
.actions .btn-secondary {
  flex: 1;
}

.status-badge {
  display: inline-flex;
  min-height: 32px;
  flex: 0 0 auto;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.muted {
  color: rgba(47, 42, 36, 0.6);
  background: rgba(47, 42, 36, 0.06);
}

.status-badge.warning {
  color: var(--amber);
  background: rgba(217, 119, 6, 0.14);
}

.status-badge.danger {
  color: var(--danger);
  background: rgba(201, 52, 47, 0.14);
}

.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.score-card,
.slide-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-soft);
}

.score-card {
  min-height: 118px;
  padding: 14px;
}

.score-card.warning {
  background: rgba(255, 251, 235, 0.76);
}

.score-card span,
.score-card small {
  color: rgba(47, 42, 36, 0.56);
}

.score-card span {
  display: block;
  font-size: 12px;
  font-weight: 900;
}

.score-card strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--brand-600);
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.score-card small {
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(47, 42, 36, 0.08);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-500);
  transition: width 0.24s ease;
}

.slide-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.slide-card {
  padding: 13px 14px;
}

.slide-card strong,
.slide-card small {
  display: block;
}

.slide-card strong {
  margin: 8px 0 3px;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.slide-card small {
  color: rgba(47, 42, 36, 0.56);
  font-size: 12px;
  font-weight: 760;
}

.download-area {
  margin-top: 16px;
}

a.download {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  padding: 0 22px;
  color: #fff;
  background: var(--brand-500);
  box-shadow: var(--shadow-button);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
}

.debug-box {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-soft);
}

.debug-box summary {
  cursor: pointer;
  padding: 14px 16px;
  color: rgba(47, 42, 36, 0.64);
  font-size: 13px;
  font-weight: 900;
}

pre {
  max-height: 340px;
  margin: 0;
  padding: 0 16px 16px;
  overflow: auto;
  color: rgba(47, 42, 36, 0.76);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
}

.compare-section {
  padding-top: 26px;
}

.compare-panel {
  min-height: 300px;
}

.compare-actions {
  justify-content: flex-end;
  margin-bottom: 16px;
}

.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.previews.empty-state {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 24px;
  color: rgba(47, 42, 36, 0.52);
  background: rgba(255, 255, 255, 0.42);
  font-size: 14px;
  font-weight: 760;
}

.preview-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-soft);
}

.preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(47, 42, 36, 0.06);
}

.preview-card figcaption {
  padding: 11px 14px;
  color: rgba(47, 42, 36, 0.58);
  font-size: 12px;
  font-weight: 850;
}

.site-footer {
  display: flex;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(232, 223, 209, 0.86);
  padding: 34px 0 46px;
}

.site-footer p {
  margin: 10px 0 0;
  color: rgba(47, 42, 36, 0.52);
  font-size: 13px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer nav a {
  color: rgba(47, 42, 36, 0.58);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(47, 42, 36, 0.25);
  background-clip: content-box;
}

@media (max-width: 1080px) {
  .workspace-grid,
  .workspace-head {
    grid-template-columns: 1fr;
  }

  .workspace-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-grid {
    display: block;
  }

  .result-panel {
    margin-top: 22px;
  }

  .options,
  .score-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .section-block,
  .site-footer,
  .nav-inner {
    width: min(100% - 28px, 1220px);
  }

  .section-block {
    padding: 52px 0;
  }

  .workspace-shell {
    padding-top: 28px;
  }

  .input-panel,
  .result-panel,
  .compare-panel {
    padding: 18px;
  }

  .options,
  .score-row {
    grid-template-columns: 1fr;
  }

  .actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .actions .btn-primary,
  .actions .btn-secondary {
    width: 100%;
  }

  .site-footer {
    align-items: flex-start;
  }
}
