/*
 * 鷹選金融 — 前台樣式
 *
 * 外掛頁面的內容都在 .cr 底下；例外是全站共用的頁首（.cr-header）、頁尾（.cr-footer）、
 * Cookie 說明列（.cr-cookie），以及暗色模式下的 Astra 本體覆寫（檔案最下方）。
 *
 * 亮／暗模式：所有顏色都走下面的變數。<html data-cr-theme="dark"> 時換成暗色那組；
 * 屬性由 CR_Chrome 在 <head> 最前面的 inline script 設定（避免閃白），
 * 預設跟隨系統，使用者按頁首的月亮／太陽按鈕切換後記在 localStorage。
 * 新增樣式時不要直接寫色碼，否則暗色模式會漏改。
 */

:root {
    color-scheme: light;
    --cr-primary: #17457a;
    --cr-primary-dark: #0f2e52;
    --cr-primary-soft: #e6eef8;
    --cr-on-primary: #ffffff;
    --cr-accent: #e5a823;
    --cr-accent-ink: #0f2e52;
    --cr-accent-text: #8a5d00;
    --cr-accent-soft: #fdf3dc;
    --cr-danger: #be123c;
    --cr-danger-soft: #fff1f2;
    --cr-danger-line: #fecdd3;
    --cr-success: #047857;
    --cr-text: #1c2533;
    --cr-muted: #5b6576;
    --cr-line: #e2e6ed;
    --cr-line-strong: #c9d6e8;
    --cr-bg: #f6f8fb;
    --cr-card: #ffffff;
    --cr-surface-2: #f1f4f8;
    --cr-field: #ffffff;
    --cr-track: #e2e6ed;
    --cr-hero-bg: linear-gradient(135deg, #17457a, #0f2e52 60%, #0b2340);
    --cr-footer-bg: #0b2340;
    --cr-radius: 14px;
    --cr-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}

html[data-cr-theme="dark"] {
    color-scheme: dark;
    --cr-primary: #7fb0e8;
    --cr-primary-dark: #a9cbf2;
    --cr-primary-soft: rgba(127, 176, 232, .14);
    --cr-on-primary: #0b1a2e;
    --cr-accent: #f0b93a;
    --cr-accent-ink: #0f2e52;
    --cr-accent-text: #f3c35a;
    --cr-accent-soft: rgba(240, 185, 58, .14);
    --cr-danger: #fb7185;
    --cr-danger-soft: rgba(251, 113, 133, .12);
    --cr-danger-line: rgba(251, 113, 133, .35);
    --cr-success: #34d399;
    --cr-text: #e3e9f2;
    --cr-muted: #9aa7b8;
    --cr-line: #263347;
    --cr-line-strong: #36465e;
    --cr-bg: #0b1220;
    --cr-card: #131c2c;
    --cr-surface-2: #182336;
    --cr-field: #0f1828;
    --cr-track: #1e293b;
    --cr-hero-bg: linear-gradient(135deg, #16365e, #0e2340 60%, #0b1a30);
    --cr-footer-bg: #070d18;
    --cr-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
}

/* Astra 的 .ast-container 是 flex：我們的內容直接放進去會被縮成內容寬度，改成整寬區塊（同 job-aggregator） */
body.cr-page #content > .ast-container {
    display: block;
    max-width: none;
    padding: 0;
}
body.cr-page { background: var(--cr-bg); }

.cr {
    color: var(--cr-text);
    background: var(--cr-bg);
    font-size: 15px;
    line-height: 1.6;
    padding: 24px 0 48px;
}

.cr *,
.cr *::before,
.cr *::after { box-sizing: border-box; }

/* Astra 的標題、粗體、表單欄位有自己的顏色（暗色模式會變成深字配深底），一律改跟著外掛變數；
   放在前面，後面個別元件（hero、問答）再指定顏色會蓋過這裡 */
.cr h1,
.cr h2,
.cr h3,
.cr h4,
.cr strong,
.cr b { color: inherit; }
.cr input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.cr select,
.cr textarea { background-color: var(--cr-field); color: var(--cr-text); }

.cr-container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.cr h1 { font-size: 28px; margin: 0 0 6px; line-height: 1.3; }
.cr h2 { font-size: 18px; margin: 0; line-height: 1.4; }
.cr-page-head { margin-bottom: 20px; }
.cr-page-head p { color: var(--cr-muted); margin: 0; }
.cr-muted { color: var(--cr-muted); }
.cr-fine { color: var(--cr-muted); font-size: 13px; margin-top: 24px; }

/* 按鈕 */
.cr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--cr-line);
    background: var(--cr-card);
    color: var(--cr-text);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
}
.cr-btn:hover { border-color: var(--cr-primary); color: var(--cr-primary); }
.cr-btn-primary { background: var(--cr-primary); border-color: var(--cr-primary); color: var(--cr-on-primary); }
.cr-btn-primary:hover { background: var(--cr-primary-dark); color: var(--cr-on-primary); }
.cr-link-btn { background: none; border: 0; color: var(--cr-muted); cursor: pointer; font-size: 14px; padding: 4px 8px; }
.cr-link-btn:hover { color: var(--cr-accent-text); }

