/* ==========================================================================
   社會543 前台設計系統（Bootstrap 5.3 原生 + 自訂主題；後台使用 AdminLTE）
   --------------------------------------------------------------------------
   版型：.site-header（頂部）＋ .site-grid（左側導覽 / 主欄 / 右側欄）＋ .bottom-nav（手機）
   元件：
     .card（已全域改為大圓角柔和卡片）、.card-head / .card-title-lg（卡片標題列）
     .section-head（區塊標題＋更多連結）、.icon-tile（彩色圓角圖示，.tile-red 等色）
     .btn-brand（品牌漸層膠囊按鈕）、.btn-soft（淡色膠囊按鈕）、.btn-pill
     .hero-card（漸層問候橫幅）、.landing-hero（訪客首頁介紹）、.feature-card
     .chip（標籤膠囊）、.feed / .feed-item（文章列表）、.mini-list（右側小列表）
     .empty-state（空狀態）、.page-head（一般頁面標題區）、.seg-tabs（分段頁籤）
     .focus-scroller / .focus-card（橫向捲動焦點卡）、.task-list（新手任務）
   ========================================================================== */

:root,
[data-bs-theme="light"] {
  --brand: #e11d48;
  --brand-600: #be123c;
  --brand-soft: #ffe4ea;
  --brand-soft-text: #be123c;
  --brand-grad: linear-gradient(135deg, #f43f5e 0%, #fb7185 45%, #fb923c 100%);
  --hero-grad: linear-gradient(115deg, #7c3aed 0%, #c026d3 48%, #f43f5e 100%);
  --page-bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --surface-3: #e9ecf3;
  --line: rgba(15, 23, 42, .07);
  --line-strong: rgba(15, 23, 42, .12);
  --text: #1f2430;
  --text-2: #5b6273;
  --text-3: #8a91a3;
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .04);
  --shadow-md: 0 2px 6px rgba(16, 24, 40, .06), 0 14px 36px rgba(16, 24, 40, .08);
  --header-h: 72px;
  --push: #16a34a;
  --boo: #e11d48;
  --tw-accent: var(--brand);
  --tw-gloss-line: rgba(225, 29, 72, .5);
  --bs-body-bg: var(--page-bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--text-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #4338ca;
  --bs-border-color: var(--line-strong);
  --bs-primary: #e11d48;
  --bs-primary-rgb: 225, 29, 72;
  --bs-focus-ring-color: rgba(225, 29, 72, .25);
}

[data-bs-theme="dark"] {
  --brand: #fb7185;
  --brand-600: #f43f5e;
  --brand-soft: rgba(251, 113, 133, .16);
  --brand-soft-text: #fda4af;
  --brand-grad: linear-gradient(135deg, #e11d48 0%, #f43f5e 45%, #ea580c 100%);
  --hero-grad: linear-gradient(115deg, #5b21b6 0%, #a21caf 50%, #be123c 100%);
  --page-bg: #0e1015;
  --surface: #171a21;
  --surface-2: #1f232c;
  --surface-3: #272c37;
  --line: rgba(255, 255, 255, .06);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #e7e9ee;
  --text-2: #a3a9b8;
  --text-3: #7b8294;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, .45);
  --push: #4ade80;
  --boo: #fb7185;
  --tw-gloss-line: rgba(251, 113, 133, .6);
  --bs-body-bg: var(--page-bg);
  --bs-body-color: var(--text);
  --bs-secondary-color: var(--text-2);
  --bs-tertiary-bg: var(--surface-2);
  --bs-secondary-bg: var(--surface-2);
  --bs-link-color: #a5b4fc;
  --bs-link-color-rgb: 165, 180, 252;
  --bs-link-hover-color: #c7d2fe;
  --bs-border-color: var(--line-strong);
  --bs-primary: #fb7185;
  --bs-primary-rgb: 251, 113, 133;
}

html { scroll-padding-top: calc(var(--header-h) + 12px); }
body.site {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.site a { text-underline-offset: 3px; }
.site .text-body-secondary { color: var(--text-2) !important; }
.site .small, .site small { font-size: .84rem; }
.skip-link { position: absolute; z-index: 2000; padding: .5rem 1rem; background: var(--surface); }
.site-container { max-width: 1440px; margin: 0 auto; padding: 0 20px; }

/* ── 頂部 ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 1030; height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .site-container { height: 100%; display: flex; align-items: center; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 12px; }
.brand-name { font-size: 1.32rem; font-weight: 800; letter-spacing: .01em; line-height: 1; }
.brand-name b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand img.brand-logo { height: var(--brand-logo-h, 34px); width: auto; max-width: min(var(--brand-logo-w, 240px), 46vw); border-radius: 0; object-fit: contain; object-position: left center; }
@media (max-width: 991.98px) { .brand img.brand-logo { height: var(--brand-logo-h-m, 30px); } }
.top-nav { display: flex; gap: 4px; margin-left: 10px; }
.top-nav a {
  padding: 9px 16px; border-radius: 999px; color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.top-nav a:hover { background: var(--surface-2); }
.top-nav a.active { background: var(--brand-soft); color: var(--brand-soft-text); }
.top-search { flex: 1 1 auto; max-width: 460px; margin-left: auto; position: relative; }
.top-search input {
  width: 100%; height: 46px; border-radius: 999px; border: 1px solid transparent; background: var(--surface-2); color: var(--text);
  padding: 0 18px 0 46px; font-size: .95rem; transition: border-color .15s, background .15s, box-shadow .15s;
}
.top-search input::placeholder { color: var(--text-3); }
.top-search input:focus { outline: none; background: var(--surface); border-color: var(--line-strong); box-shadow: 0 0 0 4px var(--brand-soft); }
.top-search .bi-search { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; position: relative; font-size: 1.2rem; text-decoration: none; transition: background .15s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.icon-btn .count-badge {
  position: absolute; top: 2px; right: 0; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; line-height: 20px; text-align: center; border: 2px solid var(--surface);
}
.avatar-btn { padding: 0; border: 2px solid var(--line-strong); border-radius: 50%; background: none; width: 42px; height: 42px; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.theme-icon-dark { display: none; }
[data-bs-theme="dark"] .theme-icon-dark { display: inline; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }

/* ── 按鈕 ─────────────────────────────────────────────── */
.site .btn { border-radius: 12px; font-weight: 600; }
.btn-pill { border-radius: 999px !important; }
.btn-brand {
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
  background: var(--brand-grad); border: 0; border-radius: 999px !important; padding: .5rem 1.15rem; box-shadow: 0 6px 16px rgba(225, 29, 72, .28);
}
.btn-brand:hover, .btn-brand:focus-visible { filter: brightness(1.06) saturate(1.05); color: #fff; transform: translateY(-1px); }
.btn-brand.btn-lg { padding: .75rem 1.6rem; }
.btn-soft { background: var(--surface-2); border: 0; color: var(--text); border-radius: 999px !important; }
.btn-soft:hover, .btn-soft.active { background: var(--surface-3); color: var(--text); }
.btn-soft.active { background: var(--brand-soft); color: var(--brand-soft-text); }
.btn-google {
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 14px !important;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .7rem 1.4rem;
}
.btn-google:hover { background: var(--surface-2); color: var(--text); }
.site .btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.site .btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); --bs-btn-active-border-color: var(--brand); }

/* ── 版型格線 ─────────────────────────────────────────── */
.site-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr) 340px; gap: 28px; padding-top: 24px; padding-bottom: 48px; align-items: start; }
.site-grid.no-rail { grid-template-columns: 248px minmax(0, 1fr); }
.site-grid.no-side { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
.site-side, .site-rail { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 36px); overflow-y: auto; scrollbar-width: thin; }
.site-side::-webkit-scrollbar, .site-rail::-webkit-scrollbar { width: 6px; }
.site-side::-webkit-scrollbar-thumb, .site-rail::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
.site-main { min-width: 0; }
.site-rail { display: flex; flex-direction: column; gap: 20px; padding-bottom: 4px; }
.site-main > * + * { margin-top: 20px; }

/* ── 左側導覽 ─────────────────────────────────────────── */
.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: var(--radius-md);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; transition: background .15s;
}
.side-nav a:hover { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.side-nav a.active { background: var(--surface); box-shadow: var(--shadow-sm); color: var(--brand-soft-text); }
.side-nav .nav-badge { margin-left: auto; font-size: .72rem; }
.side-heading { font-size: .8rem; font-weight: 700; color: var(--text-3); margin: 22px 14px 8px; letter-spacing: .04em; }
.side-follow a { font-weight: 500; font-size: .92rem; padding: 7px 14px; }
.side-follow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: 0 0 8px; }
.side-follow .dot.seen { background: var(--surface-3); }
.side-foot { margin: 24px 14px 0; font-size: .78rem; color: var(--text-3); line-height: 1.9; }
.side-foot a { color: var(--text-3); text-decoration: none; margin-right: .6rem; white-space: nowrap; }
.side-foot a:hover { color: var(--text); }

/* 彩色圖示方塊 */
.icon-tile {
  width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.02rem; flex: 0 0 34px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
}
.icon-tile.sm { width: 26px; height: 26px; flex-basis: 26px; border-radius: 8px; font-size: .85rem; }
.icon-tile.lg { width: 48px; height: 48px; flex-basis: 48px; border-radius: 15px; font-size: 1.4rem; }
.tile-blue { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.tile-orange { background: linear-gradient(135deg, #fdba74, #f97316); }
.tile-violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.tile-red { background: linear-gradient(135deg, #fb7185, #e11d48); }
.tile-pink { background: linear-gradient(135deg, #f9a8d4, #db2777); }
.tile-green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.tile-teal { background: linear-gradient(135deg, #5eead4, #0d9488); }
.tile-cyan { background: linear-gradient(135deg, #67e8f9, #0891b2); }
.tile-amber { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.tile-indigo { background: linear-gradient(135deg, #a5b4fc, #4f46e5); }
.tile-gray { background: linear-gradient(135deg, #cbd5e1, #64748b); }
.tile-brown { background: linear-gradient(135deg, #d6a77a, #92400e); }

/* ── 卡片 ─────────────────────────────────────────────── */
.site .card {
  --bs-card-bg: var(--surface); --bs-card-border-color: var(--line); --bs-card-border-radius: var(--radius-lg);
  --bs-card-inner-border-radius: calc(var(--radius-lg) - 1px); --bs-card-cap-bg: transparent; --bs-card-spacer-x: 1.4rem; --bs-card-spacer-y: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.site .card-header { border-bottom-color: var(--line); padding-top: 1.1rem; padding-bottom: 1rem; }
.site .card-footer { border-top-color: var(--line); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: .9rem; }
.card-title-lg { font-size: 1.12rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-head .more { margin-left: auto; color: var(--text-2); font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.card-head .more:hover { color: var(--text); }
.card-sub { color: var(--text-2); font-size: .85rem; margin-top: -.5rem; margin-bottom: .9rem; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 8px 2px 12px; }
.section-head h2 { font-size: 1.22rem; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head .more { margin-left: auto; color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none; }
.site .list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--line); }

/* 表單 */
.site .form-control, .site .form-select { border-radius: 12px; background-color: var(--surface); border-color: var(--line-strong); color: var(--text); }
.site .form-control:focus, .site .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.site .form-control::placeholder { color: var(--text-3); }
.site .form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.site .form-label { font-weight: 600; }
.site .input-group > .form-control { border-radius: 12px; }

/* 下拉選單、彈出元件 */
.site .dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--line); --bs-dropdown-border-radius: 16px; --bs-dropdown-link-hover-bg: var(--surface-2); --bs-dropdown-link-active-bg: var(--brand-soft); --bs-dropdown-link-active-color: var(--brand-soft-text); box-shadow: var(--shadow-md); padding: .4rem; }
.site .dropdown-item { border-radius: 10px; padding: .5rem .75rem; }
.site .modal-content { border-radius: var(--radius-xl); border: 0; background: var(--surface); }
.site .offcanvas { background: var(--page-bg); }
.site .alert { border-radius: var(--radius-md); border: 0; }
.site .pagination { --bs-pagination-border-radius: 12px; --bs-pagination-bg: var(--surface); --bs-pagination-border-color: var(--line); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--text); gap: 6px; }
.site .pagination .page-link { border-radius: 12px !important; min-width: 38px; text-align: center; }
.site .badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; }
.site .nav-pills { --bs-nav-pills-border-radius: 999px; --bs-nav-pills-link-active-bg: var(--brand-soft); --bs-nav-pills-link-active-color: var(--brand-soft-text); }
.site .nav-pills .nav-link { color: var(--text-2); font-weight: 600; }
.site .nav-pills .nav-link:hover { color: var(--text); }

/* ── 問候橫幅（已登入首頁） ───────────────────────────── */
.hero-card {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 28px 30px; color: #fff; background: var(--hero-grad);
  box-shadow: 0 16px 40px rgba(124, 58, 237, .22);
}
.hero-card h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; }
.hero-card p { margin: 0 0 18px; opacity: .88; }
.hero-card .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.hero-card .hero-actions a {
  background: rgba(255, 255, 255, .2); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; text-decoration: none;
  backdrop-filter: blur(4px); transition: background .15s; display: inline-flex; align-items: center; gap: 6px;
}
.hero-card .hero-actions a:hover { background: rgba(255, 255, 255, .32); }
.hero-card .hero-deco { position: absolute; right: 24px; bottom: -24px; font-size: 9rem; opacity: .16; line-height: 1; transform: rotate(-12deg); pointer-events: none; }

/* ── 訪客首頁介紹 ─────────────────────────────────────── */
.landing-hero { text-align: center; padding: 44px 28px 36px; }
.landing-logo { font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 900; letter-spacing: -.01em; line-height: 1.05; margin-bottom: 6px; }
.landing-logo b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-tagline { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; }
.landing-desc { font-size: 1.08rem; color: var(--text-2); max-width: 640px; margin: 0 auto 26px; line-height: 1.9; }
.landing-desc strong { color: var(--brand-soft-text); }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 26px; }
.feature-card { border: 1px solid var(--line); border-radius: 18px; padding: 20px 14px; background: var(--surface); }
.feature-card .bi { font-size: 1.6rem; color: var(--brand); }
.feature-card h3 { font-size: 1rem; font-weight: 800; margin: 10px 0 6px; }
.feature-card p { font-size: .84rem; color: var(--text-2); margin: 0; line-height: 1.6; }
.landing-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── 分段頁籤 ─────────────────────────────────────────── */
.seg-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs a {
  padding: 8px 16px; border-radius: 999px; color: var(--text-2); font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.seg-tabs a:hover { color: var(--text); background: var(--surface-2); }
.seg-tabs a.active { background: var(--text); color: var(--surface); }

/* ── 文章列表 ─────────────────────────────────────────── */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { padding: 16px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; padding-top: 4px; }
.feed-item .post-item { display: flex; gap: 14px; align-items: flex-start; }
.feed-item .post-thumb { width: 104px; height: 78px; flex: 0 0 104px; border-radius: 14px; object-fit: cover; background: var(--surface-2); }
.feed-item .post-thumb.is-blurred { filter: blur(14px) saturate(.6); }
.feed-item .post-title { font-size: 1.06rem; font-weight: 700; line-height: 1.5; color: var(--text); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feed-item .post-title:hover { color: var(--brand-soft-text); }
.feed-item .post-excerpt { font-size: .9rem; color: var(--text-2); margin: 4px 0 6px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: .82rem; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.post-meta .stat-push { color: var(--push); font-weight: 700; }
.post-meta .stat-new { color: var(--brand); font-weight: 700; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rank-num { font-weight: 900; font-size: 1.15rem; min-width: 1.8rem; text-align: center; color: var(--text-3); padding-top: 2px; }
.rank-num.top { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 標籤與徽章 */
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--bs-link-color); background: var(--surface); text-decoration: none; transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--surface-2); border-color: var(--bs-link-color); }
.chip .n { color: var(--text-3); font-weight: 500; font-size: .78rem; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-sm { font-size: .74rem; padding: 3px 9px; border-radius: 999px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; line-height: 1.4; }
.tag-cat { background: var(--surface-2); color: var(--text); }
.tag-cat:hover { background: var(--surface-3); color: var(--text); }
.tag-kind-news { background: rgba(37, 99, 235, .12); color: #2563eb; }
.tag-kind-sub { background: rgba(245, 158, 11, .16); color: #b45309; }
.tag-progress { background: rgba(124, 58, 237, .12); color: #7c3aed; }
.tag-region { background: transparent; color: var(--text-2); border: 1px solid var(--line-strong); }
.tag-18 { background: #7f1d1d; color: #fff; }
[data-bs-theme="dark"] .tag-kind-news { color: #93c5fd; }
[data-bs-theme="dark"] .tag-kind-sub { color: #fcd34d; }
[data-bs-theme="dark"] .tag-progress { color: #c4b5fd; }
.badge-soft { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); font-weight: 600; }

/* 右側小列表 */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; padding-top: 0; }
.mini-list a.t { color: var(--text); font-weight: 700; text-decoration: none; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-list a.t:hover { color: var(--brand-soft-text); }
.mini-list .m { color: var(--text-3); font-size: .8rem; margin-top: 4px; }
.quick-links { list-style: none; margin: 0; padding: 0; }
.quick-links a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.quick-links a:hover { background: var(--surface-2); }
.quick-links .bi { font-size: 1.1rem; color: var(--text-2); width: 22px; text-align: center; }

/* 新手任務 */
.task-progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-bottom: 14px; }
.task-progress span { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #3b82f6); border-radius: 3px; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { padding: 7px 0; }
.task-list .done { color: var(--text-3); text-decoration: line-through; }
.task-list .done .bi-check-circle-fill { color: #16a34a; text-decoration: none; display: inline-block; }
.task-list a { font-weight: 700; text-decoration: none; }
.task-list .hint { display: block; font-size: .8rem; color: var(--text-3); margin-top: 2px; }

/* 焦點卡橫向捲動 */
.focus-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 236px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.focus-card { scroll-snap-align: start; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--text); display: flex; flex-direction: column; min-height: 220px; transition: transform .15s, box-shadow .15s; }
.focus-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.focus-card .band { height: 84px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 14px; color: #fff; position: relative; }
.focus-card .band .bi { font-size: 2.2rem; opacity: .9; }
.focus-card .band .src { font-size: .75rem; font-weight: 700; background: rgba(0, 0, 0, .18); border-radius: 999px; padding: 3px 9px; }
.focus-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.focus-card .title { font-weight: 800; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.focus-card .meta { margin-top: auto; font-size: .8rem; color: var(--text-3); }

/* 空狀態 */
.empty-state { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; background: linear-gradient(120deg, var(--surface-2), color-mix(in srgb, var(--brand-soft) 60%, var(--surface-2))); }
.empty-state .bi { font-size: 2rem; color: var(--text-3); }
.empty-state strong { display: block; font-size: 1rem; }
.empty-state span { font-size: .88rem; color: var(--text-2); }
.empty-block { text-align: center; padding: 48px 16px; color: var(--text-2); }
.empty-block .bi { font-size: 2.6rem; color: var(--text-3); display: block; margin-bottom: 10px; }

/* 一般頁面標題 */
.page-head { display: flex; align-items: center; gap: 14px; margin: 2px 2px 4px; }
.page-head h1 { font-size: 1.55rem; font-weight: 800; margin: 0; }
.page-head p { margin: 2px 0 0; color: var(--text-2); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }
.crumbs { font-size: .84rem; color: var(--text-3); margin: 0 2px 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--text-3); }

/* ── 文章頁 ───────────────────────────────────────────── */
.post-article .post-headline { font-size: 1.7rem; font-weight: 800; line-height: 1.45; letter-spacing: .005em; }
.post-byline { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .88rem; }
.post-byline > div { flex: 1 1 auto; min-width: 0; }
.post-byline > img { flex: 0 0 36px; }
.post-byline > span { flex: 0 0 auto; white-space: nowrap; }
.post-byline img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-byline .who { color: var(--text); font-weight: 700; text-decoration: none; }
.post-body { font-size: 1.07rem; line-height: 1.95; word-break: break-word; }
.post-body p { margin-bottom: 1.1rem; }
.summary-box { border-radius: 18px; background: var(--surface-2); padding: 18px 22px; border-left: 4px solid var(--brand); }
.summary-box .label { font-size: .78rem; font-weight: 800; color: var(--brand-soft-text); letter-spacing: .06em; margin-bottom: 6px; }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-list li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px dashed var(--line-strong); font-size: .92rem; }
.source-list li:first-child { border-top: 0; }
.source-list .src { flex: 0 0 auto; font-weight: 800; }
.ai-note { font-size: .82rem; color: var(--text-3); background: var(--surface-2); border-radius: 12px; padding: 10px 14px; }
.action-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vote-group { display: inline-flex; gap: 6px; }
.btn-vote { border-radius: 999px !important; background: var(--surface-2); border: 0; color: var(--text); font-weight: 700; padding: .45rem .95rem; }
.btn-vote:hover { background: var(--surface-3); color: var(--text); }
.btn-push.active { background: rgba(22, 163, 74, .14); color: var(--push); }
.btn-boo.active { background: rgba(225, 29, 72, .14); color: var(--boo); }
.case-timeline .tl-time { font-size: .8rem; color: var(--text-3); }

/* 限制級閘門 */
.restricted-gate { max-width: 560px; margin: 1rem auto; }
.rating-badge-18 { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; border: 4px solid #dc2626; color: #dc2626; font-weight: 900; font-size: 1.15rem; }

/* 通知下拉 */
.notif-menu { width: 360px; max-width: calc(100vw - 24px); }
.notif-list { max-height: 400px; overflow-y: auto; }
.notif-list .dropdown-item { white-space: normal; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.notif-list .dropdown-item.unread { background: var(--brand-soft); }
.notif-list .dropdown-item .bi { font-size: 1.1rem; color: var(--text-2); margin-top: 2px; }

/* ── 手機底部導覽 ─────────────────────────────────────── */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  :root { --header-h: 60px; }
  .site-container { padding: 0 14px; }
  .site-header .site-container { gap: 6px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 1.12rem; }
  .top-nav, .top-search, .hide-mobile { display: none !important; }
  .top-actions { margin-left: auto; gap: 2px; }
  .icon-btn { width: 40px; height: 40px; }
  .site-grid, .site-grid.no-rail { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 14px; }
  .site-side { display: none; }
  .site-rail { position: static; max-height: none; overflow: visible; }
  body.site { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-2); text-decoration: none; font-size: .7rem; font-weight: 600; position: relative; padding: 4px 0; }
  .bottom-nav a .bi { font-size: 1.3rem; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav .compose .bi { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: 0 6px 16px rgba(225, 29, 72, .35); }
  .bottom-nav .count-badge { position: absolute; top: 0; left: 55%; min-width: 18px; height: 18px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .65rem; line-height: 18px; padding: 0 4px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { padding: 22px 20px; }
  .hero-card h1 { font-size: 1.3rem; }
  .post-article .post-headline { font-size: 1.35rem; }
  .post-body { font-size: 1.02rem; }
  .site .card { --bs-card-spacer-x: 1.05rem; --bs-card-spacer-y: 1rem; }
  .feed-item .post-thumb { width: 84px; height: 64px; flex-basis: 84px; }
}
@media (min-width: 992px) and (max-width: 1279.98px) {
  .site-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .site-grid .site-rail { grid-column: 2; position: static; max-height: none; overflow: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-nav a { padding: 9px 11px; }
}
@media (max-width: 575.98px) {
  .landing-hero { padding: 30px 16px 26px; }
  .feature-grid { gap: 8px; }
  .feature-card { padding: 14px 10px; }
  .page-head h1 { font-size: 1.3rem; }
}
.site-footer { border-top: 1px solid var(--line); padding: 22px 0 30px; font-size: .82rem; color: var(--text-3); }
.site-footer a { color: var(--text-2); text-decoration: none; margin-right: 14px; display: inline-block; }
.site-footer a:hover { color: var(--text); }
.site-footer .footer-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--text); }
.site-footer .footer-brand img { height: var(--brand-footer-h, 28px); width: auto; max-width: 320px; object-fit: contain; object-position: left center; }
.site-footer .footer-brand img:not(.brand-logo) { width: 28px; border-radius: 8px; }
.site-footer .footer-brand .brand-name { font-size: 1rem; }
@media (max-width: 991.98px) { .site-footer { display: none; } }
/* 已選取的頭像／選項（.btn-check + .btn-soft） */
.btn-check:checked + .btn-soft { box-shadow: 0 0 0 3px var(--brand); background: var(--brand-soft); }
.btn-check:focus-visible + .btn-soft { box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }

/* 新聞完整報導與背景說明 */
.news-article .article-heading { font-size: 1.05rem; font-weight: 800; margin: 1.4rem 0 .6rem; color: var(--text); }
.news-article .article-heading:first-child { margin-top: 0; }
.background-box { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface-2, var(--bs-tertiary-bg)); }
.background-box .article-heading { font-size: 1rem; font-weight: 700; margin: 1rem 0 .4rem; }

/* AI 示意圖 */
.news-cover { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.news-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.news-cover figcaption { font-size: .78rem; color: var(--text-3); padding: 6px 12px; }
.focus-card .band.has-image { height: 120px; background-size: cover; background-position: center; }
.focus-card .band .ai-badge { font-size: .68rem; font-weight: 700; background: rgba(0, 0, 0, .45); border-radius: 999px; padding: 2px 8px; }

/* ── 投稿內文：可視化編輯器 ─────────────────────────────── */
.rt-wrap { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.rt-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(225, 29, 72, .12); }
.is-invalid ~ .rt-wrap, .rt-wrap:has(+ .is-invalid) { border-color: var(--bs-danger); }
.rt-toolbar { position: sticky; top: var(--header-h); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px;
  background: var(--surface); border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.rt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 34px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font-size: .9rem; font-weight: 700; line-height: 1; }
.rt-btn .bi { font-size: 1.05rem; }
.rt-btn:hover:not(:disabled), .rt-btn.active { background: var(--surface-2); color: var(--brand); }
.rt-btn:disabled { opacity: .35; }
.rt-btn-text span { font-size: .84rem; }
.rt-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-strong); }
.rt-menu { position: absolute; z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; max-width: min(360px, 90vw); padding: 8px; margin-top: 40px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .15); }
.rt-menu button { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); font-size: .75rem; color: var(--text); }
.rt-menu img { width: 60px; height: 44px; object-fit: cover; border-radius: 6px; }
.rt-menu .bi { font-size: 1.6rem; line-height: 44px; }
.rt-editor { min-height: 320px; padding: 16px 20px; outline: none; overflow-wrap: anywhere; }
.rt-editor.is-empty::before { content: attr(data-placeholder); position: absolute; color: var(--text-3); pointer-events: none; max-width: calc(100% - 40px); }
.rt-editor { position: relative; }
.rt-source { min-height: 320px; border: 0; border-radius: 0; font-size: .85rem; line-height: 1.6; resize: vertical; }
.rt-source:focus { box-shadow: none; }
.rt-hint { padding: 8px 14px; border-top: 1px dashed var(--line); color: var(--text-3); font-size: .8rem; }
.rt-figure { position: relative; margin: 1rem 0; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); user-select: none; }
.rt-figure-media { position: relative; display: flex; justify-content: center; }
.rt-figure-media img, .rt-figure-media video { max-width: 100%; max-height: 320px; border-radius: 8px; }
.rt-figure-label { position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(15, 23, 42, .75); color: #fff; font-size: .75rem; }
.rt-missing { padding: 24px; color: var(--text-3); font-size: .9rem; }
.rt-figure figcaption { margin-top: 6px; padding: 4px 6px; border-radius: 6px; color: var(--text-2); font-size: .88rem; text-align: center; user-select: text; outline: none; min-height: 1.6em; }
.rt-figure figcaption:empty::before { content: attr(data-placeholder); color: var(--text-3); }
.rt-figure figcaption:focus { background: var(--surface); }
.rt-figure-remove { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .75); color: #fff; font-size: .8rem; }
@media (max-width: 575.98px) {
  .rt-toolbar { gap: 0; padding: 4px; }
  .rt-btn { min-width: 32px; height: 32px; padding: 0 6px; }
  .rt-sep { display: none; }
  .rt-editor { min-height: 260px; padding: 12px 14px; }
}

/* ── 文章內文的格式（投稿 HTML、新聞報導）──────────────────── */
.post-body h2, .post-body h3, .post-body h4 { font-weight: 800; line-height: 1.45; margin: 1.6rem 0 .8rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.post-body h2 { font-size: 1.35rem; }
.post-body h3 { font-size: 1.18rem; }
.post-body h4 { font-size: 1.05rem; }
.post-body ul, .post-body ol { margin-bottom: 1.1rem; padding-left: 1.6rem; }
.post-body li { margin-bottom: .25rem; }
.post-body blockquote { margin: 0 0 1.1rem; padding: 10px 16px; border-left: 4px solid var(--line-strong); background: var(--surface-2); border-radius: 0 12px 12px 0; color: var(--text-2); }
.post-body pre { margin-bottom: 1.1rem; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; white-space: pre-wrap; }
.post-body code { padding: .1em .35em; border-radius: 6px; background: var(--surface-2); font-size: .9em; }
.post-body pre code { padding: 0; background: none; }
.post-body hr { margin: 1.6rem 0; border-color: var(--line-strong); opacity: 1; }
.post-body table { width: 100%; margin-bottom: 0; border-collapse: collapse; font-size: .95rem; }
.post-body .post-table { margin-bottom: 1.1rem; border: 1px solid var(--line); border-radius: 12px; }
.post-body th, .post-body td { padding: 8px 12px; border: 1px solid var(--line); vertical-align: top; min-width: 80px; }
.post-body th { background: var(--surface-2); font-weight: 800; }
.post-body mark { padding: 0 .2em; border-radius: 4px; }
.post-body figure { margin: 1.2rem 0; }
.post-body figcaption { margin-top: 6px; color: var(--text-2); font-size: .88rem; text-align: center; }
.post-embed .ratio { border-radius: 14px; overflow: hidden; background: #000; }
.rt-icon-off { position: relative; }
.rt-icon-off::after { content: ''; position: absolute; left: -1px; right: -1px; top: 50%; border-top: 2px solid currentColor; transform: rotate(-45deg); }

/* 小螢幕手機（360px 以下）：頁首圖示縮小，避免登入後頭像被擠出畫面 */
@media (max-width: 379.98px) {
  .site-container { padding: 0 10px; }
  .top-actions { gap: 0; margin-left: auto; }
  .icon-btn { width: 34px; height: 34px; }
  .avatar-btn { width: 34px; height: 34px; }
  .top-actions .dropdown.ms-1 { margin-left: 2px !important; }
  .brand img.brand-logo { max-width: min(var(--brand-logo-w, 240px), 36vw); }
}

/* ── 判決追蹤（文章頁） ── */
.judgment-box { border: 1px solid rgba(124, 58, 237, .35); background: rgba(124, 58, 237, .06); border-radius: 16px; padding: 14px 16px; }
.judgment-box h2 { font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.judgment-box h2 .bi { color: #7c3aed; }
.judgment-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; font-size: .88rem; }
.judgment-box dt { color: var(--text-2); font-weight: 600; }
.judgment-box dd { margin: 0; min-width: 0; word-break: break-all; }
.judgment-box code { color: inherit; background: var(--surface); padding: 1px 6px; border-radius: 6px; font-size: .85rem; }

/* LINE 官方帳號 */
.tile-line { background: #06c755; color: #fff; }
.btn-line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 700; border-radius: 999px; }
.btn-line:hover, .btn-line:focus { background: #05b14c; border-color: #05b14c; color: #fff; }

/* 我的訂閱 */
.sub-add { display: flex; gap: 8px; }
.sub-add .form-control { border-radius: 999px; min-width: 0; }
.sub-add .btn { border-radius: 999px; flex: 0 0 auto; }
.sub-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sub-chips form { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-soft-text); font-weight: 600; font-size: .9rem; max-width: 100%; }
.sub-chips span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sub-chips .btn-x { border: 0; background: transparent; color: inherit; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.sub-chips .btn-x:hover { background: rgba(0, 0, 0, .08); }
.sub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.sub-check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: .9rem; }
.sub-check:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-soft-text); font-weight: 600; }
.sub-check .form-check-input { margin: 0; flex: 0 0 auto; }
.btn-subscribe.active { background: var(--brand-soft); color: var(--brand-soft-text); border-color: transparent; }
@media (max-width: 575.98px) { .sub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.search-subscribe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); }
@media (max-width: 575.98px) {
  .page-head { flex-wrap: wrap; }
  .page-head > div { min-width: 0; flex: 1 1 0; }
  .page-head .actions { margin-left: 0; width: 100%; flex-wrap: wrap; }
}

/* 文章頁：更正說明、系列專題、判決投票 */
.correction-box { border: 1px solid rgba(234, 88, 12, .4); background: rgba(234, 88, 12, .07); border-radius: 14px; padding: 12px 16px; font-size: .9rem; line-height: 1.75; }
.correction-box strong { color: #c2410c; }
[data-bs-theme="dark"] .correction-box strong { color: #fb923c; }
.story-box { border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 14px; padding: 12px 16px; }
.story-box > a { color: var(--text); text-decoration: none; line-height: 1.5; }
.story-box > a:hover { color: var(--brand-soft-text); }
.story-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; font-size: .82rem; }
.story-nav a { display: flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; min-width: 0; }
.story-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.story-nav a.text-end { justify-content: flex-end; }
.story-nav a:hover { color: var(--brand-soft-text); }
.poll-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.poll-option { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-size: .86rem; font-weight: 700; text-align: left; min-width: 0; }
.poll-option::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: rgba(124, 58, 237, .14); transition: width .3s; }
.poll-option > span { position: relative; white-space: nowrap; }
.poll-option .pct { color: var(--text-2); font-weight: 600; font-size: .8rem; }
.poll-option:hover { border-color: #7c3aed; }
.poll-option.mine { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124, 58, 237, .25); }
.poll-option.mine::before { background: rgba(124, 58, 237, .26); }
@media (max-width: 379.98px) { .poll-option { padding: 8px 6px; font-size: .8rem; } }
picture.pic { display: contents; }

/* 電子報訂閱 */
.newsletter-form { position: relative; }
.newsletter-form .nl-hp { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }
.newsletter-form .nl-freq { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.newsletter-form .nl-row { display: flex; gap: 8px; margin-bottom: 10px; }
.newsletter-form .nl-row .form-control { min-width: 0; flex: 1 1 auto; }
.newsletter-form .nl-note { font-size: .78rem; color: var(--text-2); margin: 0; }
.nl-plan { height: 100%; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.nl-faq dt { font-weight: 700; margin-top: 10px; }
.nl-faq dt:first-child { margin-top: 0; }
.nl-faq dd { margin: 2px 0 0; color: var(--text-2); }
.newsletter-box { display: flex; gap: 16px; align-items: center; }
.newsletter-box .nl-text { flex: 0 0 40%; }
@media (max-width: 767.98px) { .newsletter-box { flex-direction: column; align-items: stretch; } .newsletter-box .nl-text { flex-basis: auto; } }

/* 搜尋框建議 */
.search-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 1060; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 6px; max-height: min(70vh, 440px); overflow: auto; text-align: left; }
.search-suggest .ss-head { font-size: .72rem; font-weight: 700; color: var(--text-3); padding: 8px 10px 4px; }
.search-suggest .ss-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .9rem; line-height: 1.45; }
.search-suggest .ss-item > .bi { color: var(--text-3); margin-top: 2px; position: static; transform: none; }
.search-suggest .ss-item > span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-suggest .ss-sub { display: block; color: var(--text-3); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest .ss-item:hover, .search-suggest .ss-item.active { background: var(--surface-2); }
.search-suggest .ss-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 8px; }
.search-suggest .ss-chip { padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .84rem; }
.search-suggest .ss-chip:hover, .search-suggest .ss-chip.active { background: var(--brand-soft); color: var(--brand-soft-text); }

/* 文章頁求助區塊 */
.help-box { padding: 16px 18px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.help-box.is-crisis { background: rgba(22, 163, 74, .08); border-color: rgba(22, 163, 74, .25); }
.help-box .help-title { font-size: 1rem; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.help-box .help-title .bi { color: var(--brand); }
.help-box.is-crisis .help-title .bi { color: #16a34a; }
.help-box .help-lead { font-size: .86rem; color: var(--text-2); margin: 0 0 10px; }
.help-box .help-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.help-box .help-line { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
.help-box .help-line:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.help-box .help-line .num { font-size: 1.2rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.help-box.is-crisis .help-line .num { color: #15803d; }
.help-box .help-line .name { font-size: .86rem; font-weight: 700; }
.help-box .help-line .note { font-size: .74rem; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.help-box .help-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .86rem; }
.help-box .help-links a { display: inline-flex; gap: 4px; align-items: center; }
[data-bs-theme="dark"] .help-box.is-crisis .help-line .num, [data-bs-theme="dark"] .help-box.is-crisis .help-title .bi { color: #4ade80; }
