/* =========================================================
   查號碼 TaiwanCall — site.css
   ========================================================= */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-2: #2563eb;
  --primary-soft: #e8efff;
  --accent: #0891b2;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --ok: #047857;
  --ok-soft: #d1fae5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(29, 78, 216, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2e;
    --surface-2: #17223a;
    --text: #e6ebf5;
    --text-2: #c3cde0;
    --muted: #8a99b5;
    --border: #22304d;
    --primary: #6b9bff;
    --primary-2: #4f86ff;
    --primary-soft: #18264a;
    --accent: #38bdf8;
    --danger: #f87171;
    --danger-soft: #3b1518;
    --warn: #fbbf24;
    --warn-soft: #3a2a0c;
    --ok: #34d399;
    --ok-soft: #0f2e25;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; color: var(--text); letter-spacing: .01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
small { font-size: .82em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: -.18em; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 820px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }
.section { margin-top: 28px; }
.site-main { min-height: 60vh; padding-bottom: 48px; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.25rem; font-weight: 850; letter-spacing: .04em; }
.brand-text small { font-size: .68rem; color: var(--muted); letter-spacing: .12em; font-weight: 600; }
.logo-mark { display: block; border-radius: 10px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); }
.header-search { margin-left: auto; display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 14px; width: 220px; }
.header-search input { border: 0; background: transparent; outline: none; font: inherit; font-size: .92rem; width: 100%; color: var(--text); padding: 6px 0; }
.header-search button { border: 0; background: transparent; color: var(--muted); padding: 6px 8px; cursor: pointer; border-radius: 999px; display: flex; }
.header-search button:hover { color: var(--primary); }
.nav-toggle { display: none; margin-left: auto; border: 0; background: transparent; color: var(--text); padding: 8px; cursor: pointer; border-radius: 10px; }
.nav-toggle .i-close { display: none; }
@media (max-width: 960px) {
  .header-search { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--surface);
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .main-nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .main-nav a { padding: 12px 14px; font-size: 1.02rem; }
  body.nav-open .main-nav { max-height: 80vh; }
  body.nav-open .nav-toggle .i-open { display: none; }
  body.nav-open .nav-toggle .i-close { display: inline; }
}

/* ---------- 麵包屑、提示 ---------- */
.breadcrumb { margin: 16px 0 4px; font-size: .88rem; color: var(--muted); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--border); color: var(--muted); opacity: .6; }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--text-2); font-weight: 600; }
.notice { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.notice .icon { margin-top: 4px; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .96rem; line-height: 1.3; cursor: pointer;
  text-decoration: none !important; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--primary-2), var(--primary)); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--text); color: var(--surface); }
.btn-ghost { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }

