/* BT Elastic 0.29.0 — 搜尋 v2（Joey TG 1889 #3）：標頭搜尋框、手機搜尋鈕與搜尋列、搜尋結果頁。
   只用 bt- 開頭的新 class，跟 jNews 並存；搜尋框下拉／全螢幕搜尋的樣式由 bt-search.js 自己帶（舊快取頁面也能用）。 */
:root {
  --bts-ink: #16171b; --bts-ink2: #383a42; --bts-mute: #666973; --bts-faint: #868992;
  --bts-line: #e7e5e1; --bts-line2: #d3d1cc; --bts-wash: #f6f5f2; --bts-wash2: #eeece7;
  --bts-red: #f70d28; --bts-red-ink: #c4001d; --bts-mark: #ffd3d9;
  --bts-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  --bts-num: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
}
.bt-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
mark.bt-hl { background: linear-gradient(transparent 56%, var(--bts-mark) 56%, var(--bts-mark) 94%, transparent 94%); color: inherit; padding: 0 1px; }

/* ---------- 桌機標頭搜尋框（jNews Logo 列右欄的 HTML 2 元件） ---------- */
.bt-hbox { position: relative; display: flex; align-items: center; gap: 10px; width: 420px; max-width: 34vw; height: 44px; margin: 0; padding: 0 10px 0 14px;
  border-radius: 10px; background: var(--bts-wash); border: 1px solid transparent; color: var(--bts-mute); font-family: var(--bts-sans); transition: border-color .15s, background .15s, box-shadow .15s; }
.bt-hbox:hover { border-color: var(--bts-line2); }
.bt-hbox:focus-within { background: #fff; border-color: var(--bts-ink); box-shadow: 0 0 0 4px rgba(22, 23, 27, .07); }
.bt-hbox .bt-ico { width: 18px; height: 18px; }
.bt-hbox .bt-hbox-in { flex: 1; min-width: 0; height: 42px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; outline: 0 !important; box-shadow: none !important;
  background: transparent !important; color: var(--bts-ink) !important; font: 500 15px/42px var(--bts-sans) !important; -webkit-appearance: none; appearance: none; }
.bt-hbox .bt-hbox-in::placeholder { color: var(--bts-mute); font-weight: 400; opacity: 1; }
.bt-hbox .bt-hbox-in::-webkit-search-cancel-button { -webkit-appearance: none; }
.bt-hbox-kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px; border: 1px solid var(--bts-line2);
  background: #fff; font: 500 11.5px/1 var(--bts-num); color: var(--bts-mute); box-shadow: 0 1px 0 var(--bts-line2); }
.bt-hbox:focus-within .bt-hbox-kbd { display: none; }
/* 有標頭搜尋框以後，主選單最右邊那顆放大鏡就不需要了（捲動後的浮動標頭仍保留自己的放大鏡） */
.bt-hbox-on .jeg_header .jeg_bottombar .jeg_search_wrapper { display: none !important; }

/* ---------- 手機：右上角搜尋鈕 44×44（所有頁面） ---------- */
.bt-sv2 .jeg_navbar_mobile .jeg_search_wrapper { padding: 0 !important; }
.bt-sv2 .jeg_navbar_mobile .jeg_search_wrapper .jeg_search_toggle { display: inline-flex !important; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0 !important;
  border-radius: 999px; background: var(--bts-wash); color: var(--bts-ink) !important; line-height: 1 !important; font-size: 18px !important; }
/* ---------- 手機：首頁與分類頁標頭下方的全寬搜尋列（2B） ---------- */
.bt-mbar { display: none; }
@media (max-width: 1024px) {
  .bt-mbar { display: block; padding: 6px 16px 12px; background: #fff; border-bottom: 1px solid var(--bts-line); }
  .bt-mbar-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; margin: 0; padding: 0 14px; border: 0; border-radius: 10px; background: var(--bts-wash);
    color: var(--bts-mute); font: 400 15px/1 var(--bts-sans); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bt-mbar-btn .bt-ico { width: 19px; height: 19px; color: var(--bts-ink2); }
}

/* ---------- 搜尋結果頁 ---------- */
.bt-sr, .bt-sr * { box-sizing: border-box; }
.bt-sr { font-family: var(--bts-sans); color: var(--bts-ink2); -webkit-font-smoothing: antialiased; line-break: strict; overflow-wrap: anywhere; }
.bt-sr :where(h1, h2, h3, p, ol, ul) { margin: 0; padding: 0; }
.bt-sr h1, .bt-sr h2, .bt-sr h3 { font-family: var(--bts-sans) !important; color: var(--bts-ink); letter-spacing: 0; text-wrap: pretty; }
.bt-sr a { text-decoration: none; }
.bt-wrap { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.bt-sr-band { background: var(--bts-wash); border-bottom: 1px solid var(--bts-line); }
.bt-sr-band .bt-wrap { padding-top: 26px; padding-bottom: 22px; }
.bt-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; color: var(--bts-mute); }
.bt-crumb a { color: var(--bts-mute); }
.bt-crumb a:hover { color: var(--bts-ink); }
.bt-crumb .bt-ico { width: 12px; height: 12px; stroke-width: 2; color: var(--bts-faint); }
.bt-crumb [aria-current] { color: var(--bts-ink2); }
.bt-sr-field { display: none; }
.bt-sr-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: 14px; }
.bt-sr-h1 { font-size: 32px !important; line-height: 1.3 !important; font-weight: 600 !important; text-wrap: balance; }
.bt-sr-count { margin-top: 8px !important; font-size: 15px; color: var(--bts-mute); }
.bt-sr-count b { font: 600 16px var(--bts-num); color: var(--bts-ink); font-variant-numeric: tabular-nums; }
.bt-seg { display: inline-flex; flex: 0 0 auto; padding: 3px; border-radius: 10px; background: var(--bts-wash2); }
.bt-seg a { position: relative; display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--bts-mute) !important; white-space: nowrap; }
.bt-seg a::after { content: ""; position: absolute; inset: -4px -3px; }
.bt-seg a.is-on { background: #fff; color: var(--bts-ink) !important; font-weight: 600; box-shadow: 0 1px 2px rgba(22, 23, 27, .12), 0 0 0 1px rgba(22, 23, 27, .04); }
.bt-sr-tools { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--bts-line2); }
.bt-filter { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; }
.bt-filter + .bt-filter { margin-top: 12px; }
.bt-flabel { font-size: 13px; font-weight: 600; color: var(--bts-mute); white-space: nowrap; }
.bt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bt-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bts-line2);
  background: #fff; font-size: 14px; font-weight: 500; color: var(--bts-ink2) !important; white-space: nowrap; transition: border-color .15s, color .15s; }
