:root {
  --ink: #161618;
  --muted: #68686f;
  --soft: #f5f5f3;
  --paper: #fbfbfa;
  --card: #ffffff;
  --line: #dededa;
  --red: #e5483f;
  --red-dark: #bb2d27;
  --green: #147a53;
  --amber: #93600c;
  --shadow: 0 20px 55px rgba(22, 22, 24, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(22, 22, 24, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 24, .028) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.site-header, main, footer { width: min(1080px, calc(100% - 36px)); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px 10px 10px 3px;
  color: #fff;
  background: var(--red);
  font-size: 15px;
  font-weight: 900;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .035em; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.store-link {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .18s, color .18s, transform .18s;
}
.store-link:hover { border-color: var(--red); color: var(--red-dark); transform: translateY(-1px); }

.workspace {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(520px, 1.55fr);
  gap: clamp(30px, 5vw, 66px);
  align-items: start;
  padding: clamp(34px, 6vh, 62px) 0 46px;
}
.tool-intro, .tool-card, form { min-width: 0; }
.tool-intro { padding-top: 8px; }
.eyebrow, .section-label {
  margin: 0;
  color: var(--red-dark);
  font: 800 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .14em;
}
.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(20,122,83,.1); }
h1 {
  margin: 14px 0 16px;
  font-size: clamp(38px, 4.8vw, 58px);
  line-height: 1.08;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.lead { margin: 0; color: #4e4e54; font-size: 16px; line-height: 1.7; }
.quick-steps { display: grid; gap: 9px; margin: 24px 0 0; padding: 0; list-style: none; }
.quick-steps li { display: flex; align-items: center; gap: 10px; color: #444449; font-size: 13px; font-weight: 650; }
.quick-steps span { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #c9c9c5; border-radius: 7px; background: white; color: var(--red-dark); font: 800 11px ui-monospace, monospace; }
.privacy-note { display: flex; gap: 8px; margin: 22px 0 0; color: var(--green); font-size: 12px; line-height: 1.55; }
.privacy-note span { font-weight: 900; }

.tool-card {
  padding: clamp(22px, 3.2vw, 38px);
  border: 1px solid #d6d6d1;
  border-top: 4px solid var(--red);
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}
.tool-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.tool-heading h2 { margin: 6px 0 0; font-size: clamp(22px, 3vw, 31px); line-height: 1.2; letter-spacing: -.025em; }
.session-link {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #f0b7b2;
  border-radius: 9px;
  color: var(--red-dark);
  background: #fff5f4;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.session-link:hover { border-color: var(--red); background: #ffedeb; }
label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.label-hint { color: var(--muted); font-size: 12px; font-weight: 500; }
textarea {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 168px;
  resize: vertical;
  padding: 15px 16px;
  border: 1px solid #c7c7c2;
  border-radius: 11px;
  outline: none;
  background: #fafaf8;
  color: var(--ink);
  font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea:hover { border-color: #aaa9a3; }
textarea:focus { border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px rgba(229,72,63,.1); }
textarea::placeholder { color: #969690; }
.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 8px 0 16px; }
.field-meta p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.text-button { flex: 0 0 auto; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--ink); }
.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(187,45,39,.2);
  transition: background .18s, transform .18s, box-shadow .18s;
}
.primary-button:hover { background: #d83b33; transform: translateY(-1px); box-shadow: 0 13px 28px rgba(187,45,39,.24); }
.primary-button:focus-visible, .session-link:focus-visible, .store-link:focus-visible, .text-button:focus-visible, summary:focus-visible { outline: 3px solid rgba(229,72,63,.28); outline-offset: 3px; }
.primary-button:disabled { opacity: .62; cursor: wait; transform: none; }

.result { display: grid; grid-template-columns: 44px 1fr; gap: 15px; margin-top: 18px; padding: 18px; border: 1px solid; border-radius: 12px; }
.result[hidden] { display: none; }
.result-success { border-color: #b9decf; background: #eff9f4; }
.result-warning { border-color: #ead5a4; background: #fff8e8; }
.result-error { border-color: #efc1bc; background: #fff1ef; }
.result-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: white; background: var(--green); font-size: 21px; font-weight: 800; }
.result-warning .result-icon { background: var(--amber); }
.result-error .result-icon { background: var(--red-dark); }
.result-kicker { margin: 0 0 3px; color: var(--muted); font: 800 10px ui-monospace, monospace; letter-spacing: .1em; }
.result h3 { margin: 0; font-size: 19px; }
.result p:not(.result-kicker) { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.result dl { display: flex; flex-wrap: wrap; gap: 10px 25px; margin: 14px 0 0; }
.result dl div { min-width: 135px; }
.result dt { color: var(--muted); font-size: 10px; }
.result dd { margin: 3px 0 0; font-size: 13px; font-weight: 750; }

.support-row { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; padding: 24px 0 52px; border-top: 1px solid var(--line); }
details, .purchase-card { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); }
details summary { display: flex; justify-content: space-between; gap: 16px; padding: 17px 18px; font-size: 14px; font-weight: 750; cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary span:last-child { transform: rotate(45deg); }
.help-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0 18px 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.help-content p { margin: 0; }
.help-content strong { color: var(--ink); }
.purchase-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 17px; text-decoration: none; }
.purchase-card small, .purchase-card strong { display: block; }
.purchase-card small { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.purchase-card strong { font-size: 13px; }
.purchase-card:hover { border-color: var(--red); }

footer { display: flex; justify-content: space-between; gap: 25px; padding: 24px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer p { margin: 0; }
footer strong { color: var(--ink); }

@media (max-width: 820px) {
  .workspace { grid-template-columns: 1fr; gap: 22px; min-height: auto; padding: 26px 0 34px; }
  .tool-intro { display: grid; grid-template-columns: 1fr auto; column-gap: 18px; }
  .tool-intro .eyebrow, .tool-intro h1, .tool-intro .lead { grid-column: 1; }
  .quick-steps { grid-column: 2; grid-row: 1 / span 3; align-content: center; margin: 0; }
  .privacy-note { grid-column: 1 / -1; }
  .support-row { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
  .site-header, main, footer { width: min(100% - 24px, 1080px); }
  .site-header { min-height: 60px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand strong { font-size: 15px; }
  .store-link { padding: 8px 10px; font-size: 12px; }
  .workspace { gap: 14px; padding: 16px 0 26px; }
  .tool-intro { display: block; }
  .tool-intro { padding-top: 0; }
  h1 { margin: 9px 0 8px; font-size: clamp(30px, 9.6vw, 40px); line-height: 1.05; }
  .lead { font-size: 14px; line-height: 1.55; }
  .quick-steps { display: none; }
  .privacy-note { margin-top: 10px; font-size: 11px; }
  .tool-card { padding: 18px 16px; border-radius: 14px; }
  .tool-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 15px; }
  .tool-heading h2 { font-size: 19px; }
  .session-link { padding: 8px 9px; font-size: 12px; white-space: nowrap; }
  label { display: block; }
  .label-hint { display: block; margin-top: 2px; font-size: 11px; }
  textarea { min-height: 142px; padding: 13px; font-size: 12px; }
  .field-meta { margin-bottom: 12px; }
  .field-meta p { max-width: 82%; font-size: 10px; }
  .primary-button { min-height: 48px; }
  .result { grid-template-columns: 36px 1fr; padding: 15px; }
  .result-icon { width: 34px; height: 34px; border-radius: 8px; font-size: 18px; }
  .help-content { grid-template-columns: 1fr; gap: 10px; }
  footer { display: block; padding: 20px 0 26px; }
  footer p + p { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
