:root {
  --bg: #f4f8f6;
  --card: #ffffff;
  --text: #17241f;
  --muted: #66796f;
  --line: #dce8e1;
  --accent: #127a58;
  --accent-dark: #0c6246;
  --accent-soft: #e3f3ec;
  --ok: #0f9d58;
  --input-bg: #f8fcfa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 60, 42, .05), 0 8px 24px rgba(18, 60, 42, .08);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- 顶栏 ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .3px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #127a58, #2fa87c);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  flex: none;
}

.brand small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  letter-spacing: 0;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-right a {
  font-size: 14px;
  color: var(--muted);
  transition: color .18s;
}

.header-right a:hover { color: var(--accent); }

/* ---------- 首页主体 ---------- */
.hero {
  padding: 46px 0 10px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: .5px;
}

.hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 28px 0 10px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: block;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #b9d6c8;
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.card .tagline {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- 工具页 ---------- */
.page-head {
  padding: 30px 0 6px;
}

.crumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.crumb a:hover { color: var(--accent); }

.page-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin: 18px 0;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.field {
  margin-bottom: 16px;
}

.field:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #374151;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 122, 88, .14);
}

textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.row > .field { flex: 1 1 200px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 9px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background .16s, transform .1s;
}

.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: #fff;
  color: var(--accent);
  border: 1px solid #bcdccd;
}

.btn.ghost:hover { background: var(--accent-soft); }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.result {
  margin-top: 16px;
  background: #f2f9f5;
  border: 1px dashed #cbe4d8;
  border-radius: 10px;
  padding: 16px;
}

.result.hidden { display: none; }

.result .big {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .5px;
}

.result .kv {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #e5f1ea;
  font-size: 14px;
}

.result .kv:last-child { border-bottom: none; }

.result .kv span:first-child { color: var(--muted); }

.result .kv span:last-child { font-weight: 600; }

.hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
}

pre.out {
  margin: 0;
  padding: 14px;
  background: #0f172a;
  color: #d7e3ff;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 340px;
  overflow: auto;
  font-family: Consolas, "Courier New", monospace;
}

/* ---------- 联系方式 ---------- */
.contact-block {
  margin-top: 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.contact-main { flex: 1 1 320px; }

.contact-main h2 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: .3px;
}

.contact-main > p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
}

.contact-list li span {
  flex: none;
  width: 42px;
  color: var(--muted);
  font-size: 13px;
}

.contact-list li b {
  font-weight: 600;
  letter-spacing: .2px;
}

.contact-qr {
  flex: none;
  text-align: center;
}

.contact-qr .qr-box {
  width: 132px;
  height: 132px;
  border: 1px dashed #c2dccf;
  border-radius: 12px;
  background: var(--input-bg);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.contact-qr p {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 46px;
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .sign {
  margin-top: 6px;
  font-size: 12.5px;
  color: #97a9a0;
  letter-spacing: .3px;
}

/* ---------- 手机适配 ---------- */
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header .inner { height: 58px; }
  .brand small { display: none; }
  .hero { padding: 30px 0 6px; }
  .hero h1 { font-size: 23px; }
  .grid { grid-template-columns: 1fr; gap: 12px; padding-top: 20px; }
  .panel { padding: 18px 15px; }
  .page-head h1 { font-size: 20px; }
  .row { gap: 10px; }
  .row > .field { flex: 1 1 100%; }
  .btn { width: 100%; }
  .actions .btn { width: 100%; }
  .contact-block { padding: 20px 18px; gap: 18px; margin-top: 24px; }
  .contact-main h2 { font-size: 18px; }
  .contact-qr { margin: 0 auto; }
}
