/* 差评回复助手 · 大气简约风：中性底色、单一强调色、发丝线、单层淡影 */
:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --ink: #1a1d21;
  --ink-2: #5c6470;
  --ink-3: #9aa1ab;
  --line: #e6e6e1;
  --accent: #0e7a5f;
  --accent-dark: #0a5f4a;
  --accent-soft: #e7f3ef;
  --danger: #c2402a;
  --danger-soft: #fbeae6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.05), 0 8px 24px rgba(20, 24, 28, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700;
}
.brand-name { font-size: 16px; font-weight: 650; letter-spacing: 0.02em; }
.header-note { font-size: 12.5px; color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { padding: 44px 0 26px; }
.hero h1 {
  font-size: 32px; line-height: 1.3; font-weight: 750; letter-spacing: 0.01em;
}
.hero-sub { margin-top: 12px; font-size: 15.5px; color: var(--ink-2); max-width: 640px; }
.hero-sub strong { color: var(--accent-dark); font-weight: 650; }
.mobile-only { display: none; }

/* ---------- panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.input-panel { margin-bottom: 22px; }

.field { display: block; }
.field-row { display: flex; gap: 14px; margin-bottom: 14px; }
.field.grow { flex: 1; }
.field-label {
  display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px;
}
input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbfa;
  padding: 11px 13px;
  font: inherit; font-size: 15px; color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
textarea { resize: vertical; min-height: 104px; line-height: 1.6; }
input[type="text"]:focus, textarea:focus {
  outline: none; border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }

.input-foot {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 12px 0 16px;
}
.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.samples-label { font-size: 12.5px; color: var(--ink-3); }
.chip {
  font: inherit; font-size: 12.5px; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px; cursor: pointer;
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.char-count { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; padding-top: 4px; }

.primary-btn {
  width: 100%;
  font: inherit; font-size: 16px; font-weight: 650; letter-spacing: 0.04em;
  color: #fff; background: var(--accent);
  border: none; border-radius: 11px; padding: 13px 20px; cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}
.primary-btn:hover { background: var(--accent-dark); }
.primary-btn:active { transform: scale(0.99); }
.privacy-note { margin-top: 11px; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- result ---------- */
.result { margin-bottom: 22px; }
.detect-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  background: var(--danger-soft);
  border: 1px solid #f3d3cb;
  border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 16px;
}
.detect-label { font-size: 13px; font-weight: 650; color: var(--danger); }
.hit-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.hit-tag {
  font-size: 13px; font-weight: 600; color: #8f2d1b;
  background: #fff; border: 1px solid #efc4b9; border-radius: 999px; padding: 2px 11px;
}
.hit-tag.primary { background: var(--danger); border-color: var(--danger); color: #fff; }
.detail-note { font-size: 12.5px; color: #a0503f; }

.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
.reply-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}
.reply-card header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.reply-card h2 { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tone-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.tone-sincere { background: #d97706; }
.tone-professional { background: #2563eb; }
.tone-humorous { background: #0e7a5f; }
.copy-btn {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--accent-dark); background: var(--accent-soft);
  border: 1px solid transparent; border-radius: 8px; padding: 5px 14px; cursor: pointer;
  transition: all 0.18s ease;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.copied { background: var(--accent); color: #fff; }
.reply-text { font-size: 15px; color: #2b3038; white-space: pre-wrap; word-break: break-word; }
.tone-hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }

.result-actions { text-align: center; margin-top: 16px; }
.ghost-btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 22px; cursor: pointer; transition: all 0.18s ease;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- tips ---------- */
.tips-panel { margin-bottom: 30px; }
.tips-panel h2 { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.tips { list-style: none; counter-reset: tip; }
.tips li {
  counter-increment: tip;
  position: relative; padding: 9px 0 9px 40px;
  font-size: 14.5px; color: var(--ink-2);
  border-top: 1px solid var(--line);
}
.tips li:first-child { border-top: none; }
.tips li::before {
  content: counter(tip);
  position: absolute; left: 2px; top: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tips strong { color: var(--ink); }

/* ---------- footer / toast ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0 28px; }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-size: 12.5px; color: var(--ink-3);
}
.footer-sep { opacity: 0.5; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  background: #22262c; color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 10px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 50; max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
}
@media (max-width: 560px) {
  .hero { padding: 30px 0 20px; }
  .hero h1 { font-size: 27px; }
  .mobile-only { display: inline; }
  .panel { padding: 18px; }
  .header-note { display: none; }
  .input-foot { flex-direction: column; }
  .char-count { align-self: flex-end; }
  .reply-card { padding: 16px; }
}
