/* 小程序工具分包同款灰阶壳：页头 / 底栏 / 页脚 */
:root {
  --tmp-bg: #ececec;
  --tmp-surface: #fff;
  --tmp-text: #444;
  --tmp-muted: #666;
  --tmp-strong: #111827;
  --tmp-border: #d1d5db;
  --tmp-gold: #b8860b;
}
html, body {
  background: var(--tmp-bg);
}
.tmp-page {
  min-height: 100vh;
  padding: 12px 14px calc(88px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--tmp-text);
}
.tmp-sitebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.tmp-sitebar a {
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.tmp-sitebar-gold {
  color: #b8860b !important;
  font-weight: 700;
}
.tmp-hero {
  background: linear-gradient(160deg, #f7f7f7 0%, #fff 70%);
  border: 1px solid var(--tmp-border);
  border-radius: 10px;
  padding: 16px 14px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.tmp-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tmp-eyebrow {
  font-size: 11px;
  color: var(--tmp-muted);
  font-weight: 600;
  letter-spacing: .04em;
}
.tmp-h5 {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
  padding: 3px 10px;
  border-radius: 999px;
  text-decoration: none;
}
.tmp-title {
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 0;
  color: var(--tmp-strong);
  line-height: 1.3;
}
.tmp-desc {
  font-size: 13px;
  color: var(--tmp-muted);
  margin-top: 8px;
  line-height: 1.55;
}
.tmp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tmp-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f7f7f7;
  color: var(--tmp-muted);
  border: 1px solid var(--tmp-border);
}
.tmp-card {
  background: var(--tmp-surface);
  border: 1px solid var(--tmp-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.tmp-section { font-size: 15px; font-weight: 600; color: var(--tmp-strong); margin-bottom: 10px; }
.tmp-muted { color: var(--tmp-muted); font-size: 12px; }
.tmp-fields { display: flex; gap: 10px; }
.tmp-field { flex: 1; min-width: 0; }
.tmp-field label { display: block; font-size: 12px; color: var(--tmp-muted); margin-bottom: 4px; }
.tmp-field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--tmp-border);
  border-radius: 8px;
  background: #f7f7f7;
  font-size: 14px;
  box-sizing: border-box;
}
.tmp-drop {
  border: 1px dashed #9ca3af;
  border-radius: 10px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 13px;
  background: #f9fafb;
  cursor: pointer;
}
.tmp-check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }
.tmp-btn {
  display: block;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #333;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin: 12px 0;
}
.tmp-tabs {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  height: calc(48px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid #e5e7eb;
  z-index: 40;
}
.tmp-tabs a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #9ca3af;
  text-decoration: none;
}
.tmp-tabs a.is-on { color: #111827; font-weight: 600; }
.tmp-tabs a.is-gold {
  flex: 1.15;
  color: var(--tmp-gold);
  font-weight: 700;
  font-size: 14px;
}
.tmp-footer {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(48px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 8px 14px 10px;
  z-index: 39;
}
.tmp-footer-total { font-size: 16px; font-weight: 700; color: var(--tmp-strong); }
.tmp-footer-upper { font-size: 12px; color: var(--tmp-muted); margin-top: 2px; }
.tmp-footer-split {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--tmp-muted);
}
.tmp-footer-detail {
  margin-left: auto;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 2px 12px;
  font-size: 12px;
  color: #374151;
  background: #fff;
  cursor: pointer;
}
.tmp-intake {
  display: block;
  background: #f9fafb;
  border: 1px dashed #9ca3af;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
}
.tmp-intake-top { display: flex; justify-content: space-between; align-items: center; }
.tmp-intake-title { font-size: 15px; font-weight: 700; color: var(--tmp-strong); }
.tmp-intake-go { font-size: 13px; font-weight: 700; color: #374151; }
.tmp-label { font-size: 12px; color: var(--tmp-muted); margin: 4px 2px 8px; font-weight: 500; }
.tmp-task {
  display: block;
  background: #fff;
  border: 1px solid var(--tmp-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-decoration: none;
  color: inherit;
}
.tmp-task-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tmp-task-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--tmp-strong); }
.tmp-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #115e59;
  font-weight: 650;
}
.tmp-task-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }
.tmp-link { color: #374151; font-weight: 700; }
.tmp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.tmp-stats strong { display: block; font-size: 20px; color: var(--tmp-strong); }
.tmp-has-fee-footer .tmp-page,
.tmp-has-fee-footer .page,
.tmp-has-fee-footer body { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
.tmp-check-box {
  width: 16px;
  height: 16px;
  border: 1px solid #9ca3af;
  border-radius: 3px;
  flex-shrink: 0;
  background: #fff;
}
body:has(.tmp-tabs) .wrap {
  padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
}

/* 全站浮动中英文（工具子页 / 独立 H5） */
.h5-lang-float {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(229, 231, 235, 0.55);
  background: rgba(255, 255, 255, 0.42);
  color: #4b5563;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0;
  border-radius: 999px;
  cursor: pointer;
  min-width: 0;
  width: 28px;
  height: 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.h5-lang-float:active {
  background: rgba(243, 244, 246, 0.65);
}
body:has(.tmp-sitebar) .h5-lang-float {
  top: calc(48px + env(safe-area-inset-top, 0px));
}
@media (min-width: 640px) {
  .tmp-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px calc(88px + env(safe-area-inset-bottom));
  }
  .tmp-title { font-size: 26px; }
  .tmp-stats { gap: 12px; }
  .tmp-stats strong { font-size: 24px; }
}
@media (min-width: 768px) {
  .tmp-tabs {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .06);
  }
}
