:root {
  --bg: #f7f9f6;
  --card: #ffffff;
  --ink: #2f3a35;
  --muted: #6b7a72;
  --primary: #4a8a6f;
  --primary-dark: #3a6e58;
  --accent: #e8a33d;
  --line: #e3ebe6;
  --radius: 14px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { font-size: 22px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; }
.brand-tag { font-size: 12px; color: var(--muted); background: #eef4f0; padding: 3px 10px; border-radius: 999px; }

main { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }

.hero { text-align: center; padding: 28px 0 20px; }
.hero h1 { font-size: 28px; letter-spacing: -0.5px; }
.subtitle { color: var(--muted); margin-top: 8px; font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(47, 58, 53, 0.04);
}

.card h2 { font-size: 18px; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input,
.field select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fdfefe;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74,138,111,.14); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--primary); }

.result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.badge { font-size: 12px; color: var(--primary-dark); background: #eef4f0; padding: 4px 10px; border-radius: 999px; font-weight: 600; }

.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.output {
  font-size: 17px;
  line-height: 1.9;
  background: #fafcfb;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 20px;
  min-height: 80px;
  white-space: pre-wrap;
}
.output:not(:empty)::before { content: "「 "; color: var(--accent); font-weight: 700; }
.output:not(:empty)::after { content: " 」"; color: var(--accent); font-weight: 700; }

.feedback { margin-top: 14px; padding: 12px 14px; background: #fef9ef; border-left: 3px solid var(--accent); border-radius: 8px; font-size: 14px; color: #7a5a1e; }

.result-actions { margin-top: 18px; }

.tips { list-style: none; }
.tips li { padding: 8px 0 8px 22px; position: relative; font-size: 14px; border-bottom: 1px solid var(--line); }
.tips li:last-child { border-bottom: none; }
.tips li::before { content: "🌱"; position: absolute; left: 0; top: 8px; font-size: 13px; }

.disclaimer { font-size: 12px; color: var(--muted); margin-top: 16px; }

.site-footer { max-width: 760px; margin: 0 auto; padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.footer-links a { color: var(--primary-dark); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

@media (max-width: 480px) {
  .hero h1 { font-size: 23px; }
  .card { padding: 18px; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}