/* ---------- 首頁 Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(56, 189, 248, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 120%, rgba(99, 102, 241, .45), transparent 60%),
    linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #0e7490 100%);
  padding: 56px 0 64px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .08;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); letter-spacing: .02em; margin-bottom: .4em; }
.hero-eyebrow { display: inline-flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 4px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600; }
.hero-lead { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: rgba(255, 255, 255, .9); max-width: 640px; margin: 0 auto 26px; }
.hero-hint { font-size: .86rem; color: rgba(255, 255, 255, .78); margin: 14px 0 0; }
.hero-stats { list-style: none; padding: 0; margin: 28px auto 0; display: flex; justify-content: center; gap: clamp(16px, 5vw, 56px); flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; }
.hero-stats span { font-size: .85rem; color: rgba(255, 255, 255, .8); }
@media (min-width: 600px) { .br-sm { display: none; } }

.big-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-lg);
  max-width: 720px; margin: 0 auto; border: 1px solid var(--border);
}
.big-search-icon { color: var(--muted); padding-left: 10px; display: flex; }
.big-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text);
  font: inherit; font-size: 1.12rem; font-weight: 600; padding: 12px 4px; letter-spacing: .02em;
}
.big-search input::placeholder { color: var(--muted); font-weight: 400; font-size: 1rem; }
.big-search .btn { padding: 12px 26px; font-size: 1.05rem; border-radius: 12px; }
@media (max-width: 520px) {
  .big-search input { font-size: 1rem; }
  .big-search .btn { padding: 12px 16px; }
  .big-search-icon { display: none; }
}

/* ---------- 版面區塊 ---------- */
.page-head { margin: 22px 0 8px; padding: 28px clamp(18px, 4vw, 40px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c, var(--primary)); }
.page-head h1 { margin-bottom: .3em; }
.page-head .lead { color: var(--text-2); font-size: 1.04rem; max-width: 760px; }
.page-head .big-search { margin: 18px 0 0; box-shadow: var(--shadow); max-width: 640px; }
.eyebrow { margin: 0 0 6px; font-size: .84rem; font-weight: 700; letter-spacing: .08em; color: var(--c, var(--primary)); }
.section-head { margin-bottom: 14px; }
.section-head h2 { margin-bottom: .2em; }
.section-head p { color: var(--muted); margin: 0; }
.section-head.with-link { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head.with-link a { font-weight: 600; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow);
}
.card + .card { margin-top: 20px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; margin-bottom: 14px; }
.card-title .icon { color: var(--primary); }
.card-title .count { margin-left: 4px; font-size: .8rem; background: var(--primary-soft); color: var(--primary); padding: 2px 10px; border-radius: 999px; }
.card-accent { background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid-2 > .card + .card { margin-top: 0; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.layout-2col { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
@media (min-width: 1000px) { .layout-2col { grid-template-columns: minmax(0, 1fr) 320px; } }
.main-col > * + * { margin-top: 20px; }
.sidebar > * + * { margin-top: 20px; }
@media (min-width: 1000px) { .sidebar { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; } }

/* ---------- 清單 ---------- */
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li + li { border-top: 1px dashed var(--border); }
.latest-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: baseline; padding: 10px 2px; color: var(--text-2); text-decoration: none; }
.latest-list a:hover .ll-num { color: var(--primary); text-decoration: underline; }
.ll-num { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ll-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .93rem; }
.ll-time { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.sidebar .latest-list a { grid-template-columns: 1fr auto; }
.sidebar .ll-msg { grid-column: 1 / -1; grid-row: 2; }
.link-list { list-style: none; margin: 0 0 14px; padding: 0; }
.link-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { color: var(--text-2); font-weight: 500; }
.link-list a:hover { color: var(--primary); }
.check-list { list-style: none; margin: 0 0 16px; padding: 0; }
.check-list li { position: relative; padding: 6px 0 6px 26px; font-size: .95rem; color: var(--text-2); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 14px; height: 8px; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; text-decoration: none !important; margin: 2px 0; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip small { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 0 7px; font-size: .75rem; }

/* ---------- 電信與縣市卡片 ---------- */
.carrier-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.carrier-card {
  --c: var(--primary); position: relative; display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px 16px;
  color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); overflow: hidden; transition: transform .15s ease, border-color .15s ease;
}
.carrier-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.carrier-card:hover { transform: translateY(-2px); border-color: var(--c); }
.carrier-card strong { font-size: 1.15rem; }
.carrier-card span { color: var(--muted); font-size: .85rem; }
.carrier-card small { margin-top: 8px; color: var(--c); font-weight: 700; }
.county-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.county-card { display: flex; flex-direction: column; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); }
.county-card:hover { border-color: var(--primary); }
.county-card strong { font-size: 1.02rem; }
.county-card span { font-size: .84rem; color: var(--muted); }
.prefix-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.prefix-grid a { display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none !important; font-variant-numeric: tabular-nums; }
.prefix-grid a:hover { border-color: var(--primary); background: var(--primary-soft); }
.prefix-grid strong { font-size: 1.15rem; letter-spacing: .04em; }
.prefix-grid small { color: var(--muted); font-size: .76rem; }
.num-grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); font-variant-numeric: tabular-nums; }
.num-grid-sm { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); }
.num { position: relative; display: block; text-align: center; padding: 6px 4px; border-radius: 8px; font-size: .86rem; color: var(--muted); background: var(--surface-2); text-decoration: none !important; }
a.num:hover { color: var(--primary); background: var(--primary-soft); }
.num.has { background: var(--primary-soft); color: var(--primary); font-weight: 800; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent); }
.num small { position: absolute; right: 4px; bottom: 1px; font-size: .62rem; opacity: .85; }

/* ---------- 步驟 ---------- */
.step-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step-n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; margin-bottom: 10px; }
.step-grid p { color: var(--text-2); margin: 0; font-size: .95rem; }