/* 提示 */
.cr-notice {
    background: var(--cr-primary-soft);
    color: var(--cr-primary-dark);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-weight: 600;
}
.cr-empty,
.cr-login-box {
    background: var(--cr-card);
    border-radius: var(--cr-radius);
    box-shadow: var(--cr-shadow);
    padding: 28px 24px;
    text-align: center;
}
.cr-empty p { margin: 4px 0; }
.cr-login-box h2 { font-size: 20px; margin-bottom: 8px; }
.cr-login-box p { color: var(--cr-muted); max-width: 520px; margin: 0 auto 16px; }
.cr-login-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cr-login-social { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--cr-muted); }

/* 我的卡片 */
.cr-my-card {
    background: var(--cr-card);
    border-radius: var(--cr-radius);
    box-shadow: var(--cr-shadow);
    padding: 18px 20px;
    margin-bottom: 14px;
}
.cr-my-card.is-off { opacity: .7; }
.cr-my-card-head { display: flex; align-items: center; gap: 14px; }
.cr-my-card-head > div { flex: 1; min-width: 0; }
.cr-my-card-head p { margin: 2px 0 0; font-size: 13px; }
.cr-card-img { width: 72px; height: 46px; object-fit: cover; border-radius: 6px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.cr-card-img-blank { display: inline-block; background: linear-gradient(135deg, #cbd5e1, #94a3b8); }

.cr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; margin-top: 16px; }
.cr-fields label,
.cr-buckets label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--cr-muted); }
.cr-fields select,
.cr-fields input,
.cr-buckets input,
.cr-search {
    min-height: 44px;
    border: 1px solid var(--cr-line);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 16px;
    color: var(--cr-text);
    background: var(--cr-field);
    width: 100%;
}
.cr-input-money { display: flex; align-items: center; gap: 6px; color: var(--cr-text); font-size: 15px; }
.cr-input-money input { flex: 1; }

.cr-buckets { margin-top: 14px; border-top: 1px dashed var(--cr-line); padding-top: 10px; }
.cr-buckets summary { cursor: pointer; font-size: 14px; color: var(--cr-primary); font-weight: 600; }
.cr-buckets > p { font-size: 13px; margin: 8px 0; }
.cr-buckets label { margin-top: 10px; }
.cr-buckets label small { display: block; color: var(--cr-muted); font-size: 12px; }
.cr-buckets label > span:first-child { color: var(--cr-text); font-size: 14px; }

.cr-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; }

/* 加入卡片 */
.cr-add-cards { margin-top: 36px; }
.cr-add-cards h2 { margin-bottom: 12px; }
.cr-search { margin-bottom: 12px; }
.cr-pick-list { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 8px 16px; max-height: 520px; overflow: auto; }
.cr-pick-group { border: 0; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--cr-line); }
.cr-pick-group:last-child { border-bottom: 0; }
.cr-pick-group legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 4px; }
.cr-pick { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; padding: 4px 0; }
.cr-pick input { width: 20px; height: 20px; accent-color: var(--cr-primary); flex: none; }
.cr-pick img { width: 48px; height: 30px; object-fit: cover; border-radius: 4px; }
.cr-pick[hidden],
.cr-pick-group[hidden] { display: none; }
.cr-sticky-actions { position: sticky; bottom: 0; background: var(--cr-bg); padding: 10px 0; }

@media (max-width: 600px) {
    .cr { padding-top: 16px; }
    .cr h1 { font-size: 24px; }
    .cr-my-card { padding: 16px; }
    .cr-card-img { width: 60px; height: 38px; }
}

/* ===================================================================
   試算器 /calc
   =================================================================== */

.cr-calc-wrap { max-width: 760px; }
.cr-calc-head h1 { font-size: 30px; }

.cr-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    margin: 10px 0;
    line-height: 1.55;
    word-break: break-word;
}
.cr-bubble-bot { background: var(--cr-card); box-shadow: var(--cr-shadow); border-top-left-radius: 4px; }
.cr-bot-name { display: block; font-size: 12px; font-weight: 700; color: var(--cr-primary); margin-bottom: 2px; }
.cr-bubble-user { margin-left: auto; background: var(--cr-primary); color: var(--cr-on-primary); border-top-right-radius: 4px; width: fit-content; }
.cr-edit { background: none; border: 0; color: inherit; opacity: .85; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0 0 0 6px; }

.cr-step-panel,
.cr-gate {
    background: var(--cr-card);
    border-radius: var(--cr-radius);
    box-shadow: var(--cr-shadow);
    padding: 16px 18px 18px;
    margin: 8px 0 16px;
    scroll-margin-top: 90px;
}
.cr-field-label { display: block; font-size: 13px; font-weight: 700; color: var(--cr-muted); margin: 14px 0 8px; }
.cr-field-label:first-child { margin-top: 0; }

.cr-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--cr-line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--cr-text);
    background: var(--cr-field);
}
.cr-input:focus { outline: 2px solid var(--cr-primary-soft); border-color: var(--cr-primary); }

.cr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-chips:empty { display: none; }
.cr-chips + .cr-field-label { margin-top: 16px; }
.cr-chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cr-chips [data-search-results] { margin-top: 8px; }
[data-search-results] { margin-top: 8px; }
.cr-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--cr-line);
    background: var(--cr-field);
    color: var(--cr-text);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}
.cr-chip:hover { border-color: var(--cr-primary); }
.cr-chip.is-active { background: var(--cr-primary-soft); border-color: var(--cr-primary); color: var(--cr-primary-dark); font-weight: 700; }

