:root {
  --ink: #1e2a2f;
  --muted: #69777d;
  --surface: #ffffff;
  --surface-2: #f5f8f6;
  --line: #d8e2dd;
  --teal: #24a892;
  --teal-dark: #137b6c;
  --coral: #ff705f;
  --gold: #f8bd45;
  --blue: #3f7fd3;
  --shadow: 0 18px 45px rgba(38, 73, 69, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fbfcfa;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

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

svg {
  display: block;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(251, 252, 250, 0.9);
  border-bottom: 1px solid rgba(216, 226, 221, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.08rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
  background: #e1f5ef;
  border: 1px solid #b9e7dc;
  border-radius: 8px;
}

.brand-mark svg {
  fill: rgba(36, 168, 146, 0.15);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.top-nav a,
.text-button {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 8px;
}

.top-nav a:hover,
.text-button:hover {
  color: var(--ink);
  background: #edf4f1;
}

.ghost-button,
.primary-button,
.secondary-button,
.primary-link,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.ghost-button {
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.ghost-button:hover,
.secondary-button:hover,
.icon-button:hover {
  border-color: #9ed9cd;
  box-shadow: 0 8px 22px rgba(38, 73, 69, 0.1);
}

.primary-button,
.primary-link {
  padding: 0 18px;
  color: #ffffff;
  background: var(--teal-dark);
  box-shadow: 0 12px 24px rgba(19, 123, 108, 0.2);
}

.primary-button:hover,
.primary-link:hover {
  transform: translateY(-1px);
  background: #0f6d61;
}

.secondary-button {
  padding: 0 16px;
  color: var(--teal-dark);
  background: #e9f7f3;
  border-color: #bfe4db;
}

.secondary-button:disabled {
  color: #9ca8ad;
  cursor: not-allowed;
  background: #f0f2f1;
  border-color: #dde5e1;
  box-shadow: none;
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  color: var(--muted);
  background: var(--surface);
  border-color: var(--line);
}

.hero-band,
.tool-band,
.compare-band,
.results-band,
.seo-band,
.faq-band {
  padding: clamp(36px, 6vw, 72px) clamp(16px, 4vw, 56px);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
  align-items: center;
  min-height: min(500px, calc(100vh - 68px));
  padding-top: clamp(28px, 4vw, 52px);
  padding-bottom: clamp(28px, 4vw, 52px);
  background:
    linear-gradient(135deg, rgba(225, 245, 239, 0.92), rgba(255, 247, 230, 0.42)),
    radial-gradient(circle at 82% 22%, rgba(255, 112, 95, 0.16), transparent 34%),
    #fbfcfa;
}

.hero-copy,
.section-heading,
.workspace-grid,
.compare-grid,
.result-grid,
.seo-grid,
.faq-list {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.hero-copy {
  margin-left: 0;
  padding-right: clamp(10px, 3vw, 42px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 660px;
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 4.8vw, 4.7rem);
  line-height: 1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.04rem;
  line-height: 1.3;
}

.hero-lead {
  max-width: 600px;
  margin-bottom: 20px;
  color: #46565d;
  font-size: clamp(1rem, 2vw, 1.24rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.format-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.format-strip span {
  min-width: 62px;
  padding: 8px 12px;
  color: var(--ink);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(38, 73, 69, 0.08);
}

.hero-visual {
  width: min(660px, 100%);
  margin-left: auto;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.tool-band,
.results-band {
  background: var(--surface);
}

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

.upload-panel,
.settings-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(38, 73, 69, 0.08);
}

.upload-panel {
  padding: 14px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 24px;
  text-align: center;
  border: 2px dashed #a9d9cf;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
    repeating-linear-gradient(135deg, rgba(36, 168, 146, 0.1) 0 8px, transparent 8px 18px);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
  outline: none;
  border-color: var(--teal-dark);
  background: #e8f8f4;
  transform: translateY(-1px);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  color: var(--teal-dark);
  background: #ffffff;
  border: 1px solid #ccece4;
  border-radius: 8px;
}

.drop-icon svg {
  width: 32px;
  height: 32px;
}

.drop-title {
  display: block;
  margin-bottom: 8px;
  font-size: 1.3rem;
  font-weight: 800;
}

.drop-copy {
  display: block;
  max-width: 320px;
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.drop-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--coral);
  border-radius: 8px;
}

.upload-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin-top: 14px;
  padding: 0 14px;
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-summary span {
  color: var(--muted);
}

.upload-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.upload-thumb {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-thumb img {
  width: 64px;
  height: 56px;
  object-fit: cover;
  background: #eef3f1;
  border-radius: 6px;
}

.upload-thumb strong,
.upload-thumb span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-thumb strong {
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.upload-thumb span {
  color: var(--muted);
  font-size: 0.82rem;
}

.upload-thumb button {
  width: 34px;
  height: 34px;
  color: #b34335;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.upload-thumb button:hover {
  border-color: #f0b0a7;
}

.ad-slot {
  display: grid;
  gap: 6px;
  min-height: 112px;
  margin-top: 14px;
  padding: 16px;
  color: #815a07;
  background: #fff6df;
  border: 1px solid #f3d58a;
  border-radius: 8px;
}

.ad-slot span {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-panel {
  padding: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: #eef5f2;
  border-radius: 8px;
}

.segmented-item {
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.segmented-item.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(38, 73, 69, 0.1);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.control {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 20px;
  font-size: 0.92rem;
}

.control select,
.control input[type="range"] {
  width: 100%;
}

.control select,
.control input[type="number"] {
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.number-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
}

.number-field input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.number-field span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--muted);
  background: #f6faf8;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.quality-control {
  grid-column: span 2;
}

input[type="range"] {
  accent-color: var(--teal-dark);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.progress-area {
  margin-top: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #ecf2ef;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width 220ms ease;
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  background: #eef8f5;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
}

.privacy-note span {
  color: var(--muted);
}

.compare-band {
  background: #f2f7f5;
}

.compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.compare-stage,
.compare-stats {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(38, 73, 69, 0.08);
}

.compare-stage {
  position: relative;
  display: grid;
  min-height: 430px;
  overflow: hidden;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 430px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 58px;
  height: 58px;
  color: #a7b8b2;
}

.compare-view {
  position: relative;
  width: 100%;
  min-height: 430px;
  --compare-pos: 50%;
}

.compare-view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7faf8;
}

.compare-after {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--compare-pos));
}

.compare-label {
  position: absolute;
  top: 14px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(30, 42, 47, 0.82);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(30, 42, 47, 0.16);
  pointer-events: none;
}

.compare-label-before {
  left: 14px;
}

.compare-label-after {
  right: 14px;
  background: rgba(19, 123, 108, 0.88);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-pos);
  z-index: 4;
  width: 0;
  pointer-events: none;
}

.compare-divider::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  width: 4px;
  content: "";
  background: var(--coral);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.78), 0 0 22px rgba(255, 112, 95, 0.42);
}

.compare-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: var(--coral);
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(30, 42, 47, 0.22);
  transform: translate(-50%, -50%);
}

.compare-divider span::before,
.compare-divider span::after {
  position: absolute;
  width: 9px;
  height: 9px;
  content: "";
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.compare-divider span::before {
  left: 12px;
  transform: rotate(-45deg);
}

.compare-divider span::after {
  right: 12px;
  transform: rotate(135deg);
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 6;
  width: 100%;
  height: 100%;
  cursor: ew-resize;
  opacity: 0;
}

.compare-stats {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.compare-stats div {
  display: grid;
  gap: 6px;
  min-height: 78px;
  padding: 12px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compare-stats span {
  color: var(--muted);
  font-size: 0.88rem;
}

.compare-stats strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-height: 120px;
}

.result-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(38, 73, 69, 0.08);
  animation: riseIn 220ms ease both;
}

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef3f1;
  border-radius: 8px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 5px 8px;
  color: #ffffff;
  font-size: 0.78rem;
  background: rgba(30, 42, 47, 0.78);
  border-radius: 999px;
}

.file-name {
  min-height: 24px;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  color: var(--muted);
  background: #f7faf8;
  border-radius: 8px;
}

.metric-grid strong {
  color: var(--ink);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  gap: 8px;
}

.card-actions button,
.card-actions a {
  min-width: 0;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.mini-button:hover {
  border-color: #9ed9cd;
}

.mini-button.danger {
  color: #b34335;
}

.seo-band {
  background: #26363a;
  color: #ffffff;
}

.seo-band .eyebrow {
  color: #8ce6d2;
}

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

.seo-grid article {
  min-height: 178px;
  padding: 20px;
  color: #edf8f5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
}

.seo-grid p {
  margin-bottom: 0;
  color: #cbd9d6;
  line-height: 1.7;
}

.sponsor-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(36, 168, 146, 0.24), rgba(248, 189, 69, 0.16)),
    rgba(255, 255, 255, 0.08);
}

.sponsor-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 16px;
  color: #26363a;
  font-size: 0.78rem;
  font-weight: 800;
  background: #8ce6d2;
  border-radius: 999px;
}

.faq-band {
  background: #fbfcfa;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

summary {
  min-height: 54px;
  padding: 16px 18px;
  font-weight: 800;
  cursor: pointer;
}

details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 24px clamp(16px, 4vw, 56px);
  color: #dce8e5;
  background: #1e2a2f;
}

.site-footer span {
  margin-right: auto;
  font-weight: 800;
}

.site-footer a {
  color: #dce8e5;
}

.member-dialog {
  width: min(560px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.member-dialog::backdrop {
  background: rgba(30, 42, 47, 0.45);
}

.member-dialog form {
  padding: 18px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.plan-grid article {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  background: #f6faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-grid span,
.dialog-note {
  color: var(--muted);
}

.full-button {
  width: 100%;
}

.dialog-note {
  margin: 12px 0 0;
  text-align: center;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #ffffff;
  background: rgba(30, 42, 47, 0.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-band,
  .workspace-grid,
  .compare-grid {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero-visual {
    margin: 22px auto 0;
  }

  .result-grid,
  .seo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 10px;
  }

  .top-nav {
    display: none;
  }

  .hero-band,
  .tool-band,
  .compare-band,
  .results-band,
  .seo-band,
  .faq-band {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .drop-zone {
    min-height: 260px;
  }

  .control-grid,
  .result-grid,
  .seo-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .quality-control {
    grid-column: auto;
  }

  .action-row .primary-button,
  .action-row .secondary-button {
    flex: 1 1 180px;
  }

  .compare-stage,
  .empty-state,
  .compare-view {
    min-height: 320px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}