.bt-chip::after { content: ""; position: absolute; inset: -4px -3px; }
.bt-chip:hover { border-color: var(--bts-ink); color: var(--bts-ink) !important; }
.bt-chip.is-on { background: var(--bts-ink); border-color: var(--bts-ink); color: #fff !important; }
.bt-rank { font: 600 12px var(--bts-num); color: var(--bts-red-ink); }
.bt-sr-body { padding-top: 28px; padding-bottom: 64px; }
.bt-sr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0 60px; }
.bt-res { border-top: 1px solid var(--bts-line); }
.bt-ri { display: grid; grid-template-columns: minmax(0, 1fr) 208px; gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--bts-line); }
.bt-ri-cat { display: inline-block; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--bts-red-ink) !important; white-space: nowrap; }
.bt-ri-title { margin-top: 6px !important; font-size: 20px !important; line-height: 1.5 !important; font-weight: 600 !important; }
.bt-ri-title a { color: var(--bts-ink) !important; }
.bt-ri-title a:hover { color: var(--bts-red-ink) !important; }
.bt-ri-ex { margin-top: 8px !important; font-size: 15px; line-height: 1.75; color: var(--bts-ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bt-ri-ex mark.bt-hl { color: var(--bts-ink); font-weight: 600; }
.bt-ri-meta { margin-top: 10px !important; font-size: 13px; line-height: 20px; color: var(--bts-mute); }
.bt-ri-meta time { font-family: var(--bts-num); font-variant-numeric: tabular-nums; }
.bt-dot::before { content: "·"; margin: 0 6px; color: var(--bts-faint); }
.bt-ri-thumb { display: block; width: 208px; aspect-ratio: 16 / 10; margin-top: 4px; border-radius: 8px; overflow: hidden; background: var(--bts-wash2); }
.bt-ri-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bt-pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 32px 0 8px; }
.bt-pager-info { font-size: 13px; color: var(--bts-mute); }
.bt-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bt-pages a, .bt-pages span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 8px;
  font: 500 14px var(--bts-num); color: var(--bts-ink2) !important; white-space: nowrap; }
