:root {
    --brand: #2f7a55;
    --brand-deep: #1c4735;
    --canvas: #f4f6f4;
    --ink: #1f2937;
    --muted: #5d6a73;
    --faint: #66736e;
    --paper: #fbfcfb;
    --wrap-pad: 22px;
    --line: #e3e7e4;
    --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    background: var(--canvas);
    color: var(--ink);
    line-height: 1.8;
    -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

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

/* 左右內距只在 --wrap-pad 一處定義：頁首、內容、頁尾、滿版捲動的膊囊列全部讀它，手機縮成 15px 時才會一起動 */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--wrap-pad); }

/* ---------- 頁首 ----------
   版型照 swine.tw：整條色帶、LOGO 靠左、橫向選單靠右、最右是搜尋。
   顏色沒有跟著抄成金黃——我們的 LOGO 是綠的，金底配綠標會打架。
   要換成金黃改 --top-bg / --top-ink 兩個變數即可（#ecc311 / #3a2f05）。 */

/* 2026-08-31 改版：頁首壓成比 hero 更深的一層（原本同一組綠會糊在一起），
   當前頁不用實心塊改 2px 薄荷底線，搜尋做成膠囊 ghost 欄，icon 去掉圓框。
   只有一個強調色 --top-accent，其餘全靠白色透明度分層。 */

:root { --top-bg: #183f2e; --top-ink: #ffffff; --top-line: rgba(255,255,255,.09); --top-accent: #9bdcb8; --top-h: 64px; }

.site-top {
    background: var(--top-bg); color: var(--top-ink);
    position: sticky; top: 0; z-index: 40;
    border-bottom: 1px solid var(--top-line);
    box-shadow: 0 1px 0 rgba(0,0,0,.14), 0 10px 28px -20px rgba(0,0,0,.6);
}

.site-top-in {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--wrap-pad);
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--top-h);
}

.site-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: .06em; }

.site-brand svg { opacity: .95; }

.site-brand small {
    font-weight: 500; font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
    opacity: .72; margin-left: 9px; padding-left: 11px; border-left: 1px solid rgba(255,255,255,.22); line-height: 1;
}

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; font-size: 14.5px; letter-spacing: .03em; height: var(--top-h); }

.nv {
    position: relative;
    text-decoration: none;
    padding: 0 13px;
    height: var(--top-h);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,.74);
    font-weight: 500;
    transition: color .18s;
}

.nv::after {
    content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px;
    background: var(--top-accent); border-radius: 2px 2px 0 0;
    transform: scaleX(0); transform-origin: center; opacity: .55;
    transition: transform .2s ease, opacity .2s ease;
}

