:root {
  --paper: #f4f6f8;
  --ink: #1c2430;
  --navy: #0d314e;
  --navy-soft: #1a4d73;
  --muted: #5c6770;
  --line: #e3e7ec;
  --field: #c5ced6;
  --card: #ffffff;
  --ok: #1f6b45;
  --shadow: 0 1px 2px #0d314e0a;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }

a { color: var(--navy-soft); }

button, input, select { font: inherit; color: inherit; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px max(24px, calc((100% - 960px) / 2 + 24px));
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand { flex: 1 1 auto; min-width: 0; }
.brand img {
  display: block;
  height: clamp(32px, 8vw, 48px);
  width: auto;
  max-width: min(240px, 62%);
  object-fit: contain;
  object-position: left center;
}

.header-side { flex: 0 1 auto; min-width: 0; text-align: right; }

.product {
  margin: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(0.75rem, 2.8vw, 0.95rem);
  line-height: 1.3;
}

main {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 24px 36px;
}

.hero { padding: 28px 0 8px; }

h1, h2, h3 { margin: 0; font-weight: 700; }

h1 {
  max-width: 16em;
  color: var(--navy);
  font-size: clamp(1.22rem, 4.6vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.finder {
  margin-top: 22px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field span {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
}

input[type="search"], select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--field);
  border-radius: 8px;
  font-size: 1rem;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--navy) 50%),
    linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

input[type="search"]:focus, select:focus, .memo input:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.hint, .disclaimer, .privacy, .panel-note, .fine, .meta {
  color: var(--muted);
  font-size: 14px;
}

.hint { margin: 8px 0 0; }

.tabs button, .more, .actions button, .actions a {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  color: var(--navy);
}

.more:hover, .actions button:hover {
  border-color: var(--navy-soft);
}

.filters {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.disclaimer { margin: 14px 4px 0; }

.results { margin-top: 22px; }

.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tabs { display: flex; gap: 8px; }

.tabs button {
  min-height: 40px;
  padding: 6px 14px;
}

.tabs button {
  border-radius: 8px;
  font-weight: 700;
}

.tabs button.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.count { margin: 0; font-weight: 700; }

.switchboard {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  border-radius: 12px;
}

.switchboard strong { margin-right: 8px; }
.switchboard, .disclaimer, .privacy, .where, .dept { overflow-wrap: anywhere; }

.privacy { margin: 10px 0 0; }

.cards {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.card {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.card.hit {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.where { margin: 0; color: var(--muted); font-size: 13px; }

.star {
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
}

.unit-name {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.dept { margin: 2px 0 0; color: var(--navy); font-size: 18px; font-weight: 700; line-height: 1.35; }

.nums {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 8px;
  margin-top: 10px;
}

.nums div {
  padding: 6px 10px;
  background: #f4f6f8;
  border-radius: 8px;
}

.nums span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nums strong {
  font-size: 16px;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.nums .missing { color: var(--muted); font-size: 16px; }

.note {
  margin: 10px 0 0;
  font-size: 14px;
}

.memo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.memo input {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.actions button, .actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}

.actions .call {
  background: var(--navy);
  border-color: var(--navy);
  border-radius: 8px;
  color: #fff;
  font-weight: 700;
}

.actions .call:hover { background: var(--navy-soft); }

.card .meta { margin: 8px 0 0; font-size: 13px; }

.empty {
  margin-top: 12px;
  padding: 22px 16px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.empty strong { display: block; margin-bottom: 4px; font-size: 18px; }

.more {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  color: var(--navy);
  font-weight: 700;
}

.panel { margin-top: 28px; }

.panel:not(.faq) details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 16px 12px;
  box-shadow: var(--shadow);
}

.faq {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.faq details {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 0;
}

.faq details:last-child { border-bottom: 1px solid var(--line); }

summary {
  min-height: 44px;
  padding: 4px 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
}

.faq p { margin: 8px 0 0; color: var(--muted); }

.panel-note { margin: 4px 0 12px; }

.coverage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.coverage article {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f9fb;
}

.coverage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.coverage h3 {
  margin: 0;
  min-width: 0;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.35;
}

.coverage .meta { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.coverage .meta a { white-space: nowrap; }

.status {
  display: inline-block;
  flex: none;
  margin-top: 1px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.ok { background: #e7f4ec; color: var(--ok); }

.faq h2 { margin: 0 0 10px; color: var(--navy); }

.site-footer {
  padding: 22px 24px 20px;
  background: var(--navy);
  color: #fffcf8b8;
}

.footer-inner {
  width: min(912px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 32px;
}

.footer-name {
  margin: 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-inner p { margin: 0; }

.footer-inner p + p {
  margin-top: 2px;
  font-size: 0.88rem;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.footer-contact a {
  color: #fff;
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.footer-contact a:hover { text-decoration: underline; }

.footer-contact a + a::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.75em;
  margin: 0 12px;
  background: #fffcf859;
  vertical-align: -0.05em;
}

.footer-note {
  width: min(912px, 100%);
  margin: 14px auto 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #fffcf88c;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  z-index: 30;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
}

@media (min-width: 720px) {
  .coverage { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 800px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .filters .field:first-child { grid-column: auto; }
}

@media (max-width: 800px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .footer-contact { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .site-header {
    padding-inline: 16px;
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .product { max-width: 7.2em; }
  main, .site-footer { padding-inline: 16px; }
  .site-footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .finder, .faq, .panel:not(.faq) details { padding: 16px; }
  .hero { padding-top: 20px; }
  .footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .footer-contact a + a::before { display: none; }
  .actions { flex-direction: column; }
}
