:root {
  --ink: #192821;
  --muted: #6c766f;
  --paper: #f7f4ef;
  --card: rgba(255, 255, 255, 0.86);
  --line: #dedfd8;
  --green: #315f4d;
  --green-dark: #24483a;
  --mint: #dce9df;
  --peach: #efc6a9;
  --shadow: 0 22px 60px rgba(39, 57, 48, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 3%, rgba(239, 198, 169, 0.42), transparent 22rem),
    radial-gradient(circle at 0 34%, rgba(191, 215, 199, 0.42), transparent 24rem),
    var(--paper);
}
button, textarea, input { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, input:focus-visible { outline: 3px solid rgba(49, 95, 77, 0.2); outline-offset: 2px; }
.shell { width: min(100%, 1040px); margin: 0 auto; padding: 0 24px; }
.topbar { height: 88px; display: flex; align-items: center; justify-content: space-between; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.agent-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.agent-status i { width: 7px; height: 7px; border-radius: 50%; background: #d2a45f; box-shadow: 0 0 0 4px rgba(210,164,95,.12); }
.agent-status.online { color: var(--green); }
.agent-status.online i { background: #5c9d78; box-shadow: 0 0 0 4px rgba(92,157,120,.13); }
.agent-status.offline i { background: #9ca39e; box-shadow: none; }
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px 14px 14px 4px; color: white; background: var(--green); font: 700 19px/1 Georgia, serif; box-shadow: 0 8px 22px rgba(49, 95, 77, 0.2); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .16em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.install-button, .text-button, .regenerate-button { border: 0; background: transparent; cursor: pointer; }
.install-button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; color: var(--green); background: rgba(255,255,255,.55); }
.hero { text-align: center; padding: 76px 0 52px; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 18px; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .18em; }
.eyebrow span { width: 18px; height: 1px; background: currentColor; }
.hero h1 { margin: 0; font: 500 clamp(42px, 7vw, 74px)/1.12 Georgia, "Songti SC", serif; letter-spacing: -.035em; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy { margin: 24px 0 0; color: var(--muted); font-size: 16px; }
.privacy-pill { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin-top: 24px; padding: 8px 13px; border-radius: 18px; color: #52645a; background: rgba(220,233,223,.72); font-size: 12px; line-height: 1.45; text-align: left; }
.privacy-pill svg { flex: none; width: 15px; height: 15px; fill: currentColor; }
.privacy-pill span { min-width: 0; }
.composer-card { width: min(100%, 760px); margin: 0 auto; padding: 38px; border: 1px solid rgba(255,255,255,.75); border-radius: 30px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.section-heading, .option-title { display: flex; align-items: center; }
.section-heading { justify-content: space-between; }
.section-heading > div, .option-title { display: flex; align-items: center; gap: 11px; }
.section-heading h2, .option-title h2 { margin: 0; font-size: 16px; }
.step { color: #94a198; font: italic 13px/1 Georgia, serif; }
.text-button { color: var(--green); font-size: 13px; padding: 6px; }
.textarea-wrap { margin-top: 17px; padding: 5px 5px 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.78); transition: border-color .2s, box-shadow .2s; }
.textarea-wrap:focus-within { border-color: #9ab5a4; box-shadow: 0 0 0 4px rgba(49,95,77,.06); }
textarea { display: block; width: 100%; min-height: 132px; resize: vertical; border: 0; padding: 15px; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.7; }
textarea::placeholder { color: #a0a69f; }
textarea:focus { outline: 0; }
.textarea-actions { display: flex; align-items: center; justify-content: space-between; padding: 0 7px 0 12px; color: #9a9f9a; font-size: 11px; }
.textarea-actions > div { display: flex; gap: 5px; }
.paste-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; cursor: pointer; }
.paste-button { gap: 6px; padding: 8px 11px; color: var(--green); background: var(--mint); font-size: 12px; font-weight: 600; }
.paste-button svg, .icon-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-button { width: 32px; height: 32px; background: transparent; color: #8a928d; }
.image-input { margin-top: 12px; }
.upload-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 1px dashed #cbd2cb; border-radius: 15px; color: var(--green); background: rgba(245,247,243,.68); cursor: pointer; text-align: left; }
.upload-button:hover { border-color: #92aa9b; background: #f0f5f0; }
.upload-button svg { flex: none; width: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.upload-button span, .upload-button strong, .upload-button small { display: block; }
.upload-button strong { font-size: 13px; }
.upload-button small { margin-top: 3px; color: #929a94; font-size: 10px; font-weight: 400; }
.image-preview { display: flex; align-items: center; gap: 12px; padding: 9px; border: 1px solid var(--line); border-radius: 15px; background: #f4f6f2; }
.image-preview[hidden], .upload-button[hidden] { display: none; }
.image-preview img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: white; }
.image-preview div { min-width: 0; flex: 1; }
.image-preview strong, .image-preview small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview strong { font-size: 12px; }.image-preview small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.image-preview button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: #778078; background: white; cursor: pointer; font-size: 18px; }
.options-block { margin-top: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.chip { min-height: 39px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: #5f6862; background: rgba(255,255,255,.54); cursor: pointer; transition: .18s ease; }
.chip:hover { border-color: #9bb0a2; }
.chip.active { border-color: var(--green); color: white; background: var(--green); box-shadow: 0 6px 16px rgba(49,95,77,.16); }
.flirt-control { margin-top: 27px; padding: 18px 20px 15px; border-radius: 16px; background: #f2f2ed; }
.flirt-control > div:first-child { display: flex; justify-content: space-between; }
.flirt-control label { font-size: 14px; font-weight: 650; }
#flirtLabel { color: var(--green); font-size: 12px; font-weight: 700; }
input[type="range"] { width: 100%; margin: 16px 0 4px; accent-color: var(--green); }
.range-labels { display: flex; justify-content: space-between; color: #9a9f9b; font-size: 10px; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; min-height: 57px; margin-top: 30px; border: 0; border-radius: 16px; color: white; background: var(--green); cursor: pointer; font-weight: 700; box-shadow: 0 13px 25px rgba(49,95,77,.2); transition: transform .15s, background .15s; }
.primary-button:hover { background: var(--green-dark); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { cursor: wait; opacity: .72; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.form-note { margin: 13px 0 0; color: #949a95; text-align: center; font-size: 11px; }
.results { width: min(100%, 760px); margin: 58px auto 0; scroll-margin-top: 24px; }
.result-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.result-intro .eyebrow { justify-content: flex-start; margin-bottom: 10px; }
.result-intro h2 { margin: 0; font: 500 28px/1.25 Georgia, "Songti SC", serif; }
.result-intro > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.regenerate-button { flex: none; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--green); background: rgba(255,255,255,.5); font-size: 12px; }
.reply-list { display: grid; gap: 12px; }
.reply-card { position: relative; padding: 22px 22px 18px; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 10px 30px rgba(39,57,48,.06); animation: rise .38s both; }
.reply-card:nth-child(2) { animation-delay: .06s; }.reply-card:nth-child(3) { animation-delay: .12s; }.reply-card:nth-child(4) { animation-delay: .18s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.reply-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.reply-tag { padding: 5px 9px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 11px; font-weight: 700; }
.copy-button { display: inline-flex; align-items: center; gap: 5px; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.copy-button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.reply-text { margin: 0; font-size: 16px; line-height: 1.75; }
.reply-reason { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid #ecece6; color: #7d857f; font-size: 11px; line-height: 1.5; }
.how-it-works { padding: 100px 0 82px; text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; max-width: 760px; margin: 24px auto 0; }
.steps-grid article { padding: 26px 16px; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; background: rgba(255,255,255,.43); }
.steps-grid b { display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 12px; border-radius: 50%; color: white; background: var(--green); font: italic 13px Georgia, serif; }
.steps-grid h3 { margin: 0; font-size: 15px; }.steps-grid p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
footer { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.footer-brand { color: var(--ink); font-weight: 800; letter-spacing: .16em; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); padding: 11px 17px; border-radius: 999px; color: white; background: rgba(25,40,33,.93); box-shadow: 0 8px 30px rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: .24s; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 620px) {
  .shell { padding: 0 15px; }
  .topbar { height: 72px; }
  .agent-status > span { display: none; }
  .hero { padding: 52px 4px 38px; }
  .hero h1 { font-size: clamp(38px, 12vw, 54px); }
  .hero-copy { font-size: 14px; }
  .composer-card { padding: 24px 17px; border-radius: 23px; }
  .chip { flex: 1 0 auto; padding-inline: 12px; font-size: 13px; }
  .result-intro { align-items: flex-start; }
  .result-intro h2 { font-size: 24px; }
  .reply-card { padding: 19px 17px 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid article { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; text-align: left; padding: 18px; }
  .steps-grid b { grid-row: 1 / 3; margin: 0; align-self: center; }
  .steps-grid h3, .steps-grid p { margin-left: 8px; }
  .how-it-works { padding: 72px 0 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