/* ---------- 號碼頁 ---------- */
.number-hero {
  --rc: var(--primary); --rs: var(--primary-soft);
  margin-top: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); padding: clamp(20px, 4vw, 34px); display: grid; gap: 20px; grid-template-columns: 1fr;
  position: relative; overflow: hidden;
}
.number-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--rc); }
.risk-high { --rc: var(--danger); --rs: var(--danger-soft); }
.risk-mid { --rc: var(--warn); --rs: var(--warn-soft); }
.risk-low { --rc: var(--ok); --rs: var(--ok-soft); }
.risk-none { --rc: var(--muted); --rs: var(--surface-2); }
@media (min-width: 900px) { .number-hero { grid-template-columns: 1.3fr 1fr; } .nh-actions { grid-column: 1 / -1; } }
.nh-type { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--muted); margin: 0 0 4px; font-size: .92rem; }
.nh-number { font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3rem); font-variant-numeric: tabular-nums; letter-spacing: .02em; margin: 0 0 12px; word-break: keep-all; }
.nh-number .js-copy { cursor: copy; }
.nh-q { display: block; font-size: .45em; font-weight: 700; color: var(--text-2); letter-spacing: .04em; }
.nh-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge-risk { background: var(--rs); color: var(--rc); border-color: transparent; }
.nh-risk-text { margin: 0; color: var(--text-2); }
.nh-facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-self: start; }
.nh-facts div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.nh-facts dt { font-size: .78rem; color: var(--muted); font-weight: 600; }
.nh-facts dd { margin: 2px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; }
.nh-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.kv { margin: 0; display: grid; gap: 0; }
.kv > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; word-break: break-word; }
.merchant-card { border-left: 5px solid var(--ok); }
.reports { list-style: none; margin: 0; padding: 0; }
.report { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }
.report + .report { margin-top: 10px; }
.report-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; color: var(--muted); margin-bottom: 4px; }
.report-author { font-weight: 700; color: var(--text-2); }
.report-text { margin: 0; word-break: break-word; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 18px 10px; background: var(--surface-2); border-radius: 12px; }
.empty p:last-child { margin: 0; }

/* ---------- 表單 ---------- */
.form label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 14px; color: var(--text-2); }
.form-row.two { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=search], textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; font: inherit; font-weight: 400; font-size: 1rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.big-search input, .header-search input { margin: 0; border: 0; background: transparent; box-shadow: none !important; padding-left: 4px; }
.opt, .req { font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-left: 4px; }
.opt { background: var(--surface-2); color: var(--muted); }
.req { background: var(--danger-soft); color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 14px; }
.quick-tags button { border: 1px dashed var(--border); background: transparent; color: var(--text-2); font: inherit; font-size: .84rem; padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.quick-tags button:hover { border-color: var(--primary); color: var(--primary); }
.captcha-slot { min-height: 0; margin: 4px 0 14px; }
.captcha-slot.loaded { min-height: 78px; }
.form-note { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.details-card > summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; list-style: none; }
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::after { content: "＋"; margin-left: auto; color: var(--primary); font-weight: 800; }
.details-card[open] > summary::after { content: "－"; }
.details-card[open] > summary { margin-bottom: 14px; }

/* ---------- 文章排版 ---------- */
.prose { font-size: 1.04rem; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.6em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--primary); font-weight: 700; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--text-2); }
.prose blockquote p:last-child { margin: 0; }
.prose strong { color: var(--text); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent); text-underline-offset: 3px; }
.callout { margin: 1.3em 0; padding: 14px 18px 14px 46px; border-radius: 12px; background: var(--primary-soft); position: relative; }
.callout::before { content: "i"; position: absolute; left: 14px; top: 15px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .8rem; display: grid; place-items: center; font-family: Georgia, serif; }
.callout.tip { background: var(--ok-soft); }
.callout.tip::before { content: "✓"; background: var(--ok); font-family: inherit; }
.callout.warn { background: var(--warn-soft); }
.callout.warn::before { content: "!"; background: var(--warn); font-family: inherit; }
.callout > :last-child { margin-bottom: 0; }
.table, .prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; display: table; }
.table th, .table td, .prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table thead th, .prose thead th { background: var(--surface-2); font-weight: 700; color: var(--text); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.2em; }
.table-wrap > table { margin: 0; min-width: 520px; }