.cr-amount-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.cr-more { margin-top: 12px; }
.cr-more summary { cursor: pointer; color: var(--cr-primary); font-size: 14px; font-weight: 600; }
.cr-step-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.cr-btn[disabled] { opacity: .45; cursor: not-allowed; }
.cr-btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.cr-btn-accent { background: var(--cr-accent); border-color: var(--cr-accent); color: var(--cr-accent-ink); }
.cr-btn-accent:hover { color: var(--cr-accent-ink); filter: brightness(.95); }

.cr-picked { font-size: 14px; margin: 4px 0 8px; }
.cr-card-list { max-height: 360px; overflow: auto; margin-top: 8px; border: 1px solid var(--cr-line); border-radius: 12px; padding: 4px 12px; }
.cr-card-option { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; border-bottom: 1px solid var(--cr-line); }
.cr-card-option:last-child { border-bottom: 0; }
.cr-card-option[hidden] { display: none; }
.cr-card-option input { width: 20px; height: 20px; accent-color: var(--cr-primary); flex: none; }
.cr-card-option img,
.cr-card-thumb-blank { width: 48px; height: 30px; object-fit: cover; border-radius: 4px; flex: none; }
.cr-card-thumb-blank { display: inline-block; background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.cr-tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--cr-primary-soft); color: var(--cr-primary-dark); vertical-align: middle; }
.cr-tag-best { background: var(--cr-accent-soft); color: var(--cr-accent-text); }
.cr-tag-ad { background: var(--cr-surface-2); color: var(--cr-muted); }

.cr-gate { text-align: center; }
.cr-gate h2 { font-size: 20px; margin-bottom: 6px; }
.cr-gate p { color: var(--cr-muted); }

.cr-typing::after { content: '…'; animation: cr-dots 1.2s steps(3, end) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes cr-dots { from { width: 0; } to { width: 1.2em; } }
.cr-error { color: var(--cr-danger); }

/* 結果卡 */
.cr-result { margin-top: 6px; scroll-margin-top: 90px; }
.cr-result-h { font-size: 16px; margin: 24px 0 8px; color: var(--cr-muted); }
.cr-rcard { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 14px 16px; margin-bottom: 12px; border: 2px solid transparent; }
.cr-rcard.is-best { border-color: var(--cr-primary); }
.cr-rcard.is-ad { background: var(--cr-surface-2); }
.cr-rcard header { display: flex; align-items: center; gap: 12px; }
.cr-rank { width: 26px; height: 26px; border-radius: 50%; background: var(--cr-primary); color: var(--cr-on-primary); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cr-rcard header img,
.cr-rcard header .cr-card-thumb-blank { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.cr-rcard-name { flex: 1; min-width: 0; line-height: 1.4; }
.cr-gain { color: var(--cr-accent-text); font-size: 13px; font-weight: 700; }
.cr-plan { color: var(--cr-accent-text); font-size: 13px; }
.cr-reward { text-align: right; flex: none; }
.cr-reward-num { font-size: 26px; font-weight: 800; color: var(--cr-primary-dark); }
.cr-reward-unit { font-size: 13px; margin-left: 2px; }
.cr-reward-rate { display: block; font-size: 12px; color: var(--cr-muted); }

.cr-lines { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--cr-line); }
.cr-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--cr-line); font-size: 14px; }
.cr-lines li:last-child { border-bottom: 0; }
.cr-lines li > div { min-width: 0; }
.cr-lines strong { display: block; }
.cr-line-value { font-weight: 800; color: var(--cr-primary-dark); white-space: nowrap; }
.cr-conds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cr-conds em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--cr-accent-soft); color: var(--cr-accent-text); }
.cr-note { display: block; font-size: 12px; color: var(--cr-accent-text); margin-top: 2px; }
.cr-no-reward { margin: 10px 0 0; font-size: 14px; }
.cr-skipped { margin-top: 8px; font-size: 13px; }
.cr-skipped summary { cursor: pointer; color: var(--cr-muted); }
.cr-skipped ul { margin: 6px 0 0; padding-left: 18px; }
.cr-rcard footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cr-rcard footer .cr-fine { margin: 0; }

