@import url("https://fonts.googleapis.com/css2?family=ZCOOL+KuaiLe&display=swap");

:root {
  color-scheme: light;
  --paper: #fdfbf7;
  --ink: #111111;
  --muted: #6c6c6c;
  --soft: #fafafa;
  --yellow: #facc15;
  --yellow-soft: #fef3c7;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "ZCOOL KuaiLe", "Microsoft YaHei", "PingFang SC", cursive, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 42px 18px 80px;
}

.hero {
  text-align: center;
  margin-bottom: 42px;
}

.headline-wrap,
.section-title {
  position: relative;
  display: inline-block;
}

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

h1 {
  font-size: clamp(52px, 7vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  margin-top: 18px;
  color: #2f2f2f;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
}

.hero-note {
  max-width: 660px;
  margin-inline: auto;
  color: var(--muted) !important;
  font-size: clamp(15px, 1.8vw, 18px) !important;
  line-height: 1.6;
}

.scribble-line {
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 100%;
  height: 18px;
  color: var(--yellow);
  pointer-events: none;
}

.scribble-line path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 3.5;
}

.paper-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.11);
}

.upload-card {
  padding: clamp(28px, 5vw, 48px);
}

.upload-zone {
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 2px dashed var(--ink);
  border-radius: 18px;
  background: var(--soft);
  cursor: pointer;
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  background: #fffdf0;
  transform: translateY(-2px);
}

.upload-zone strong {
  font-size: 30px;
  font-weight: 900;
}

.upload-zone span:not(.upload-badge) {
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
}

.upload-zone small {
  color: #9a9a9a;
  font-size: 15px;
  font-weight: 700;
}

.upload-badge {
  width: 80px;
  height: 80px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow-soft);
}

.upload-badge svg {
  width: 42px;
  height: 42px;
}

.workbench {
  display: grid;
  gap: 28px;
}

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

.preview-box {
  display: grid;
  gap: 10px;
  text-align: center;
}

.preview-box h3 {
  font-size: 24px;
  font-weight: 900;
}

.image-frame {
  position: relative;
  aspect-ratio: var(--preview-aspect-ratio, 4 / 3);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: #f4f4f4;
}

.image-frame img,
.image-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-frame {
  background:
    linear-gradient(45deg, #ececec 25%, transparent 25%),
    linear-gradient(-45deg, #ececec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ececec 75%),
    linear-gradient(-45deg, transparent 75%, #ececec 75%);
  background-color: #fff;
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
}

.placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  color: #868686;
  font-size: 18px;
}

.placeholder svg {
  width: 54px;
  height: 54px;
  opacity: 0.7;
}

.arrow-mark {
  color: #a3a3a3;
  align-self: center;
  padding-top: 34px;
}

.arrow-mark svg {
  width: 38px;
  height: 38px;
}

.action-area {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding-top: 24px;
  border-top: 2px dashed #d4d4d4;
}

.field {
  display: grid;
  gap: 8px;
  text-align: left;
}

.field span {
  font-size: 20px;
  font-weight: 900;
}

.field input {
  height: 54px;
  width: 100%;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  outline: none;
  background: #fafafa;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.field input:focus {
  background: #fffef0;
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.35);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.sketch-button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--ink);
  border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px;
  background: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease,
    opacity 0.12s ease;
}

.sketch-button:hover {
  background: #f5f5f5;
}

.sketch-button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.sketch-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.sketch-button.primary {
  background: var(--yellow);
}

.sketch-button.primary:hover {
  background: #fde047;
}

.message {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.message.is-error {
  color: var(--danger);
}

.message.is-success {
  color: #166534;
}

.examples {
  margin-top: 88px;
  text-align: center;
}

.section-title h2 {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 900;
  line-height: 1;
}

.scribble-line.small {
  bottom: -13px;
  height: 16px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  margin: 48px auto 0;
  max-width: 930px;
}

.example-card {
  padding: 16px;
  transform: rotate(-1.6deg);
}

.example-card:nth-child(2) {
  transform: rotate(1.4deg);
}

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

.sample {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1.8px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}

.sample span {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  padding: 5px 9px;
  border-radius: 6px 8px 6px 8px;
  color: #fff;
  background: #000;
  font-size: 13px;
  font-weight: 900;
}

.sample img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.example-card h3 {
  margin-top: 12px;
  font-size: clamp(22px, 2.6vw, 26px);
  font-weight: 900;
  line-height: 1;
}

.example-card p {
  margin-top: 8px;
  color: var(--muted);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.seo-section {
  margin-top: 86px;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 44px;
}

.info-card {
  padding: 22px 18px;
  text-align: left;
}

.info-card h3,
.step-list h3 {
  font-size: 22px;
  font-weight: 900;
}

.info-card p,
.step-list p,
.faq-item p {
  color: #3f3f3f;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.info-card p {
  margin-top: 10px;
}

.step-list {
  counter-reset: steps;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.step-list li {
  position: relative;
  min-height: 170px;
  padding: 58px 18px 20px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff;
}

.step-list li::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  top: 16px;
  left: 18px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 20px;
  font-weight: 900;
}

.step-list p {
  margin-top: 8px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 12px 18px;
  border: 2px solid var(--ink);
  border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
  background: #fff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.13);
  font-size: 18px;
  font-weight: 900;
}

.advice-list {
  display: grid;
  gap: 12px;
  margin: 44px auto 0;
  padding: 24px 30px;
  max-width: 760px;
  list-style-position: inside;
  text-align: left;
  color: #353535;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
}

.faq-section {
  padding-bottom: 8px;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 44px;
  text-align: left;
}

.faq-item {
  padding: 18px 22px;
}

.faq-item summary {
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

.faq-item p {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .page-shell {
    padding-top: 32px;
  }

  .upload-card {
    padding: 20px;
  }

  .upload-zone {
    min-height: 260px;
    padding: 24px;
  }

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

  .arrow-mark {
    display: none;
  }

  .action-area {
    grid-template-columns: 1fr;
  }

  .button-row {
    justify-content: stretch;
  }

  .sketch-button {
    flex: 1 1 100%;
  }

  .example-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .info-grid,
  .step-list {
    grid-template-columns: 1fr;
  }

  .seo-section {
    margin-top: 64px;
  }

  .tag-list {
    justify-content: stretch;
  }

  .tag-list li {
    flex: 1 1 100%;
    text-align: center;
  }
}

@media (max-width: 440px) {
  h1 {
    font-size: 46px;
  }

  .hero p {
    font-size: 17px;
  }

  .upload-zone strong {
    font-size: 25px;
  }

  .upload-zone span:not(.upload-badge) {
    font-size: 17px;
  }
}