.bt-pages a:hover { background: var(--bts-wash); }
.bt-pages .is-on { background: var(--bts-ink); color: #fff !important; }
.bt-pages .bt-pg-gap { min-width: 24px; padding: 0; color: var(--bts-faint) !important; }
.bt-pages .bt-pg-nav { font-family: var(--bts-sans); border: 1px solid var(--bts-line2); padding: 0 14px; }
.bt-pages .bt-ico { width: 15px; height: 15px; }
.bt-sec-block + .bt-sec-block { margin-top: 44px; }
.bt-sec { display: flex; align-items: baseline; justify-content: space-between; border-top: 2px solid var(--bts-ink); padding-top: 14px; margin-bottom: 20px; }
.bt-sec h2 { font-size: 20px !important; line-height: 28px !important; font-weight: 600 !important; }
.bt-sr-empty { padding: 8px 0 36px; }
.bt-sr-empty h2 { font-size: 24px !important; line-height: 1.4 !important; font-weight: 600 !important; }
.bt-sr-empty p { margin-top: 10px !important; font-size: 16px; line-height: 1.7; color: var(--bts-mute); }
.bt-sr-empty .bt-chips { margin-top: 16px; }
.bt-link { color: var(--bts-red-ink) !important; font-weight: 500; border-bottom: 1px solid #f3c2c9; }
.bt-tips { counter-reset: tip; display: grid; gap: 14px; margin-top: 20px !important; list-style: none; }
.bt-tips li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 16px; line-height: 1.7; color: var(--bts-ink2); }
.bt-tips li::before { counter-increment: tip; content: counter(tip); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px;
  background: #fff; border: 1px solid var(--bts-line2); font: 600 13px var(--bts-num); color: var(--bts-ink); }
.bt-tips b { color: var(--bts-ink); font-weight: 600; }
.bt-sr-rail > * + * { margin-top: 44px; }
.bt-sr-widgets { width: auto !important; float: none !important; padding: 0 !important; }

@media (max-width: 1024px) {
  .bt-sr-grid { grid-template-columns: minmax(0, 1fr); }
  .bt-sr-rail { margin-top: 48px; }
}
@media (max-width: 767px) {
  .bt-wrap { padding: 0 16px; }
  .bt-sr-band .bt-wrap { padding-top: 16px; padding-bottom: 16px; }
  .bt-sr-field { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; margin: 14px 0 0; padding: 0 14px; border-radius: 10px; background: #fff;
    border: 1px solid var(--bts-line2); color: var(--bts-mute); }
  .bt-sr-field .bt-ico { width: 18px; height: 18px; }
  .bt-sr-field input { flex: 1; min-width: 0; height: 42px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; outline: 0 !important; box-shadow: none !important;
    background: transparent !important; color: var(--bts-ink) !important; font: 500 16px/42px var(--bts-sans) !important; -webkit-appearance: none; appearance: none; }
  .bt-sr-sum { display: block; margin-top: 16px; }
  .bt-sr-h1 { font-size: 25px !important; line-height: 1.38 !important; }
  .bt-sr-count { margin-top: 4px !important; }
  .bt-sr-sum .bt-seg { margin-top: 12px; }
  .bt-seg a { height: 38px; padding: 0 16px; }
  .bt-sr-tools { margin-top: 16px; padding-top: 14px; }
  .bt-filter { grid-template-columns: 1fr; gap: 0; }
  .bt-filter + .bt-filter { margin-top: 10px; }
  .bt-flabel { display: none; }
  .bt-filter .bt-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .bt-filter .bt-chips::-webkit-scrollbar { display: none; }
  .bt-chip { height: 40px; font-size: 14.5px; }
  .bt-chips-wrap .bt-chip { height: 40px; }
  .bt-sr-body { padding-top: 20px; padding-bottom: 48px; }
  .bt-ri { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; padding: 18px 0; }
  .bt-ri-title { font-size: 17px !important; line-height: 1.55 !important; margin-top: 4px !important; }
  .bt-ri-ex { font-size: 14.5px; line-height: 1.7; margin-top: 6px !important; }
  .bt-ri-meta { margin-top: 8px !important; }
  .bt-ri-thumb { width: 96px; aspect-ratio: 1 / 1; margin-top: 26px; }
  .bt-pager { flex-direction: column-reverse; align-items: stretch; padding-top: 24px; }
  .bt-pager-info { text-align: center; }
  .bt-pages { justify-content: center; }
  .bt-sr-empty h2 { font-size: 21px !important; }
  .bt-tips li { font-size: 15px; }
}