.cr-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: min(92vw, 520px);
    background: #0f172a;
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    z-index: 99999;
    font-size: 14px;
    transition: opacity .4s;
}
.cr-toast.is-error { background: #9f1239; } /* 吐司兩種模式都用深底白字 */
.cr-toast.is-out { opacity: 0; }

@media (max-width: 600px) {
    .cr-calc-head h1 { font-size: 24px; }
    .cr-bubble { max-width: 94%; }
    .cr-step-panel, .cr-gate { padding: 14px; }
    .cr-reward-num { font-size: 22px; }
    .cr-rcard header img, .cr-rcard header .cr-card-thumb-blank { width: 52px; height: 33px; }
}

/* ===================================================================
   卡片總覽、單卡、排行、首頁
   =================================================================== */

.cr-wide { max-width: 1160px; }
.cr-center { text-align: center; margin: 16px 0; }
.cr-block { width: 100%; margin-top: 14px; }
.cr-link { color: var(--cr-primary); font-weight: 600; text-decoration: none; font-size: 14px; }
.cr-link:hover { text-decoration: underline; }
.cr-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.cr-sec-head h2 { font-size: 22px; }
.cr-sec-head .cr-muted { font-size: 13px; }
.cr a { color: inherit; }
.cr-tile-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cr-tile-tags span { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--cr-primary-soft); color: var(--cr-primary-dark); font-weight: 600; }
.cr-ad-label { font-size: 11px; padding: 1px 7px; border-radius: 4px; background: rgba(15, 23, 42, .65); color: #fff; font-weight: 600; }
.cr-legal { font-size: 12px; color: var(--cr-muted); margin: 18px 0 0; }
.cr-legal strong { color: var(--cr-text); }

/* 首頁 hero */
.cr-hero { background: var(--cr-hero-bg); color: #fff; padding: 48px 0 40px; margin: -24px 0 8px; }
.cr-hero h1 { color: #fff; font-size: 34px; }
.cr-hero p { color: rgba(255, 255, 255, .85); }
.cr-quick { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 10px; background: var(--cr-card); border-radius: 16px; padding: 12px; margin-top: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); align-items: end; }
.cr-quick label { display: flex; flex-direction: column; gap: 4px; color: var(--cr-muted); font-size: 12px; font-weight: 700; }
.cr-quick .cr-btn { min-height: 46px; }
.cr-hero-links a { color: #fff; font-weight: 600; }

/* 頂部廣告輪播 */
.cr-banners { position: relative; margin: 8px 0 16px; }
.cr-banner-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cr-banner-track::-webkit-scrollbar { display: none; }
.cr-banner { position: relative; flex: 0 0 min(560px, 88%); scroll-snap-align: start; border-radius: var(--cr-radius); overflow: hidden; background: var(--cr-card); box-shadow: var(--cr-shadow); text-decoration: none; min-height: 120px; }
.cr-banner img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1160 / 520; }
.cr-banner-text { display: flex; flex-direction: column; gap: 6px; padding: 24px; }
.cr-banner .cr-ad-label { position: absolute; top: 10px; right: 10px; }

/* 分頁標籤 */
.cr-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--cr-line); margin-top: 8px; }
.cr-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; font-size: 15px; font-weight: 700; color: var(--cr-muted); cursor: pointer; }
.cr-tabs button.is-active { color: var(--cr-primary); border-color: var(--cr-primary); }

/* 輪播 */
.cr-carousel { position: relative; }
.cr-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; scrollbar-width: thin; }
.cr-car-btn { position: absolute; top: 42%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cr-line); background: var(--cr-card); box-shadow: var(--cr-shadow); font-size: 24px; line-height: 1; cursor: pointer; color: var(--cr-text); z-index: 2; }
.cr-car-btn.is-prev { left: -14px; }
.cr-car-btn.is-next { right: -14px; }
.cr-car-btn[disabled] { opacity: 0; pointer-events: none; }

.cr-tile { position: relative; flex: 0 0 230px; scroll-snap-align: start; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.cr-tile-rank { position: absolute; top: 0; left: 14px; background: var(--cr-accent); color: var(--cr-accent-ink); font-weight: 800; padding: 4px 9px 6px; border-radius: 0 0 8px 8px; font-size: 14px; }
.cr-tile-img { display: flex; justify-content: center; padding-top: 10px; }
.cr-tile-img img, .cr-tile-img .cr-card-thumb-blank { width: 150px; height: 95px; object-fit: contain; border-radius: 8px; }
.cr-tile h3 { font-size: 15px; margin: 0; text-align: center; }
.cr-tile h3 a { text-decoration: none; }
.cr-tile .cr-tile-tags { justify-content: center; }
.cr-tile-hl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 0; flex: 1; }
.cr-tile-hl div { background: var(--cr-bg); border-radius: 8px; padding: 6px 8px; }
.cr-tile-hl dt { font-size: 11px; color: var(--cr-muted); }
.cr-tile-hl dd { margin: 0; font-weight: 800; color: var(--cr-accent-text); font-size: 14px; }
.cr-tile-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.cr-tile-actions .cr-btn { width: 100%; }

.cr-follow { background: none; border: 0; color: var(--cr-muted); cursor: pointer; font-size: 13px; padding: 4px 6px; display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.cr-follow:hover, .cr-follow.is-on { color: var(--cr-accent-text); }

/* 首刷禮 */
.cr-swipe-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cr-swipe-card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 16px; text-decoration: none; }
.cr-swipe-card .cr-ad-label { position: absolute; top: 10px; right: 10px; }
.cr-swipe { background: var(--cr-primary-soft); border: 1px solid var(--cr-line-strong); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.cr-swipe-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-swipe-badge { background: var(--cr-primary); color: var(--cr-on-primary); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.cr-countdown { margin-left: auto; font-size: 13px; color: var(--cr-accent-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.cr-gifts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.cr-gifts li { background: var(--cr-card); border: 1px solid var(--cr-line-strong); border-radius: 8px; padding: 4px 10px; font-size: 13px; }

/* 版面：側欄 + 主欄 */
.cr-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; margin-top: 24px; align-items: start; }
/* grid 子項預設 min-width: auto，裡面的橫向捲動列（分類膠囊、輪播）會把欄位撐寬，整頁跟著變寬 */
.cr-layout > * { min-width: 0; }
.cr-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.cr-side-box { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 16px; }
.cr-side-box h2 { font-size: 16px; margin-bottom: 6px; }
.cr-main .cr-sec-head { margin-top: 0; }
.cr-main > .cr-chips { margin-bottom: 14px; }
a.cr-chip { text-decoration: none; }

.cr-ad-card { position: relative; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); overflow: hidden; margin: 12px 0; }
.cr-ad-card a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding-bottom: 12px; }
.cr-ad-card img { width: 100%; display: block; }
.cr-ad-card strong, .cr-ad-card a > span { padding: 0 14px; }
.cr-ad-card strong { padding-top: 10px; }
.cr-ad-card a > span { font-size: 13px; color: var(--cr-muted); }
.cr-ad-card .cr-ad-label { position: absolute; top: 8px; right: 8px; z-index: 1; }

/* 卡片列 */
.cr-row { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 16px 18px; margin-bottom: 14px; }
.cr-row-head { display: flex; align-items: center; gap: 14px; }
.cr-row-img img, .cr-row-img .cr-card-thumb-blank { width: 86px; height: 54px; object-fit: contain; border-radius: 6px; display: block; }
.cr-row-head h3 { font-size: 17px; margin: 0 0 4px; }
.cr-row-head h3 a { text-decoration: none; }
.cr-features { list-style: none; margin: 12px 0 0; padding: 0; }
.cr-features li { position: relative; padding-left: 24px; margin: 4px 0; font-size: 14px; }
.cr-features li::before { content: "\2713"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--cr-primary); color: var(--cr-on-primary); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.cr-row-hl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--cr-line); }
.cr-row-hl dt { font-size: 12px; color: var(--cr-muted); }
.cr-row-hl dd { margin: 2px 0 0; font-weight: 800; color: var(--cr-accent-text); }
.cr-row-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; justify-content: flex-end; }
.cr-row-foot .cr-follow { margin-right: auto; }