/* ---------- 部落格 ---------- */
.post-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; overflow: hidden; }
.post-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.post-card a { display: flex; flex-direction: column; height: 100%; padding: 20px; color: var(--text); text-decoration: none !important; }
.post-card h3 { font-size: 1.08rem; margin: 10px 0 8px; }
.post-card p { color: var(--muted); font-size: .92rem; flex: 1; margin-bottom: 12px; }
.post-cat { align-self: flex-start; font-size: .75rem; font-weight: 800; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.cat-scam .post-cat { background: var(--danger-soft); color: var(--danger); }
.cat-block .post-cat { background: var(--warn-soft); color: var(--warn); }
.cat-privacy .post-cat { background: var(--ok-soft); color: var(--ok); }
.cat-guide .post-cat { background: var(--surface-2); color: var(--accent); }
.post-meta { font-size: .8rem; color: var(--muted); }
.cat-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.cat-nav a { padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none !important; }
.cat-nav a.active, .cat-nav a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.article { max-width: 780px; }
.article-head { margin: 24px 0 18px; }
.article-head h1 { font-size: clamp(1.6rem, 1.15rem + 2vw, 2.3rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .88rem; }
.article-desc { font-size: 1.1rem; color: var(--text-2); margin: 14px 0 0; }
.toc { background: var(--surface-2); border-radius: 12px; padding: 14px 18px; margin: 0 0 24px; }
.toc strong { display: block; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 3px 0; }
.toc a { color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; }
.tags span { font-size: .82rem; background: var(--surface-2); color: var(--muted); padding: 3px 10px; border-radius: 999px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0 0; }
.pagination a, .pagination span { min-width: 40px; text-align: center; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; color: var(--text-2); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 20px; font-size: .9rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { margin-top: 28px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; color: var(--primary); font-weight: 800; }
.faq details[open] summary::after { content: "－"; }
.faq-a { margin-top: 10px; color: var(--text-2); }

/* ---------- 工具 ---------- */
.tool-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tool-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; }
.tool-card:hover { border-color: var(--primary); }
.tool-card .ti { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tool-card strong { display: block; }
.tool-card span { font-size: .88rem; color: var(--muted); }
.result-box { margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--surface-2); min-height: 60px; font-size: 1.05rem; }
.result-big { font-size: clamp(1.6rem, 1rem + 3vw, 2.6rem); font-weight: 800; color: var(--primary); text-align: center; font-variant-numeric: tabular-nums; word-break: break-all; }
.balls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ball { min-width: 52px; height: 52px; padding: 0 10px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--primary-2), var(--accent)); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent); animation: pop .35s ease both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.calc { max-width: 420px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.calc-wide { max-width: 560px; }
.calc-display { background: var(--surface-2); border-radius: 14px; padding: 12px 16px; text-align: right; margin-bottom: 12px; min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.calc-expr { color: var(--muted); font-size: .95rem; min-height: 1.4em; word-break: break-all; font-family: var(--mono); }
.calc-out { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; word-break: break-all; line-height: 1.25; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-wide .calc-keys { grid-template-columns: repeat(5, 1fr); }
.calc-keys button { border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 1.1rem; padding: 14px 4px; border-radius: 12px; cursor: pointer; }
.calc-keys button:hover { background: var(--surface-2); }
.calc-keys .op { background: var(--primary-soft); color: var(--primary); }
.calc-keys .eq { background: var(--primary); color: #fff; border-color: var(--primary); }
.calc-keys .fn { font-size: .92rem; color: var(--text-2); }
.calc-keys .clr { color: var(--danger); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: .9rem; }
.calendar .dow { font-weight: 700; color: var(--muted); font-size: .8rem; }
.calendar .d { padding: 8px 0; border-radius: 8px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.calendar .d.period { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.calendar .d.fertile { background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.calendar .d.ovu { background: var(--ok); color: #fff; font-weight: 800; }
.calendar .d.blank { background: transparent; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; margin-top: 10px; color: var(--text-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 4px; vertical-align: -1px; }

/* ---------- 錯誤頁 ---------- */
.error-page { text-align: center; padding: 48px 0 16px; }
.error-code { font-size: clamp(4rem, 10vw, 7rem); font-weight: 900; line-height: 1; margin: 0; background: linear-gradient(135deg, var(--primary-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page .big-search { margin: 20px auto; }
.error-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- 贊助、頁尾 ---------- */
.sponsors { margin-top: 8px; margin-bottom: 32px; text-align: center; }
.sponsors.sponsors-top { margin-top: 24px; margin-bottom: 0; }
.sponsors-label { font-size: .75rem; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.sponsors-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.sponsors-grid img { display: block; border-radius: 10px; width: 300px; max-width: 100%; }
.site-footer { background: #0b1220; color: #a9b6cc; padding: 48px 0 0; font-size: .92rem; }
.site-footer a { color: #d4dced; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; } }
.footer-about { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-about { grid-column: auto; } }
.site-footer h2 { font-size: .95rem; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #7f8ba3; }
.footer-about p { margin: 14px 0 0; max-width: 360px; }
.footer-hotline { display: flex; gap: 6px; align-items: center; color: #fcd34d; font-weight: 600; }
.footer-hotline a { color: #fcd34d; font-weight: 800; }
.footer-bottom { margin-top: 36px; padding: 18px 16px 28px; border-top: 1px solid #1d2840; font-size: .82rem; color: #7f8ba3; }
.footer-bottom p { margin: 0; }
.to-top { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--primary); border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem; z-index: 90; animation: pop .2s ease; }

@media print {
  .site-header, .site-footer, .sponsors, .sidebar, .to-top, form, .nh-actions { display: none !important; }
  body { background: #fff; }
  .card, .number-hero { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
