/* 澤田行情 tt-hq.com — 手機優先，風格同澤田貿易主站同一家族 */
:root {
  --bg: #f2f7f3;
  --bg-elev: #e4efe7;
  --card: #ffffff;
  --header: #e8f5e9;
  --header-line: #c5e0c8;
  --ink: #161b22;
  --navy: #1c2430;
  --accent: #2c3a4a;
  --link: #1e3a5f;
  --gold: #b8872c;
  --gold-soft: rgba(184, 135, 44, 0.14);
  --price: #161b22;
  --text: #1a1f26;
  --muted: #4a5560;
  --line: rgba(28, 35, 43, 0.14);
  --success: #1f7a4d;
  --wa: #25D366;
  --wa-dark: #1EBE57;
  --radius: 14px;
  --sticky-h: 72px;
  --max: 720px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  padding-bottom: calc(var(--sticky-h) + 16px);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 16px 0;
}
.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--header-line);
}
.site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}
.brand, a.brand {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
a.brand:hover, a.brand:focus-visible { text-decoration: none; color: var(--ink); }
.brand-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: #12161c;
  white-space: nowrap;
}
.brand-sub {
  margin-top: 1px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5a6270;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.updated {
  display: inline-flex;
  align-items: center;
  background: var(--gold-soft);
  color: #7a5a16;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.lang-switch:hover, .lang-switch:focus-visible {
  text-decoration: none;
  border-color: var(--gold);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 4px;
  margin-top: 4px;
  padding-top: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a.is-current {
  color: var(--navy);
  border-bottom-color: var(--gold);
}
.nav a:hover, .nav a:focus-visible { text-decoration: none; color: var(--navy); }
.hero { margin: 16px 0 12px; }
.hero h1 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
}
.hero p { margin: 0; color: var(--muted); font-size: 15px; }
.brands {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.brands-note { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.search {
  width: 100%;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
}
.search:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.install-card {
  position: relative;
  margin: 0 0 16px;
  padding: 14px 44px 14px 16px;
  background: var(--card);
  border: 1px solid var(--header-line);
  border-radius: var(--radius);
}
.install-title { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--ink); }
.install-text { margin: 0; font-size: 13px; color: var(--muted); }
.install-btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.install-close {
  appearance: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.fav-block { margin: 0 0 20px; }
.fav-note { margin: -4px 0 12px; font-size: 12px; color: var(--muted); }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.card-head .card-model { flex: 1 1 auto; min-width: 0; }
.fav-btn {
  appearance: none;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: -8px -8px 0 0;
  border: 0;
  background: transparent;
  color: #9AA3A0;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fav-btn svg { width: 22px; height: 22px; }
.fav-btn.is-on { color: var(--gold); }
.fav-btn:focus-visible { outline: 2px solid var(--gold); }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
}
.tab.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  opacity: 1;
  transition: opacity 0.18s ease;
}
.hot-grid.is-fading { opacity: 0; }
@media (min-width: 640px) {
  .hot-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card-model {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
  color: var(--ink);
}
.card-spec { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.card-price {
  margin: 10px 0 0;
  color: var(--price);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}
.card-price.is-pending { color: #8A9591; font-size: 18px; font-weight: 700; }
.card-change {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.card-change.is-up { color: var(--success); }
.card-change.is-down, .card-change.is-flat { color: var(--muted); }
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 44px;
  width: 100%;
  background: var(--wa);
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.wa-btn:hover, .wa-btn:focus-visible {
  background: var(--wa-dark);
  text-decoration: none;
  color: #fff;
}
.wa-btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.section-title {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.fav-block .section-title { margin-top: 8px; }
.notes {
  margin: 24px 0 16px;
  padding: 14px 16px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}
.notes p { margin: 0 0 6px; }
.notes p:last-child { margin-bottom: 0; }
.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.page-links button.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.site-footer {
  margin: 8px 0 16px;
  padding: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.site-footer p { margin: 0 0 4px; }
.wa-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--wa);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(18, 33, 27, 0.12);
}
.wa-sticky a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}
.wa-sticky a:hover, .wa-sticky a:focus-visible { color: #fff; text-decoration: none; }
.wa-sticky svg { width: 20px; height: 20px; }
@media (min-width: 640px) {
  .wa-sticky {
    left: 50%;
    right: auto;
    width: 400px;
    transform: translateX(-50%);
    border-radius: 12px 12px 0 0;
  }
}
.quote-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 16px;
}
.quote-form label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.quote-form .field { margin: 0 0 14px; }
.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
}
.quote-form textarea { min-height: 96px; resize: vertical; }
.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: 2px solid var(--gold);
  border-color: var(--gold);
}
.quote-form button[type="submit"] {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: var(--wa);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}
.quote-form button[type="submit"]:hover,
.quote-form button[type="submit"]:focus-visible { background: var(--wa-dark); }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
  margin-bottom: 12px;
}
.faq-item h2 { margin: 0; font-size: 16px; }
.faq-item button {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  padding: 12px 0;
  cursor: pointer;
  font-family: inherit;
}
.faq-item p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  display: none;
}
.faq-item.is-open p { display: block; }
.cta-official {
  display: block;
  margin: 8px 0 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.cta-official p { margin: 0 0 12px; font-size: 15px; }
.cta-official a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--navy);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}
.cta-official a.button:hover,
.cta-official a.button:focus-visible {
  filter: brightness(1.08);
  color: #fff;
  text-decoration: none;
}
.empty { padding: 24px 8px; text-align: center; color: var(--muted); }
.error {
  padding: 20px 16px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  color: var(--muted);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.index-search-panel[hidden],
.install-card[hidden],
.fav-block[hidden] { display: none !important; }

.brand-domain {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #1e3a5f;
}
.site-domain {
  margin: 0 0 6px !important;
  font-size: 14px !important;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}