.cr-pager { display: flex; gap: 6px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.cr-pager a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--cr-card); border: 1px solid var(--cr-line); text-decoration: none; }
.cr-pager a.is-active { background: var(--cr-primary); color: var(--cr-on-primary); border-color: var(--cr-primary); }

/* 互動問答 */
.cr-quiz { background: var(--cr-hero-bg); border-radius: var(--cr-radius); padding: 18px; margin: 18px 0; color: #fff; }
.cr-quiz-badge { display: inline-block; background: var(--cr-accent); color: var(--cr-accent-ink); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.cr-quiz h3 { font-size: 18px; margin: 10px 0 12px; color: #fff; }
.cr-quiz h3 strong { color: var(--cr-accent); }
.cr-quiz-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-quiz-option { display: flex; align-items: center; gap: 10px; background: var(--cr-card); border: 2px solid transparent; border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: left; color: var(--cr-text); font-size: 14px; flex-wrap: wrap; }
.cr-quiz-option small { display: block; color: var(--cr-muted); font-size: 12px; }
.cr-quiz-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--cr-primary-soft); color: var(--cr-primary); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cr-quiz-total { width: 100%; font-weight: 800; color: var(--cr-primary-dark); }
.cr-quiz-option.is-right { border-color: var(--cr-success); }
.cr-quiz-option.is-wrong { border-color: var(--cr-danger); opacity: .8; }
.cr-quiz-result { font-weight: 700; margin: 12px 0 0; color: #fff; }
.cr-quiz-cta { display: inline-block; margin-top: 12px; color: var(--cr-accent); font-weight: 700; }

/* 單卡頁 */
.cr-crumbs { font-size: 13px; color: var(--cr-muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.cr-crumbs a { color: var(--cr-muted); text-decoration: none; }
.cr-crumbs a:hover { color: var(--cr-primary); }
.cr-detail-hero { display: grid; grid-template-columns: 320px 1fr; gap: 28px; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 24px; }
.cr-detail-img { display: flex; align-items: flex-start; justify-content: center; }
.cr-detail-img img, .cr-detail-img .cr-card-thumb-blank { width: 100%; max-width: 320px; aspect-ratio: 1.586; object-fit: contain; border-radius: 12px; }
.cr-detail-info h1 { font-size: 28px; }
.cr-detail-sub { font-size: 16px; color: var(--cr-text); margin: 4px 0; }
.cr-detail-facts { margin: 14px 0; }
.cr-detail-facts > div { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--cr-line); }
.cr-detail-facts dt { color: var(--cr-muted); font-size: 14px; }
.cr-detail-facts dd { margin: 0; }
.cr-detail-facts .cr-features { margin: 0; }
.cr-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.cr-btn-wide { min-width: 220px; }
.cr-detail-sec { margin-top: 28px; }
.cr-detail-sec > h2 { font-size: 22px; margin-bottom: 12px; }
.cr-group-h { font-size: 15px; color: var(--cr-muted); margin: 18px 0 8px; }
.cr-acc { background: var(--cr-card); border-radius: 12px; box-shadow: var(--cr-shadow); margin-bottom: 8px; }
.cr-acc summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.cr-acc summary::-webkit-details-marker { display: none; }
.cr-acc summary::after { content: "\2304"; margin-left: auto; color: var(--cr-muted); font-size: 18px; transition: transform .2s; }
.cr-acc[open] summary::after { transform: rotate(180deg); }
.cr-acc-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--cr-primary-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cr-acc-title { display: flex; flex-direction: column; min-width: 0; }
.cr-acc-title span { font-size: 13px; color: var(--cr-muted); }
.cr-acc-body { padding: 0 16px 14px 64px; font-size: 14px; }
.cr-acc-body p { margin: 6px 0; }
.cr-acc-body blockquote { margin: 8px 0 0; padding: 8px 12px; background: var(--cr-bg); border-left: 3px solid var(--cr-line); color: var(--cr-muted); font-size: 13px; }

/* 情境排行 */
.cr-rank-list { list-style: none; margin: 0; padding: 0; }
.cr-rank-item { display: grid; grid-template-columns: 30px 90px 1fr auto; gap: 14px; align-items: center; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 14px 16px; margin-bottom: 12px; }
.cr-rank-item:first-child { border: 2px solid var(--cr-primary); }
.cr-rank-item .cr-row-img img, .cr-rank-item .cr-row-img .cr-card-thumb-blank { width: 100%; height: auto; aspect-ratio: 1.586; }
.cr-rank-body h2 { font-size: 16px; margin-bottom: 4px; }
.cr-rank-body h2 a { text-decoration: none; }
.cr-rank-body ul { margin: 0; padding-left: 18px; font-size: 13px; }
.cr-rank-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cr-rank-quiz { list-style: none; }

.cr-scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cr-scene { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 16px 10px; text-decoration: none; text-align: center; }
.cr-scene:hover { outline: 2px solid var(--cr-primary); }
.cr-scene-emoji { font-size: 28px; }

.cr-cta { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 24px; text-align: center; margin: 24px 0; }
.cr-cta h2 { font-size: 20px; }
.cr-cta p { color: var(--cr-muted); }

@media (max-width: 900px) {
    .cr-layout { grid-template-columns: 1fr; }
    .cr-side { position: static; order: 2; }
    .cr-detail-hero { grid-template-columns: 1fr; }
    .cr-car-btn { display: none; }
}

@media (max-width: 600px) {
    .cr-hero { padding: 32px 0 28px; }
    .cr-hero h1 { font-size: 26px; }
    .cr-quick { grid-template-columns: 1fr; }
    .cr-row-hl { grid-template-columns: 1fr 1fr; }
    .cr-quiz-options { grid-template-columns: 1fr; }
    .cr-rank-item { grid-template-columns: 26px 64px 1fr; }
    .cr-rank-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
    .cr-acc-body { padding-left: 16px; }
    .cr-tile { flex-basis: 210px; }
}

/* ---------------- 會員專區：分頁、查詢紀錄與分析（Step 10） ---------------- */
.cr-my-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--cr-line); margin: 0 0 20px; overflow-x: auto; }
.cr-my-nav a { padding: 10px 16px; border-bottom: 3px solid transparent; color: var(--cr-muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cr-my-nav a.is-active { color: var(--cr-primary); border-color: var(--cr-primary); }

.cr-section { background: var(--cr-card); border-radius: var(--cr-radius); box-shadow: var(--cr-shadow); padding: 20px; margin-bottom: 20px; }
.cr-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cr-section-head a { color: var(--cr-primary); font-size: 14px; }
.cr .cr-h3 { font-size: 16px; margin: 24px 0 10px; }
.cr-month-pick select { min-height: 40px; border: 1px solid var(--cr-line); border-radius: 10px; padding: 0 10px; background: var(--cr-field); color: var(--cr-text); font-size: 15px; }

.cr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cr-stat { border: 1px solid var(--cr-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-stat span { color: var(--cr-muted); font-size: 14px; }
.cr-stat strong { font-size: 24px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.cr-stat small { color: var(--cr-muted); font-size: 13px; }
.cr-stat.is-warn { border-color: var(--cr-danger-line); background: var(--cr-danger-soft); }
.cr-stat.is-warn strong { color: var(--cr-danger); }

.cr-table-wrap { overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cr-table, .cr-table th, .cr-table td { border: 0; } /* 蓋掉 Astra 的表格格線 */
.cr-table th, .cr-table td { padding: 10px 8px; border-bottom: 1px solid var(--cr-line); text-align: left; }
.cr-table thead th { color: var(--cr-muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.cr-table tbody th { font-weight: 600; }
.cr .num { text-align: right; font-variant-numeric: tabular-nums; }

.cr-txn-list { list-style: none; margin: 0; padding: 0; }
.cr-txn { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--cr-line); }
.cr-txn-main { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; min-width: 0; }
.cr-txn-date { font-variant-numeric: tabular-nums; color: var(--cr-muted); }
.cr-txn-place { font-weight: 600; }
.cr-txn-nums { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.cr-txn-nums strong { color: var(--cr-primary-dark); }
.cr-txn-better { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--cr-danger); }
.cr-txn-undo { grid-row: 1; grid-column: 3; }

.cr-cap-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cr-cap-card { border: 1px solid var(--cr-line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.cr-cap-card h3 { font-size: 16px; margin: 0; }
.cr-cap-card header p { margin: 2px 0 8px; font-size: 13px; }
.cr-cap { margin-top: 12px; }
.cr-cap-label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.cr-cap-label .cr-muted { font-weight: 400; font-size: 13px; }
.cr-meter { height: 10px; border-radius: 999px; background: var(--cr-track); overflow: hidden; margin: 6px 0 4px; }
.cr-meter span { display: block; height: 100%; min-width: 0; border-radius: 999px; background: var(--cr-primary); }
.cr-meter.is-full span { background: var(--cr-danger); }
.cr-cap-text { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }

.cr-records { border-top: 1px solid var(--cr-line); }
.cr-record-head,
.cr-record > summary { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.6fr) 70px 100px 72px; gap: 12px; align-items: center; }
.cr-record-head { padding: 8px 0; color: var(--cr-muted); font-size: 13px; border-bottom: 1px solid var(--cr-line); }
.cr-record { border-bottom: 1px solid var(--cr-line); }
.cr-record > summary { padding: 12px 0; cursor: pointer; list-style: none; }
.cr-record > summary::-webkit-details-marker { display: none; }
.cr-record-place { display: flex; flex-direction: column; min-width: 0; }
.cr-record-place small { font-size: 12px; }
.cr-record-more { color: var(--cr-primary); font-size: 13px; text-align: right; }
.cr-record[open] .cr-record-more { color: var(--cr-muted); }
.cr-record-body { padding: 0 0 14px; }
.cr-record-top { margin: 0 0 10px; padding-left: 22px; font-size: 14px; }
.cr-record-top li { padding: 3px 0; }
.cr-record-top li span:last-child { float: right; font-variant-numeric: tabular-nums; }
.cr-record-txn { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--cr-primary-soft); color: var(--cr-primary-dark); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.cr-record-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 700px) {
    .cr-stats { grid-template-columns: minmax(0, 1fr); }
    .cr-cap-cards { grid-template-columns: minmax(0, 1fr); }
    .cr-section { padding: 16px; }
    .cr-table th, .cr-table td { padding: 8px 4px; font-size: 13px; }
    .cr-stat { padding: 10px 14px; }
    .cr-stat strong { font-size: 20px; }
    .cr-record-head { display: none; }
    .cr-record > summary { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
    .cr-record-place { grid-column: 1 / -1; }
    .cr-record-best { grid-column: 1 / -1; font-size: 14px; }
    .cr-record > summary .num::before { content: attr(data-label) " "; color: var(--cr-muted); font-size: 12px; }
    .cr-record > summary .num { text-align: left; }
    .cr-record-more { grid-column: 1 / -1; text-align: left; }
    .cr-txn { grid-template-columns: minmax(0, 1fr) auto; }
    .cr-txn-undo { grid-row: auto; grid-column: 2; justify-self: end; }
    .cr-txn-nums { grid-row: 1; grid-column: 2; }
}

/* ---------------- 申辦按鈕旁的法定揭露（規格 B6） ---------------- */
.cr-legal-mini { display: block; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: var(--cr-muted); text-align: center; white-space: nowrap; }
.cr-row > .cr-legal-mini { text-align: right; margin-top: 6px; }
.cr-rank-side .cr-legal-mini { text-align: right; }
.cr-rcard footer .cr-legal-mini { display: inline; }

/* ---------------- 關於我們、隱私權政策、服務條款 ---------------- */
.cr-doc { max-width: 760px; }
.cr-doc h1 { font-size: 30px; margin-bottom: 12px; }
.cr-doc h2 { font-size: 19px; margin: 32px 0 10px; }
.cr-doc p,
.cr-doc li { line-height: 1.8; }
.cr-doc p { margin: 0 0 12px; }
.cr-doc ul,
.cr-doc ol { margin: 0 0 12px; padding-left: 22px; }
.cr-doc li { margin: 4px 0; }
.cr-doc a { color: var(--cr-primary); text-decoration: underline; }
.cr-doc-lead { font-size: 17px; }

/* ===================================================================
   全站頁首（CR_Chrome → partials/site-header）
   =================================================================== */

.cr-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--cr-card);
    border-bottom: 1px solid var(--cr-line);
    color: var(--cr-text);
    font-size: 15px;
    line-height: 1.4;
}
body.admin-bar .cr-header { top: 32px; }
.cr-header *,
.cr-header *::before,
.cr-header *::after { box-sizing: border-box; }
.cr-header__inner { position: relative; display: flex; align-items: center; gap: 20px; max-width: 1160px; min-height: 64px; margin: 0 auto; padding: 0 16px; }
.cr-header__home { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--cr-text); font-size: 20px; font-weight: 900; letter-spacing: 1px; text-decoration: none; }
.cr-header__home:hover { color: var(--cr-text); }
.cr-header__logo { display: block; width: 34px; height: 34px; }
.cr-header__nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
.cr-header__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--cr-muted); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cr-header__link:hover,
.cr-header__link.is-active { color: var(--cr-primary); background: var(--cr-primary-soft); }
.cr-header__tools { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }

/* Astra 對 button:hover / button:focus 會套主題色底，這裡三種狀態都要寫 */
.cr-header__icon,
.cr-header__icon:hover,
.cr-header__icon:focus { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cr-line); border-radius: 12px; background: var(--cr-card); color: var(--cr-text); cursor: pointer; }
.cr-header__icon:hover { border-color: var(--cr-primary); color: var(--cr-primary); }
.cr-header__icon svg { width: 20px; height: 20px; }
.cr-theme-sun,
html[data-cr-theme="dark"] .cr-theme-moon { display: none; }
html[data-cr-theme="dark"] .cr-theme-sun { display: block; }
.cr-header__menu,
.cr-header__menu:hover,
.cr-header__menu:focus { display: none; }

.cr-header__login { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--cr-primary); color: var(--cr-on-primary); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cr-header__login:hover { background: var(--cr-primary-dark); color: var(--cr-on-primary); }
.cr-header__account { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--cr-muted); font-size: 14px; text-decoration: none; }
.cr-header__account:hover { color: var(--cr-primary); }

.cr-header a:focus-visible,
.cr-header button:focus-visible { outline: 2px solid var(--cr-primary); outline-offset: 2px; }

@media (max-width: 960px) {
    .cr-header__menu,
    .cr-header__menu:hover,
    .cr-header__menu:focus { display: inline-flex; }
    html.cr-js .cr-header__nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 2px; padding: 8px 16px 16px; background: var(--cr-card); border-bottom: 1px solid var(--cr-line); box-shadow: var(--cr-shadow); }
    html.cr-js .cr-header.is-open .cr-header__nav { display: flex; }
    /* 沒有 JS：選單按鈕沒作用，直接把選單排在下一行 */
    html:not(.cr-js) .cr-header__inner { flex-wrap: wrap; }
    html:not(.cr-js) .cr-header__nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 8px; }
    html:not(.cr-js) .cr-header__menu { display: none; }
}
@media (max-width: 782px) {
    body.admin-bar .cr-header { top: 46px; }
}
@media (max-width: 600px) {
    /* WP 工具列在這個寬度改成跟著頁面捲走 */
    body.admin-bar .cr-header { top: 0; }
}
@media (max-width: 480px) {
    .cr-header__inner { gap: 10px; min-height: 58px; padding: 0 12px; }
    .cr-header__home { gap: 8px; font-size: 18px; letter-spacing: .5px; }
    .cr-header__logo { width: 30px; height: 30px; }
    .cr-header__tools { gap: 6px; }
    .cr-header__login { padding: 0 14px; font-size: 14px; }
}

/* ===================================================================
   全站頁尾（CR_Chrome → partials/site-footer）：兩種模式都是深藏青底
   =================================================================== */

.cr-footer { background: var(--cr-footer-bg); color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.7; }
.cr-footer *,
.cr-footer *::before,
.cr-footer *::after { box-sizing: border-box; }
.cr-footer__inner { max-width: 1160px; margin: 0 auto; padding: 48px 16px 28px; }
.cr-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.cr-footer__home { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 900; letter-spacing: 1px; text-decoration: none; }
.cr-footer__home img { display: block; }
.cr-footer__brand p { max-width: 320px; margin: 12px 0 0; }
.cr-footer .cr-footer__motto { color: #e5a823; font-weight: 700; letter-spacing: 2px; }
.cr-footer h2 { margin: 0 0 12px; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.4; }
.cr-footer ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cr-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.cr-footer a:hover { color: #fff; text-decoration: underline; }
.cr-footer a:focus-visible { outline: 2px solid #e5a823; outline-offset: 2px; }
.cr-footer__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .62); font-size: 13px; }
.cr-footer__legal p { margin: 0 0 6px; }

@media (max-width: 900px) {
    .cr-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
    .cr-footer__brand { grid-column: 1 / -1; }
}

/* ===================================================================
   Cookie 說明列（partials/cookie-notice）
   =================================================================== */

.cr-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99998; display: flex; align-items: center; gap: 16px; max-width: 760px; margin: 0 auto; padding: 14px 16px; border: 1px solid var(--cr-line); border-radius: 14px; background: var(--cr-card); color: var(--cr-text); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); font-size: 14px; line-height: 1.6; }
.cr-cookie[hidden] { display: none; }
.cr-cookie p { flex: 1; margin: 0; }
.cr-cookie a { color: var(--cr-primary); text-decoration: underline; }
.cr-cookie__ok,
.cr-cookie__ok:focus { flex: none; min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--cr-primary); color: var(--cr-on-primary); font-size: 15px; font-weight: 700; cursor: pointer; }
.cr-cookie__ok:hover { background: var(--cr-primary-dark); color: var(--cr-on-primary); }
.cr-cookie__ok:focus-visible { outline: 2px solid var(--cr-primary); outline-offset: 2px; }