.nv:hover { color: #fff; }

.nv:hover::after { transform: scaleX(1); }

.nv.on { color: #fff; }

.nv.on::after { transform: scaleX(1); opacity: 1; }

.nv-tag { font-size: 11px; padding: 1px 6px; border: 1px solid rgba(255,255,255,.35); border-radius: 20px; opacity: .75; letter-spacing: .05em; }

.nv-quiet { font-size: 13px; color: rgba(255,255,255,.55); }

.nv-who { font-size: 13px; color: rgba(255,255,255,.5); padding-left: 6px; }

/* 搜尋：做成膠囊 ghost 欄的樣子，點了還是跳到頁面的搜尋框 */

.nv-search {
    margin-left: 10px; height: 34px; padding: 0 14px 0 11px; gap: 8px;
    border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); border-radius: 999px;
    color: rgba(255,255,255,.7); font-size: 13px; font-weight: 400;
    transition: border-color .18s, background .18s, color .18s;
}

.nv-search::after { display: none; }

.nv-search:hover { border-color: rgba(255,255,255,.42); background: rgba(255,255,255,.11); color: #fff; }

.nv-search svg { flex: none; }

/* 社群 icon：不上圓框，用透明度分層，跟文字選單之間一條髮線 */

.nv-social { display: inline-flex; align-items: center; gap: 2px; margin: 0 2px 0 8px; padding-left: 12px; border-left: 1px solid var(--top-line); }

.nv-ic {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    color: inherit; text-decoration: none; opacity: .68;
    transition: opacity .15s, background .15s;
}

.nv-ic:hover { opacity: 1; background: rgba(255,255,255,.1); }

/* 手機：選單收成抽屜。桌機把漢堡藏起來 */

.nav-burger { display: none; }

@media (max-width: 900px) {
    .site-top-in { flex-wrap: wrap; min-height: 58px; }

    .nav-burger {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        margin-left: auto; width: 40px; height: 40px; padding: 0 8px; cursor: pointer;
    }

    .nav-burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; }

    .site-nav {
        order: 3;
        width: 100%;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }

    .nav-toggle:checked ~ .site-nav { max-height: 600px; padding: 4px 0 14px; }

    .nv { height: auto; padding: 13px 4px; border-bottom: 1px solid var(--top-line); color: rgba(255,255,255,.82); font-size: 15px; }

    .nv::after { display: none; }

    .nv.on { color: var(--top-accent); }

    .nv-search { margin: 12px 0 0; height: 42px; border-radius: 10px; justify-content: flex-start; border-bottom: 1px solid rgba(255,255,255,.18); font-size: 14px; }

    .nv-social { margin: 10px 0 0; padding-left: 0; border-left: 0; }

    .nv-who { padding: 10px 4px 0; }

    .art-cols { flex-direction: column; gap: 0; }

    .art-side { position: static; width: 100%; margin-top: 30px; }

    /* 手機沒有左右留白可以放浮動列，改成文末那組分享鈕就夠了 */
    .float-share { display: none; }

    .to-top { right: 14px; bottom: 16px; }

    .art-head h1 { font-size: 24px; }

    .art-meta { gap: 12px; }
}

/* ---------- Hero ---------- */

/* 上下留白要對稱。只有底下接著畜種分頁（.tabs）的那種 hero 才把底部收成 0，讓分頁貼在綠帶邊上 */
.hero { background: linear-gradient(160deg, #24593f, var(--brand-deep)); color: #fff; padding: 34px 0 30px; }

.hero:has(.tabs) { padding-bottom: 0; }

/* 內容站不需要大 hero：swine.tw 的 blog 頁是頂欄之後直接進格狀。
   標題列壓薄，把版面讓給文章卡。 */
.hero-slim { padding-top: 24px; padding-bottom: 22px; }

.hero-slim h1 { font-size: 23px; }

.hero-slim .lead { font-size: 13.5px; }

.hero h1 { font-size: 27px; margin-bottom: 8px; }

.list-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }

.list-head h2 { font-size: 19px; }

.list-head span { font-size: 12.5px; color: var(--faint); }

.hero .lead { font-size: 14.5px; opacity: .82; max-width: 620px; }

.tabs { display: flex; gap: 6px; margin-top: 22px; }

.tab {
    padding: 10px 24px;
    border-radius: 10px 10px 0 0;
    background: rgba(255,255,255,.12);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.tab.on { background: var(--canvas); color: var(--brand-deep); font-weight: 700; }

.hero + .page { padding-top: 24px; }

.page { padding: 26px var(--wrap-pad) 64px; }

/* ---------- 工具列 ---------- */

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }

.field {
    font: inherit;
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    color: inherit;
}

.toolbar .field[type="search"] { flex: 1; min-width: 220px; }

.field:focus { outline: none; border-color: var(--brand); }

.sel { max-width: 220px; }

.ghost {
    font: inherit;
    font-size: 13.5px;
    padding: 10px 18px;
    border: 1px solid #d5dad6;
    border-radius: 10px;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 提示條 ---------- */

/* 2026-08-31 UI 審查 P1：提示框不再用左色條（AI 介面最典型的指紋，全站曾有 7 處）。
   一般提示＝淡綠底無邊條；只有「警告」保留黃底＋色條，讓色條真的代表「要注意」。 */
.note {
    background: #f3f8f5;
    border: 1px solid #dfe9e3;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: #3f4d46;
    margin-bottom: 18px;
}

.note-review { background: #fffdf5; border-color: #ece3c8; border-left: 3px solid #d9c37e; border-radius: 0 10px 10px 0; color: #6b5a24; }

.note-review b { color: #8a6d1f; }

/* 審稿模式的確認鈕。未確認＝待辦色，已確認＝品牌綠描邊，不用實心彩鈕 */
.flag-btn {
    display: inline-block; font-size: 11.5px; line-height: 1.7;
    padding: 3px 11px; border-radius: 20px; cursor: pointer;
    border: 1px solid #e0d4ad; color: #8a6d1f; background: #fffdf5;
    transition: border-color .15s, color .15s;
}

.flag-btn:hover { border-color: #c9b47a; }

.flag-btn.on { border-color: var(--brand); color: var(--brand); background: #f4faf6; }

.flag-btn[disabled] { opacity: .5; cursor: wait; }

.review-bar {
    margin-top: 26px; padding: 12px 16px; border: 1px dashed var(--line);
    border-radius: 10px; background: #fbfcfb;
    display: flex; gap: 12px; align-items: center; justify-content: space-between;
    flex-wrap: wrap; font-size: 12.5px; color: var(--muted);
}

.review-bar a { color: var(--brand); text-decoration: none; font-weight: 500; }

.review-bar a:hover { text-decoration: underline; }

.flag {
    display: inline-block;
    font-size: 11.5px;
    line-height: 1.7;
    padding: 0 8px;
    border: 1px solid #e0d4ad;
    border-radius: 20px;
    color: #8a6d1f;
    background: #fffdf5;
    white-space: nowrap;
}

/* ---------- 分類與卡片 ---------- */

.cat { margin-bottom: 40px; }

.cat-head { display: flex; align-items: center; gap: 10px; }

.cat-ic { color: var(--brand); display: flex; }

.cat-head h2 { font-size: 19px; }

.cat-n { font-size: 12.5px; color: var(--faint); margin-left: 2px; }

.cat-sub { font-size: 13.5px; color: var(--muted); margin: 4px 0 0 32px; }

/* 五欄格狀，跟 swine.tw/blog 同一個節奏。
   刻意寫死斷點而不是 auto-fill：auto-fill 在 1280px 會排出六欄，
   卡片會窄到標題每行只剩四個字。 */
.grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px 20px;
}

@media (max-width: 1199px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 959px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 719px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; } }
@media (max-width: 479px)  { .grid { grid-template-columns: 1fr; } }

.card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}

.card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(24, 63, 46, .12); }

.cv { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #eceeed; }

.cv img { width: 100%; height: 100%; object-fit: cover; }

.cv-gen {
    color: rgba(255,255,255,.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cv-gen.g0 { background: linear-gradient(145deg, #2f7154, #163f2d); }
.cv-gen.g1 { background: linear-gradient(145deg, #276549, #113627); }
.cv-gen.g2 { background: linear-gradient(200deg, #34785a, #1a4633); }
.cv-gen.g3 { background: linear-gradient(115deg, #245f44, #15402e); }

.card:hover .cv-gen { color: #fff; }

/* 卡片內文的順序照 swine.tw：標題 → 分類, 日期 → 兩行摘要。
   分類原本在標題上方，改到下方跟日期同一行才是那個站的樣子。 */

.card-b { padding: 13px 15px 15px; display: flex; flex-direction: column; flex: 1; }

/* 標題壓成兩行：卡片高度差太多的話，五欄排起來會像參差不齊的積木 */
.card-b h3 {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-b h3 .no { color: var(--brand); font-weight: 700; margin-right: 2px; }

/* 分類長度不一，讓它自己截斷；日期是固定寬度不可被擠到下一行 */
.card-meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; align-items: baseline; white-space: nowrap; }

.card-meta > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

.card-meta .sep, .card-meta > span:last-child { flex: none; }

.card-meta .sep { color: #c8cfca; }

.card-b p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 7px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-f { margin-top: auto; padding-top: 11px; font-size: 12px; color: var(--faint); display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------- 最新新聞 ---------- */

.news-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.nt {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px;
    border: 1px solid #d5dad6;
    border-radius: 20px;
    background: var(--paper);
    text-decoration: none;
    font-size: 13.5px;
    white-space: nowrap;
}

.nt:hover { border-color: var(--brand); color: var(--brand); }

.nt.on { border-color: var(--brand); background: var(--brand); color: #fff; }

.nt span { font-size: 12px; opacity: .6; }

.pin {
    display: inline-block;
    font-size: 11.5px;
    line-height: 1.7;
    padding: 0 9px;
    border-radius: 20px;
    color: var(--brand);
    background: #eaf3ee;
    white-space: nowrap;
}

.art-date { font-size: 13px; color: var(--muted); }

/* ---------- 搜尋結果 ---------- */

.results { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }

.results h2 { font-size: 13px; color: var(--muted); font-weight: 500; padding: 13px 18px; border-bottom: 1px solid var(--line); }

.result { display: block; padding: 13px 18px; text-decoration: none; border-bottom: 1px solid #f1f3f2; }

.result:last-child { border-bottom: 0; }

.result:hover { background: #f7faf8; }

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

.result .tt { display: block; font-weight: 500; font-size: 15px; }

.result .ss { display: block; font-size: 13px; color: var(--muted); }

.empty { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

.elsewhere {
    display: flex; gap: 11px; align-items: flex-start;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 15px 18px; margin-bottom: 18px; font-size: 14px;
}

.elsewhere > .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 9px; }

.elsewhere .links { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.elsewhere .links a { display: inline-block; padding: 6px 14px; border: 1px solid #d5dad6; border-radius: 20px; text-decoration: none; font-size: 13px; }

.elsewhere .links a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- 文章頁 ---------- */

.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; display: flex; gap: 7px; flex-wrap: wrap; }

.crumbs a { text-decoration: none; }

.crumbs a:hover { color: var(--brand); }

.crumbs .here { color: var(--ink); }

.art-head h1 { font-size: 30px; line-height: 1.4; }

.art-meta { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.art-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--brand); }

.art-tags { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }

.art-tags a { font-size: 12.5px; color: #8f9a94; text-decoration: none; }

.art-tags a:hover { color: var(--brand); }

.art-hero { margin: 22px 0 26px; border-radius: var(--radius); overflow: hidden; }

.art-hero img { width: 100%; max-height: 420px; object-fit: cover; }

.art-hero-gen {
    color: rgba(255,255,255,.9);
    min-height: 190px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.art-hero-gen.g0 { background: linear-gradient(145deg, #2f7154, #163f2d); }
.art-hero-gen.g1 { background: linear-gradient(145deg, #276549, #113627); }
.art-hero-gen.g2 { background: linear-gradient(200deg, #34785a, #1a4633); }
.art-hero-gen.g3 { background: linear-gradient(115deg, #245f44, #15402e); }

/* ---------- 文章頁：分類切換列 ---------- */

.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }

.cp {
    font-size: 13.5px; padding: 8px 17px; border-radius: 22px;
    border: 1px solid var(--line); background: var(--paper); color: #5b6660;
    text-decoration: none; white-space: nowrap; transition: border-color .15s, color .15s;
}

.cp:hover { border-color: var(--brand); color: var(--brand); }

/* 目前所在的分類用實心：這是「你在哪裡」的定位資訊，描邊分不出來 */
.cp.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; }

/* ---------- 文章頁：標題與 meta ---------- */

.art-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }

.art-meta { display: flex; gap: 18px; align-items: center; margin-top: 12px; flex-wrap: wrap; }

.am { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }

.am svg { opacity: .75; }

/* ---------- 文章頁：本文重點 ---------- */

.art-lead {
    background: #f3f8f5;
    border: 1px solid #dfe9e3;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 15.5px;
    color: #33403a;
    margin-bottom: 20px;
}

.art-lead p { margin: 0; line-height: 1.85; }

.art-lead-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 700; color: var(--brand); margin-bottom: 7px;
}

/* ---------- 文章頁：文章目錄卡 ---------- */

.art-toc-box {
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
    padding: 0 20px; margin-bottom: 30px;
}

.art-toc-box > summary {
    cursor: pointer; list-style: none; min-height: 50px;
    display: flex; align-items: center; justify-content: space-between;
}

.art-toc-box > summary::-webkit-details-marker { display: none; }

.tb-t {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14.5px; font-weight: 700; color: var(--brand-deep);
}

.art-toc-box > summary i {
    width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); margin-right: 4px; transition: transform .18s;
}

.art-toc-box[open] > summary i { transform: rotate(-135deg); }

.art-toc-box ol {
    margin: 0; padding: 4px 0 18px 4px; border-top: 1px solid var(--line);
    list-style: none; counter-reset: toc;
}

.art-toc-box li { font-size: 14px; margin: 9px 0; line-height: 1.6; }
.art-toc-box li.lv2 { counter-increment: toc; }
.art-toc-box li.lv2 a::before { content: counter(toc) ". "; color: var(--brand); font-weight: 600; }
.art-toc-box li.lv3 a::before,
.art-toc-box li.lv4 a::before { content: "•"; margin-right: 8px; color: #b6c2bc; }

.art-toc-box a { color: #4b5a52; text-decoration: none; display: inline-block; padding: 4px 0; }

.art-toc-box a:hover { color: var(--brand); text-decoration: underline; }

/* 目錄是文章頁最主要的導航，手機上把觸控區撐到 44px。
   這段一定要放在上面那幾條 .art-toc-box 之後：CSS 同特異性是後者勝出，
   放到前面的話會被上面的 padding: 4px 蓋掉。 */
@media (max-width: 900px) {
    .art-toc-box li { margin: 0; }
    .art-toc-box a { display: block; padding: 12px 0; }
}

/* ---------- 文章頁：側欄最新文章 ---------- */

.art-side { flex: none; width: 300px; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 18px; }

.side-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }

.side-t {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--brand-deep);
    padding-bottom: 11px; border-bottom: 2px solid var(--brand);
}

.side-t svg { color: var(--brand); }

.side-list { list-style: none; margin: 0; padding: 0; }

.side-list li { border-bottom: 1px solid var(--line); }

.side-list li:last-child { border-bottom: 0; }

.side-list a { display: flex; gap: 12px; padding: 13px 0; text-decoration: none; align-items: flex-start; }

.sl-cv { flex: none; width: 84px; height: 60px; border-radius: 7px; overflow: hidden; background: #eef2ef; }

.sl-cv img { width: 100%; height: 100%; object-fit: cover; }

.sl-cv-gen.g0 { background: linear-gradient(145deg, #2f7154, #163f2d); }
.sl-cv-gen.g1 { background: linear-gradient(145deg, #276549, #113627); }
.sl-cv-gen.g2 { background: linear-gradient(200deg, #34785a, #1a4633); }
.sl-cv-gen.g3 { background: linear-gradient(115deg, #245f44, #15402e); }

.sl-txt { min-width: 0; }

.sl-txt b { display: block; font-size: 13.5px; line-height: 1.55; color: var(--ink); font-weight: 500; }

.side-list a:hover .sl-txt b { color: var(--brand); }

.sl-txt em { display: block; font-style: normal; font-size: 12px; color: var(--faint); margin-top: 5px; }

/* ---------- 文章頁：浮動分享與回頂 ---------- */

.float-share {
    position: fixed; left: 22px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 10px; z-index: 30;
}

.fs {
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper); border: 1px solid var(--line); color: #6b7280;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 2px 10px rgba(28, 71, 53, .07);
    transition: color .15s, border-color .15s, transform .15s;
}

.fs:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

.to-top {
    position: fixed; right: 22px; bottom: 26px; z-index: 30;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--paper); border: 1px solid var(--line); color: #6b7280; cursor: pointer;
    box-shadow: 0 2px 10px rgba(28, 71, 53, .07);
    opacity: 0; pointer-events: none; transition: opacity .2s, color .15s, border-color .15s;
}

.to-top.on { opacity: 1; pointer-events: auto; }

.to-top:hover { color: var(--brand); border-color: var(--brand); }
.art-cols { display: flex; gap: 34px; align-items: flex-start; }

.art-body { flex: 1; min-width: 0; font-size: 16px; color: #37404a; }

.art-body p { margin: 0 0 12px; }

.art-body .li { padding-left: 16px; text-indent: -16px; margin: 0 0 5px; }

.art-body strong { color: var(--brand-deep); }

.art-body .callout {
    background: #f4f7f5;
    border: 1px solid #e3ebe6;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 16px 0;
}

.art-body .callout.warn { background: #fdf8f4; border-color: #ecd9cb; border-left: 3px solid #dcb69a; border-radius: 0 10px 10px 0; }

/* 提示框的圖示：原本靠 📌／⚠️ emoji，每個裝置長得不一樣、也跟全站線條 icon 打架，改成同一套 SVG */
.callout { display: flex; gap: 10px; align-items: flex-start; }

.callout .co-ic { flex: none; margin-top: 4px; color: var(--brand); display: inline-flex; }

.callout.warn .co-ic { color: #b98a4e; }

.callout .co-tx { flex: 1; min-width: 0; }

.sec { margin-top: 34px; }
.art-body [id] { scroll-margin-top: calc(var(--top-h) + 14px); }

.sec h2 {
    font-size: 20px;
    color: var(--brand-deep);
    padding: 2px 0 2px 14px;
    border-left: 4px solid var(--brand);
    margin-bottom: 16px;
    line-height: 1.5;
}

.sec.hit h2 { border-left-color: #c9a227; }

.sec.hit { background: #f1f7f3; border-radius: 10px; padding: 4px 16px 12px; margin-left: -16px; margin-right: -16px; }

.sec-sub { color: var(--muted); font-size: 13.5px; margin-top: -6px !important; margin-bottom: 12px !important; }

.sec-src { font-size: 12px; color: var(--muted); margin-top: 14px; }

.art-share { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }

.art-nav { display: flex; gap: 14px; margin-top: 40px; }

.pn {
    flex: 1;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 17px;
    text-decoration: none;
    min-width: 0;
}

.pn.empty { background: none; border: 0; }

.pn:not(.empty):hover { border-color: var(--brand); }

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

.pn b { display: block; font-size: 14.5px; margin-top: 3px; }

.pn.right { text-align: right; }

.related { margin-top: 44px; }

.related h2 { font-size: 17px; margin-bottom: 14px; }

.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }

.rel-list a {
    background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
    text-decoration: none; overflow: hidden; display: flex; flex-direction: column;
}

.rel-list a:hover { border-color: var(--brand); }

.rel-cv { display: block; height: 108px; background: #eef2ef; overflow: hidden; }

.rel-cv img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rel-cv-gen.g0 { background: linear-gradient(145deg, #2f7154, #163f2d); }
.rel-cv-gen.g1 { background: linear-gradient(145deg, #276549, #113627); }
.rel-cv-gen.g2 { background: linear-gradient(200deg, #34785a, #1a4633); }
.rel-cv-gen.g3 { background: linear-gradient(115deg, #245f44, #15402e); }

.rel-txt { display: block; padding: 13px 16px; }

.rel-list b { display: block; font-size: 14.5px; }

.rel-txt span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 頁尾 ---------- */

.site-foot { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 12px; color: var(--muted); text-align: center; line-height: 2; }

/* ---------- 員工登入 ---------- */

.staff-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

.staff-box { width: 100%; max-width: 380px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px; }

.staff-box .mk { color: var(--brand-deep); display: flex; justify-content: center; margin-bottom: 14px; }

.staff-box h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }

.staff-box .sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 24px; }

.staff-box label { display: block; font-size: 13px; margin-bottom: 6px; color: #4b5563; }

.staff-box input {
    width: 100%; font: inherit; font-size: 14px; padding: 10px 13px;
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 15px; background: var(--paper); color: inherit;
}

.staff-box input:focus { outline: none; border-color: var(--brand); }

.staff-box button {
    width: 100%; font: inherit; font-size: 15px; padding: 11px;
    border: 1px solid var(--brand-deep); border-radius: 10px; background: var(--brand-deep); color: #fff; cursor: pointer; margin-top: 4px;
}

.staff-box button:hover { background: #143528; }

.staff-err { background: #fdf5f3; border: 1px solid #eccfc4; color: #9b4a2c; border-radius: 8px; padding: 9px 13px; font-size: 13px; margin-bottom: 16px; }

.staff-back { text-align: center; margin-top: 18px; font-size: 13px; }

.staff-back a { color: var(--muted); }

/* ---------- 手機 ---------- */

@media (max-width: 640px) {
    :root { --wrap-pad: 15px; }
    .hero { padding-top: 26px; padding-bottom: 24px; }
    .hero h1 { font-size: 22px; }
    .page { padding: 20px var(--wrap-pad) 50px; }
    .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .cv-tt { font-size: 15px; }
    .card-b { padding: 12px 13px 14px; }
    .card-b h3 { font-size: 14.5px; }
    .card-b p { display: none; }
    .art-head h1 { font-size: 23px; }
    .art-hero-gen { min-height: 170px; }
    .art-hero-gen .tt { font-size: 20px; }
    .art-body { font-size: 15px; }
    .sec h2 { font-size: 18px; }
    .sec.hit { margin-left: -10px; margin-right: -10px; padding: 4px 10px 10px; }
    .art-nav { flex-direction: column; }
    .toolbar .field[type="search"] { min-width: 100%; }
    .sel { max-width: none; flex: 1; }
}

/* 業務自助頁（/sales） */
.sp-h2 { font-size: 17px; margin: 34px 0 12px; color: #253027; }
.sp-h2:first-of-type { margin-top: 0; }
.sp-table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.sp-table th {
    text-align: left;
    font-weight: 500;
    font-size: 12.5px;
    color: #7b8480;
    background: #f7f9f8;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.sp-table td { padding: 11px 14px; border-bottom: 1px solid #f1f3f2; vertical-align: top; }
.sp-table tbody tr:last-child td { border-bottom: none; }
.sp-table a { color: var(--brand); text-decoration: none; font-weight: 500; }
.sp-table a:hover { text-decoration: underline; }
.sp-sub { color: var(--faint); font-size: 12.5px; }
.sp-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-late { color: #c2410c; font-weight: 500; }
.sp-tier {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-deep);
    background: #e8f0ea;
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.6;
    vertical-align: middle;
}
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp-list li { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; font-size: 13.5px; flex-wrap: wrap; }
.sp-grow { flex: 1; min-width: 0; }
.sp-date { color: #7b8480; font-variant-numeric: tabular-nums; }

/* 業務自助頁：拜訪紀錄表單 */
.sp-form { background: #f7faf8; border: 1px solid #dfe7e2; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.sp-form-title { font-size: 14px; font-weight: 600; color: #253027; margin-bottom: 13px; }
.sp-form-grid { display: grid; grid-template-columns: 170px 170px 1fr; gap: 12px 14px; align-items: end; }
.sp-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #7b8480; }
.sp-form-wide { grid-column: 1 / -1; }
.sp-form-grid input, .sp-form-grid select, .sp-form-grid textarea {
    font: inherit;
    font-size: 14px;
    color: #37404a;
    padding: 8px 11px;
    border: 1px solid #d9e0dc;
    border-radius: 8px;
    background: var(--paper);
    width: 100%;
}
.sp-form-grid textarea { resize: vertical; line-height: 1.7; }
.sp-form-grid input:focus, .sp-form-grid select:focus, .sp-form-grid textarea:focus { outline: none; border-color: var(--brand); }
.sp-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eef1ef;
    flex-wrap: wrap;
}
.sp-form-foot .sp-form-hint { margin-top: 0; flex: 1; min-width: 200px; }
.sp-form-foot button {
    font: inherit;
    font-size: 13.5px;
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    background: var(--brand-deep);
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
}
.sp-form-foot button:hover { background: #143a2a; }
.sp-form-foot button:disabled { opacity: .55; cursor: default; }
.sp-form-hint { font-size: 13px; color: var(--faint); margin-top: 11px; }
.sp-form-msg { font-size: 13px; color: var(--brand); margin-top: 8px; }
.sp-form-msg.err { color: #c2410c; }
.sp-done {
    font: inherit;
    font-size: 12px;
    padding: 4px 11px;
    border: 1px solid #d9e0dc;
    border-radius: 999px;
    background: var(--paper);
    color: #4d5a53;
    cursor: pointer;
    white-space: nowrap;
}
.sp-done:hover { background: #f2f5f3; border-color: #c2ccc6; color: var(--brand-deep); }
.sp-done:disabled { opacity: .5; cursor: default; }

.g-cta {
    display: inline-block;
    margin-top: 14px;
    background: #06c755;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 26px;
    border-radius: 999px;
}
.g-cta:hover { background: #05b34c; }
.g-cta-note { font-size: 12.5px; color: var(--faint); margin-top: 9px; }

@media (max-width: 700px) {
    .sp-form-grid { grid-template-columns: 1fr 1fr; }
    .sp-form-foot { flex-direction: column; align-items: stretch; }
    .sp-form-foot button { width: 100%; }
}
.sp-done-msg { font-size: 12px; color: #c2410c; margin-right: 8px; white-space: nowrap; }

/* ---------- 症狀速查（業務用逐層選單） ---------- */

.sym-q {
    font-size: 15px;
    color: var(--muted);
    font-weight: 500;
    margin: 26px 0 12px;
}

.sym-body { margin-bottom: 4px; }

.sym-list { display: flex; flex-direction: column; gap: 9px; }

.sym-opt {
    position: relative;
    display: block;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 15px 44px 15px 18px;
    text-decoration: none;
    transition: border-color .15s, transform .15s;
}

.sym-opt:hover { border-color: var(--brand); transform: translateX(2px); }

.sym-tt { display: block; font-size: 16.5px; font-weight: 500; color: var(--ink); line-height: 1.5; }

.sym-tt small { font-size: 12px; color: var(--faint); font-weight: 400; margin-left: 7px; }

.sym-ss { display: block; font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.7; }

.sym-go {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: #c2ccc6;
}

.sym-opt:hover .sym-go { color: var(--brand); }

.sym-rel { display: flex; flex-wrap: wrap; gap: 9px; }

.sym-relcard {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 17px 8px 9px;
    text-decoration: none;
    font-size: 13.5px;
}

.sym-relcard:hover { border-color: var(--brand); }

.sym-relscope {
    font-size: 11.5px;
    color: var(--muted);
    background: #f1f4f2;
    border-radius: 999px;
    padding: 3px 9px;
}

.sym-relscope.in { color: #8a6d1f; background: #fdf8e8; }

.sym-reltt { color: var(--ink); }

.sym-foot {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .sym-opt { padding: 14px 38px 14px 15px; }
    .sym-tt { font-size: 16px; }
    .sym-foot .ghost { flex: 1; text-align: center; }
}

.sym-entry {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 18px;
}

.sym-entry-t b { font-size: 15.5px; color: var(--brand-deep); }

.sym-entry-t span { font-size: 13.5px; color: var(--muted); margin-left: 9px; }

.sym-entry-b { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 700px) {
    .sym-entry-t span { display: block; margin-left: 0; margin-top: 4px; }
    .sym-entry-b .ghost { flex: 1; text-align: center; }
}

/* 列表頁的分類膠囊多一個篇數；文章頁那排沒有數字，所以只在有 .cp-n 時才留間距 */
.cp-n {
    display: inline-block; margin-left: 7px; font-size: 11.5px;
    color: var(--faint); font-variant-numeric: tabular-nums;
}

.cp.on .cp-n { color: rgba(255,255,255,.75); }

/* ---------- 飼養計算工具 ---------- */

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }

.tool-card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 20px; text-decoration: none; display: flex; flex-direction: column; gap: 7px;
    transition: border-color .15s, transform .15s;
}

.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); }

.tool-card b { font-size: 16px; color: var(--brand-deep); }

.tool-card span { font-size: 13.5px; color: var(--muted); line-height: 1.75; flex: 1; }

.tool-card em { font-style: normal; font-size: 12px; color: var(--brand); }

.tool-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }

.tf-row { margin-bottom: 16px; }

.tf-row > label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

.tf-opt { font-weight: 400; color: var(--faint); font-size: 13px; }

.tf-in { display: flex; align-items: center; gap: 9px; }

.tf-in .field { flex: 1; min-width: 0; }

.tf-unit { font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 52px; }

.tf-hint { font-size: 13px; color: var(--faint); margin-top: 5px; line-height: 1.7; }

.tf-act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

.btn-calc {
    font: inherit; font-size: 14.5px; font-weight: 500; padding: 11px 30px;
    border: 0; border-radius: 10px; background: var(--brand); color: #fff; cursor: pointer;
}

.btn-calc:hover { background: var(--brand-deep); }

.tf-pre { font-size: 12.5px; color: var(--brand); }

/* 結果 */

.tool-res { margin-top: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.tr-head {
    display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px;
    padding: 14px 20px; background: #f4faf6; border-bottom: 1px solid #dfeae3;
}

.tr-head b { color: var(--brand-deep); font-size: 15px; }

.tr-head span { font-size: 12px; color: var(--muted); }

.tr-tab { width: 100%; border-collapse: collapse; }

.tr-tab th {
    text-align: left; font-weight: 400; color: var(--muted); font-size: 13.5px;
    padding: 11px 20px; width: 42%; border-bottom: 1px solid var(--line); vertical-align: top;
}

.tr-tab td { padding: 11px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }

.tr-tab tr:last-child th, .tr-tab tr:last-child td { border-bottom: 0; }

.tr-tab b { font-size: 18px; color: var(--brand-deep); }

.tr-tab em { display: block; font-style: normal; font-size: 12px; color: var(--faint); margin-top: 3px; }

.tr-sub { padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfcfb; }

.tr-sub b { font-size: 12.5px; color: var(--muted); }

.tr-sub ul { margin: 6px 0 0; padding-left: 18px; }

.tr-sub li { font-size: 13px; color: #4b5a52; margin-bottom: 3px; }

.tr-save { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.tr-save .field { flex: 1; min-width: 180px; }

.tr-save span { font-size: 12.5px; color: var(--brand); }

.tool-miss {
    margin-top: 22px; background: #fffdf5; border: 1px solid #ece3c8;
    border-left: 3px solid #d9c37e; border-radius: 0 10px 10px 0; padding: 16px 20px;
}

.tool-miss b { color: #8a6d1f; font-size: 15px; }

.tool-miss p { font-size: 13.5px; color: #6b5a24; margin-top: 6px; line-height: 1.8; }

.tm-why { color: var(--faint) !important; font-size: 12.5px !important; }

.tool-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 30px; }

.tool-meta b { display: block; font-size: 12.5px; color: var(--brand); margin-bottom: 6px; }

.tool-meta p { font-size: 13px; color: var(--muted); line-height: 1.85; }

.param-list { list-style: none; margin: 0; padding: 0; }

.param-list li { padding: 11px 0; border-bottom: 1px solid var(--line); }

.param-list li:last-child { border-bottom: 0; }

.param-list b { display: block; font-size: 13px; font-weight: 500; }

.param-list span { font-size: 15px; color: var(--brand-deep); font-weight: 700; }

.param-list em { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.65; }

.param-foot { font-size: 11.5px; color: var(--faint); margin-top: 12px; line-height: 1.7; }

.rec-list { list-style: none; margin: 0; padding: 0; }

.rec-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }

.rec-list li:last-child { border-bottom: 0; }

.rec-list b { display: block; font-size: 13.5px; font-weight: 500; }

.rec-list em { display: block; font-style: normal; font-size: 11.5px; color: var(--faint); margin-top: 3px; }

.rec-list span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }

@media (max-width: 640px) {
    .tool-meta { grid-template-columns: 1fr; gap: 16px; }
    .tool-form { padding: 18px 16px; }
}

/* 分享列：圖標＋文字。用描邊不用實心彩鈕 */
.art-share { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 30px; }

.art-share-t { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-right: 4px; }

.sh {
    display: inline-flex; align-items: center; gap: 7px;
    font: inherit; font-size: 13.5px; padding: 8px 15px;
    border: 1px solid #d5dad6; border-radius: 10px; background: var(--paper); color: var(--ink);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: border-color .15s, color .15s;
}

.sh:hover { border-color: var(--brand); color: var(--brand); }

/* 平台色只上在 icon，整顆按鈕維持灰描邊 */
.sh-line:hover { border-color: #06c755; color: #06c755; }

.sh-fb:hover { border-color: #1877f2; color: #1877f2; }

/* 目錄的階層縮排：h3 往內縮一階，看得出從屬關係 */
.art-toc-box li.lv1 a { font-weight: 700; color: var(--ink); }
.art-toc-box li.lv3 { margin-left: 20px; font-size: 13px; color: var(--muted); }

.art-toc-box li.lv4 { margin-left: 40px; font-size: 12.5px; color: var(--muted); }

/* 內文小標。h2 有色條、h3 用粗體加點距離，層級一眼看得出來 */
.art-body h3 {
    font-size: 16.5px; color: var(--brand-deep); margin: 26px 0 10px;
    padding-left: 11px; border-left: 3px solid #cfe0d6;
}

.art-body h4 { font-size: 15px; color: #3d4a43; margin: 20px 0 8px; }

/* ---------- 活動型消息 ----------
   海報是直式的，不能走 .art-hero 那套 max-height + cover（會裁成一條）。
   左圖右資訊卡；手機改成資訊卡在上、海報在下——先知道「幾號、哪裡」再滑海報。
   配色跟全站一樣：只有日期數字染品牌色，按鈕維持灰描邊 ghost，狀態用小色點。 */

.ev { display: flex; gap: 28px; align-items: flex-start; margin: 22px 0 28px; }

.ev-poster { flex: 0 0 min(46%, 440px); margin: 0; }

.ev-poster a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.ev-poster img { width: 100%; height: auto; display: block; }

.ev-poster figcaption { font-size: 12px; color: var(--faint); text-align: center; margin-top: 7px; }

.ev-side { flex: 1; min-width: 0; display: grid; gap: 16px; align-content: start; }

.ev-side .art-lead { margin-bottom: 0; }

.ev-info { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }

.ev-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }

.ev-state i { width: 7px; height: 7px; border-radius: 50%; background: #c8cfca; display: inline-block; }

.ev-state.soon i, .ev-state.today i, .ev-state.ongoing i { background: var(--brand); }

.ev-state.today, .ev-state.ongoing { color: var(--brand); font-weight: 500; }

.ev-state.ended i { background: #c8cfca; }

.ev-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px; margin-top: 6px; line-height: 1.1; }

.ev-date b { font-size: 46px; font-weight: 700; color: var(--brand); letter-spacing: -.5px; }

.ev-date span { font-size: 17px; color: #4b5563; }

.ev-date em { font-style: normal; font-size: 22px; color: #c8cfca; margin: 0 6px; }

.ev-full { font-size: 13.5px; color: var(--muted); margin-top: 6px; }

.ev-rows { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }

.ev-rows li { display: flex; gap: 9px; align-items: flex-start; font-size: 15px; color: #37404a; }

.ev-rows svg { flex: none; margin-top: 4px; color: var(--brand); opacity: .8; }

.ev-map { font-size: 12.5px; color: var(--brand); margin-left: 8px; white-space: nowrap; }

.ev-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 18px; }

.ev-actions .ghost { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.ev-actions .ghost svg { opacity: .7; }

@media (max-width: 760px) {
    .ev { flex-direction: column; gap: 16px; }
    .ev-poster { flex: none; width: 100%; order: 2; }
    .ev-side { order: 1; width: 100%; }
    .ev-info { padding: 18px 18px 20px; }
    .ev-date b { font-size: 40px; }
}

/* 列表卡：海報用 top 對齊露出標題區、左上角壓日期徽章、結束的整張轉灰 */

.cv-ev img { object-position: top; }

.ev-badge {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; align-items: center;
    min-width: 52px; padding: 5px 8px 6px;
    background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 10px;
    line-height: 1.15; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.ev-badge b { font-size: 15px; font-weight: 700; color: var(--brand); }

.ev-badge i { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; }

.card-loc { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.card-loc svg { opacity: .7; flex: none; }

.card-f .ev-state { font-size: 12px; }

.card.is-ended .cv img, .card.is-ended .cv-gen { filter: grayscale(1); opacity: .65; }

.card.is-ended .ev-badge b { color: var(--muted); }

.card.is-ended h3 { color: var(--muted); }

/* ---------- 2026-08-31 UI 審查 P0 ----------
   受眾是在畜舍裡看手機的人：手機首屏不能全是控制項、灰字要看得到、浮動元件不能壓內文。 */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 左側浮動分享列在 1280 寬會壓到內文（wrap 1280 + 22px 邊距，列本身 64px），只有更寬的螢幕才有空位 */
@media (max-width: 1380px) {
    .float-share { display: none; }
}

@media (max-width: 700px) {
    /* 分類膊囊改單行橫向捲動：原本 7～8 顆排成 4 行，h1 要滑到 335px 才看到 */
    .cat-pills, .news-tabs {
        flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        scrollbar-width: none; margin-left: calc(-1 * var(--wrap-pad)); margin-right: calc(-1 * var(--wrap-pad)); padding: 0 var(--wrap-pad) 8px;
        mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    }
    .cat-pills::-webkit-scrollbar, .news-tabs::-webkit-scrollbar { display: none; }
    .cp, .nt { flex: none; }

    /* 卡片 meta 允許換行：分類寫完整，日期退到第二行，不再截成「日常飼…」 */
    .card-meta { white-space: normal; flex-wrap: wrap; row-gap: 2px; }
    .card-meta > span:first-child { overflow: visible; text-overflow: clip; }
}

/* ---------- UI 審查 P1 ---------- */

/* 沒封面的消息不畫圖區：原本是一整塊深綠漸層＋大白 icon，四張裡三張長這樣，整頁像佔位圖展 */
.card-nocv .card-b { padding-top: 18px; }

.card-nocv .card-b h3 { font-size: 16px; }

.card-nocv .card-b h3::before { content: ""; display: block; width: 26px; height: 3px; background: var(--brand); border-radius: 2px; margin-bottom: 12px; opacity: .8; }

/* 工具首頁：從八張同款卡改成兩組清單，每一項寫「輸入什麼 → 得到什麼」 */
.tool-group { margin-bottom: 34px; }

.tool-group-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

.tool-group-h h2 { font-size: 18px; color: var(--brand-deep); }

.tool-group-h span { font-size: 13.5px; color: var(--muted); }

.tool-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }

.tool-row {
    display: block; text-decoration: none; color: inherit;
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px 15px; transition: border-color .15s, transform .15s;
}

.tool-row:hover { border-color: var(--brand); transform: translateY(-1px); }

.tool-row-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.tool-row-t b { font-size: 16px; color: var(--brand-deep); }

.tool-row-t i { font-style: normal; color: var(--brand); font-size: 18px; line-height: 1; transition: transform .15s; }

.tool-row:hover .tool-row-t i { transform: translateX(3px); }

.tool-row p { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin: 5px 0 10px; }

.tool-io { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; line-height: 1.7; padding-top: 10px; border-top: 1px dashed var(--line); }

.tool-io .io-k { color: var(--faint); font-size: 12px; letter-spacing: .06em; padding-top: 1px; white-space: nowrap; }

.tool-io .io-v { color: #37404a; }

.tool-io .io-v.gives { color: var(--brand-deep); font-weight: 500; }

@media (max-width: 760px) {
    .tool-list { grid-template-columns: 1fr; }
}

/* 頁尾：從兩行灰字改成三欄——誰在經營、往哪去、怎麼聯絡。對外站的信任訊號 */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 34px; font-size: 13.5px; color: var(--muted); text-align: left; line-height: 1.8; background: #eef2ef; }

.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 28px 40px; }

.foot-name { display: flex; align-items: center; gap: 9px; color: var(--brand-deep); }

.foot-name b { font-size: 18px; letter-spacing: .06em; }

.foot-name small { font-size: 11px; letter-spacing: .22em; color: var(--faint); margin-left: 2px; }

.foot-co { font-size: 14.5px; font-weight: 500; color: var(--ink); margin-top: 8px; }

.foot-brand p { margin-top: 8px; font-size: 13.5px; max-width: 34em; }

.foot-h { font-size: 12.5px; letter-spacing: .08em; color: var(--faint); margin-bottom: 8px; }

.foot-links a { display: block; color: var(--ink); text-decoration: none; padding: 3px 0; }

.foot-links a:hover { color: var(--brand); }

.foot-contact .ghost { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); }

.foot-contact .ghost svg { color: #06c755; }

.foot-social { display: flex; gap: 14px; margin-top: 10px; }

.foot-social a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }

.foot-social a:hover { color: var(--brand); }

.foot-hot { margin-top: 14px; font-size: 13px; }

.foot-hot b { display: block; color: var(--ink); font-size: 15px; letter-spacing: .02em; }

.foot-hot span { font-size: 12px; color: var(--faint); }

.foot-legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid #dfe5e1; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.foot-legal.only { margin-top: 0; padding-top: 0; border-top: 0; justify-content: center; }

@media (max-width: 760px) {
    .foot-grid { grid-template-columns: 1fr; gap: 22px; }
    .foot-legal { flex-direction: column; gap: 4px; }
}

/* ---------- /kb 精選輪播 ---------- */
.kb-car { position: relative; margin: 2px 0 24px; }
.kc-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 14px; }
.kc-track::-webkit-scrollbar { display: none; }
.kc-slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: flex-end; min-height: 240px; color: #fff; text-decoration: none; overflow: hidden; }
.kc-bg { position: absolute; inset: 0; }
.kc-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,36,26,.08) 30%, rgba(13,36,26,.72)); }
.kc-body { position: relative; z-index: 1; padding: 26px 30px 40px; max-width: 660px; display: flex; flex-direction: column; gap: 8px; }
.kc-tag { font-size: 12.5px; letter-spacing: .1em; opacity: .88; }
.kc-slide h3 { margin: 0; font-size: 24px; line-height: 1.4; color: #fff; font-weight: 700; }
.kc-slide p { margin: 0; font-size: 14px; line-height: 1.7; opacity: .92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(13,36,26,.25); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.kc-nav:hover { background: rgba(13,36,26,.5); }
.kc-nav.prev { left: 14px; }
.kc-nav.next { right: 14px; }
.kc-dots { position: absolute; right: 18px; bottom: 14px; z-index: 2; display: flex; gap: 7px; }
.kc-dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.kc-dot.on { background: #fff; }
main.page { transition: opacity .18s; }
main.page.is-loading { opacity: .45; pointer-events: none; }
@media (max-width: 719px) {
    .kc-slide { min-height: 190px; }
    .kc-body { padding: 18px 18px 34px; }
    .kc-slide h3 { font-size: 18px; }
    .kc-slide p { display: none; }
    .kc-nav { display: none; }
}

/* 系統設「減少動態」：過渡直接切換、輪播不平滑捲、卡片不抬升（JS 端同時停自動播放） */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
    .kc-track { scroll-behavior: auto; }
    .card:hover { transform: none; }
}

/* ---------- 右下角 LINE CTA（全站唯一一顆） ---------- */
.line-cta {
    position: fixed; right: 22px; bottom: 26px; z-index: 31;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 18px 11px 14px; border-radius: 999px;
    background: var(--brand-deep, #1c4735); color: #fff; text-decoration: none;
    font-size: 14px; font-weight: 600; letter-spacing: .02em;
    box-shadow: 0 6px 18px rgba(24, 63, 46, .28);
    transition: transform .15s, box-shadow .15s, background .15s;
}
.line-cta:hover { background: #24593f; color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(24, 63, 46, .32); }
.line-cta svg { flex: none; }
.line-cta .lc-short { display: none; }
.to-top { bottom: 86px; }
@media (max-width: 719px) {
    .line-cta { right: 14px; bottom: 16px; padding: 10px 14px 10px 12px; font-size: 13.5px; }
    .line-cta .lc-full { display: none; }
    .line-cta .lc-short { display: inline; }
    .to-top { right: 14px; bottom: 70px; }
}
