/* 越智通 · Web 工具页样式 v1.0 (2026-11-06)
   复用首页的深色+金配色变量；本文件只补工具页专用控件，不改动 styles.css */

.tool-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 96px 20px 64px;
}

.tool-hero { margin-bottom: 28px; }
.tool-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.28;
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}
.tool-hero p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.75;
  max-width: 760px;
}
.tool-crumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.tool-crumb a { color: var(--text-dim); text-decoration: none; }
.tool-crumb a:hover { color: var(--gold); }

/* ---- 卡片 ---- */
.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.tool-card h2 {
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--text);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-card h2 .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); display: inline-block;
}

/* ---- 汇率大数字 ---- */
.rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.rate-box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 18px 16px;
}
.rate-box .pair {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: .3px;
  margin-bottom: 6px;
}
.rate-box .val {
  font-size: clamp(26px, 4.4vw, 34px);
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.rate-box .sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.rate-stamp {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
}
.rate-stamp b { color: var(--text-dim); font-weight: 600; }

/* ---- 表单控件 ---- */
.field-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 140px;
  min-width: 0;
}
.field label {
  font-size: 12.5px;
  color: var(--text-dim);
}
.field input, .field select {
  width: 100%;
  box-sizing: border-box;
  background: var(--dark3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 16px;
  padding: 12px 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888a0' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field input:focus, .field select:focus {
  border-color: var(--border-active);
}
.field input::placeholder { color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #14140a;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 22px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-active);
  color: var(--gold-light);
}
.btn-ghost:hover { background: var(--gold-glow-soft); }

/* ---- 换算结果 ---- */
.convert-out {
  margin-top: 16px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  min-height: 28px;
}
.convert-out .eq {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
}

/* ---- 快捷标签 ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--dark3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.chip:hover { border-color: var(--border-active); color: var(--text); }
.chip.on {
  background: var(--gold-glow-soft);
  border-color: var(--gold);
  color: var(--gold-light);
  font-weight: 600;
}

/* ---- 关税结果 ---- */
.tar-item {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.tar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.tar-name { font-size: 16px; font-weight: 600; color: var(--text); }
.tar-hs {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--gold);
  background: var(--gold-glow-soft);
  border-radius: 5px;
  padding: 2px 8px;
}
.tar-vi { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.tar-rates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.tar-rate {
  background: var(--dark3);
  border-radius: 8px;
  padding: 9px 10px;
  text-align: center;
}
.tar-rate .k { font-size: 11.5px; color: var(--text-muted); display: block; margin-bottom: 3px; }
.tar-rate .v { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tar-rate .v.zero { color: #4ade80; }
.tar-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.tar-est {
  display: inline-block;
  font-size: 11px;
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.35);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
}

.empty, .loading, .err {
  padding: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
.err { color: #f87171; }

/* ---- CTA ---- */
.tool-cta {
  background: linear-gradient(135deg, rgba(212,175,55,.10), rgba(6,182,212,.06));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin: 26px 0 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.tool-cta .txt h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.tool-cta .txt p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.7; }

/* ---- 免责 / 数据来源 ---- */
.tool-disc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 22px;
}
.tool-disc a { color: var(--text-dim); }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
  .tool-wrap { padding: 84px 16px 48px; }
  .tool-card { padding: 18px 16px; }
  .field { flex: 1 1 100%; }
  .btn { width: 100%; }
  .tool-cta { flex-direction: column; align-items: stretch; text-align: left; }
  .rate-box .val { font-size: 28px; }
}

/* ---- CTA 内嵌小程序码（桌面端扫码，移动端隐藏） ---- */
.cta-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cta-qr img {
  width: 108px;
  height: 108px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
  display: block;
}
.cta-qr span {
  font-size: 11.5px;
  color: var(--text-muted);
}
@media (max-width: 640px) {
  .cta-qr { display: none; }
}