@media (max-width: 600px) {
    .cr-cookie { flex-direction: column; align-items: stretch; gap: 10px; left: 12px; right: 12px; bottom: 12px; }
    .cr-rank-side { flex-wrap: wrap; }
    .cr-rank-side .cr-legal-mini { order: 9; flex-basis: 100%; }
}

/* ===================================================================
   暗色模式：Astra 本體（外掛以外的 WP 頁面、文章）
   =================================================================== */

html[data-cr-theme="dark"] body,
html[data-cr-theme="dark"] .site,
html[data-cr-theme="dark"] .site-content,
html[data-cr-theme="dark"] .ast-separate-container,
html[data-cr-theme="dark"] .ast-plain-container {
    background-color: var(--cr-bg) !important;
    color: var(--cr-text);
}

html[data-cr-theme="dark"] .ast-separate-container .ast-article-single,
html[data-cr-theme="dark"] .ast-separate-container .ast-article-post,
html[data-cr-theme="dark"] .ast-separate-container .comments-area,
html[data-cr-theme="dark"] .ast-separate-container .ast-archive-description,
html[data-cr-theme="dark"] .widget-area .widget {
    background-color: var(--cr-card) !important;
}

html[data-cr-theme="dark"] .entry-content,
html[data-cr-theme="dark"] .entry-title,
html[data-cr-theme="dark"] .entry-content h1,
html[data-cr-theme="dark"] .entry-content h2,
html[data-cr-theme="dark"] .entry-content h3,
html[data-cr-theme="dark"] .entry-content h4 {
    color: var(--cr-text);
}

html[data-cr-theme="dark"] .entry-content a,
html[data-cr-theme="dark"] .entry-title a {
    color: var(--cr-primary);
}

html[data-cr-theme="dark"] .comments-title,
html[data-cr-theme="dark"] .comment-reply-title,
html[data-cr-theme="dark"] .comment-form label,
html[data-cr-theme="dark"] .comment-form-cookies-consent {
    color: var(--cr-text);
}

html[data-cr-theme="dark"] .site-content input[type="text"],
html[data-cr-theme="dark"] .site-content input[type="email"],
html[data-cr-theme="dark"] .site-content input[type="url"],
html[data-cr-theme="dark"] .site-content input[type="search"],
html[data-cr-theme="dark"] .site-content textarea {
    background-color: var(--cr-field);
    border-color: var(--cr-line-strong);
    color: var(--cr-text);
}
