/* ============================================
   健康 App 主題覆蓋（.theme-fintech）
   ============================================ */

/* 基礎變量調整 */
:root {
  --neon-lime: #6366f1;
  --electric-blue: #4f46e5;
  --y2k-yellow: #f8fafc;
  --sky-blue: #3b82f6;
  --y2k-black: #0f172a;
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-dark: #3730a3;
  --accent: #4f46e5;
  --accent-light: #a5b4fc;
  --accent-soft: #eef2ff;
  --accent-rgb: 79, 70, 229;
  --accent-lime: #6366f1;
  --lime-rgb: 99, 102, 241;
  --text-dark: #0f172a;
  --text-mid: #334155;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --bg-tint: #f1f5f9;
  --border: #e2e8f0;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 12px 40px rgba(15, 23, 42, 0.06);
}

/* 隱藏不需要的裝飾 */
.theme-fintech .y2k-hero-deco {
  display: none !important;
}

/* 標題字體調整 */
.theme-fintech .section-title {
  letter-spacing: -0.03em;
  font-weight: 800;
}

.theme-fintech .section-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* 卡片圓角與陰影 */
.theme-fintech .course-card,
.theme-fintech .prog-card,
.theme-fintech .dse-card,
.theme-fintech .dse-hero-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: none;
  background: var(--bg-card);
}

/* 課程卡片內部樣式 — 緊湊佈局，一屏顯示更多卡片 */
.theme-fintech .prog-card {
  padding: 12px 14px;
}

.theme-fintech .prog-name {
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}

.theme-fintech .prog-corner {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 0 10px;
}

/* 標籤樣式調整 */
.theme-fintech .prog-tag,
.theme-fintech .prog-code-tag,
.theme-fintech .pd-pill,
.theme-fintech .pd-code {
  background: var(--bg-light);
  color: var(--text-mid);
  border-radius: 100px;
  padding: 4px 12px;
  font-weight: 700;
  border: none;
  font-size: 0.85rem;
}

/* 首頁課程卡片／詳情彈窗標籤（JUPAS 編號、年制、分類等）略小，不與課程名搶眼 */
.page-home .prog-tag,
.page-home .prog-code-tag,
.pd-modal .prog-tag,
.pd-modal .prog-code-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
}
.page-home .prog-code-tag,
.pd-modal .prog-code-tag {
  font-size: 0.62rem;
}
.page-home .prog-tag i,
.page-home .prog-code-tag i,
.pd-modal .prog-tag i,
.pd-modal .prog-code-tag i {
  font-size: 0.58rem;
}

/* 神科／熱門：字號與年制標籤一致（prog-code-tag 為 0.62rem） */
.page-home .prog-tag.detail,
.page-home .prog-tag.hot,
.page-home .prog-tag.new,
.page-home .prog-tag.hd,
.pd-modal .prog-tag.detail,
.pd-modal .prog-tag.hot,
.pd-modal .prog-tag.new,
.pd-modal .prog-tag.hd {
  font-size: 0.62rem;
}
.page-home .prog-tag.detail i,
.page-home .prog-tag.hot i,
.page-home .prog-tag.new i,
.page-home .prog-tag.hd i,
.pd-modal .prog-tag.detail i,
.pd-modal .prog-tag.hot i,
.pd-modal .prog-tag.new i,
.pd-modal .prog-tag.hd i {
  font-size: 0.58rem;
  opacity: 1;
}

/* 神科標籤：星標與文字用黃色（與錄取概率「中」色一致） */
.page-home .prog-tag.detail,
.pd-modal .prog-tag.detail {
  color: #e9a300;
}
.page-home .prog-tag.detail i,
.pd-modal .prog-tag.detail i {
  color: #e9a300;
}

/* 熱門標籤：火焰圖標與文字用橙色 */
.page-home .prog-tag.hot,
.pd-modal .prog-tag.hot {
  color: #ea580c;
}
.page-home .prog-tag.hot i,
.pd-modal .prog-tag.hot i {
  color: #ea580c;
}

/* 新課標籤：圖標與文字用綠色（與錄取概率綠區一致） */
.page-home .prog-tag.new,
.pd-modal .prog-tag.new {
  color: #00b86a;
}
.page-home .prog-tag.new i,
.pd-modal .prog-tag.new i {
  color: #00b86a;
  opacity: 1;
}

/* 高級文憑標籤：圖標與文字用紫色 */
.page-home .prog-tag.hd,
.pd-modal .prog-tag.hd {
  color: #8b5cf6;
}
.page-home .prog-tag.hd i,
.pd-modal .prog-tag.hd i {
  color: #8b5cf6;
  opacity: 1;
}

/* 首頁課程卡片：不顯示英文課程名，中文名稱略大 */
.page-home .prog-name-en {
  display: none;
}
.page-home .prog-name {
  font-size: 1.02rem;
  line-height: 1.4;
}
.page-home .prog-card-uni-logo {
  top: 15px;
  right: 13px;
  width: 24px;
  height: 24px;
}
.page-home .prog-card-title {
  padding-right: 36px;
  margin-bottom: 4px;
}

/* 首頁：錄取概率／較中位略加深，避免黃字與淺灰標籤在白底上糊在一起 */
.page-home .prog-corner-val--mid,
.page-home .prog-corner-delta-val--mid {
  color: #e9a300;
}
.page-home .prog-corner-lbl,
.page-home .prog-corner-delta-lbl {
  color: #8896a8;
}
.page-home .prog-corner-delta-lbl {
  opacity: 0.72;
}
.page-home .prog-corner-val--low,
.page-home .prog-corner-delta-val--low {
  color: #e03555;
}

/* 首頁：錄取參考區縱向更緊湊 */
.page-home .prog-corner {
  padding: 4px 0 6px;
  min-height: 0;
}
.page-home .prog-corner-metrics {
  padding-top: 0;
}
.page-home .prog-corner-divider {
  min-height: 30px;
  margin: 1px 10px 0;
}
.page-home .prog-corner-metric {
  gap: 2px;
}
.page-home .prog-corner-metric--side {
  padding: 0;
}
.page-home .prog-corner-metric--side .prog-corner-lbl {
  margin-bottom: 2px;
}
.page-home .prog-corner-val-slot {
  min-height: 1.05rem;
}
.page-home .prog-corner-metric--hero .prog-corner-val-slot {
  min-height: 1.2rem;
}
.page-home .prog-corner-val--prob {
  font-size: 1.32rem;
}
.page-home .prog-corner-val--score {
  font-size: 1rem;
}
.page-home .prog-corner-delta {
  margin-top: 0;
  line-height: 1.15;
}
.page-home .prog-corner-placeholder-text {
  font-size: 0.65rem;
  line-height: 1.35;
}

.theme-fintech .pd-career-tag,
.theme-fintech .pd-subj-pill {
  background: var(--bg-light);
  color: var(--text-mid);
  border-radius: 100px;
  padding: 6px 14px;
  font-weight: 700;
  border: none;
  font-size: 0.9rem;
}

.theme-fintech .pd-code {
  background: var(--bg-tint);
}

.theme-fintech .pd-subj-pill.must {
  background: var(--electric-blue);
  color: white;
}

.theme-fintech .pd-subj-pill.rec {
  background: var(--accent-light);
  color: var(--text-dark);
}

.theme-fintech .pd-career-tag {
  background: var(--bg-tint);
  color: var(--text-dark);
}

/* 課程詳情彈窗：標籤略小，不與課程名搶眼（對齊首頁卡片標籤尺度） */
.theme-fintech .pd-modal .prog-tag,
.theme-fintech .pd-modal .prog-code-tag,
.theme-fintech .pd-modal .pd-pill,
.theme-fintech .pd-modal .pd-code {
  font-size: 0.68rem;
  padding: 2px 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.theme-fintech .pd-modal .prog-code-tag {
  font-size: 0.62rem;
}
.theme-fintech .pd-modal .prog-tag i,
.theme-fintech .pd-modal .prog-code-tag i,
.theme-fintech .pd-modal .pd-pill i {
  font-size: 0.58rem;
}
.theme-fintech .pd-modal .pd-career-tag,
.theme-fintech .pd-modal .pd-subj-pill {
  font-size: 0.72rem;
  padding: 4px 10px;
}

/* 年制：與彈窗/卡片淺灰底區分，保留可見底色 */
.theme-fintech .pd-pill.years,
.theme-fintech .prog-tag.years {
  background: #fff;
  color: var(--text-mid);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.theme-fintech .prog-tag.years {
  background: #eef1f8;
  box-shadow: none;
}

/* 標籤列 */
.theme-fintech .pd-tablist {
  border-bottom: none;
  gap: 6px;
  padding: 8px 0 10px;
  justify-content: flex-start;
  margin: 0 0 12px;
  background: white;
  top: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.theme-fintech .pd-tab {
  background: var(--bg-light);
  border: none;
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 0.75rem;
  color: var(--text-mid);
  font-weight: 700;
  margin: 0;
  flex: none;
}

.theme-fintech .pd-tab[aria-selected="true"],
.theme-fintech .pd-tab[aria-selected="true"]:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border: none;
}

.theme-fintech .pd-tab:hover:not([aria-selected="true"]) {
  background: var(--bg-tint);
}

/* 底部導航欄 */
.theme-fintech .mobile-bottom-nav-inner {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 100px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin: 0 16px;
}

.theme-fintech .mobile-bottom-nav .nav-item.active {
  color: var(--electric-blue);
}

.theme-fintech .mobile-bottom-nav .nav-item.active i {
  color: var(--electric-blue);
}

/* 按鈕樣式 */
.theme-fintech .btn-primary,
.theme-fintech .btn-hero-primary,
.theme-fintech .dse-btn--calc {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border-radius: 100px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.theme-fintech .btn-primary:hover,
.theme-fintech .btn-hero-primary:hover,
.theme-fintech .dse-btn--calc:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  transform: translateY(-2px);
}

.theme-fintech .dse-card-actions--results .dse-btn--edit {
  border-radius: 100px;
  font-weight: 800;
}

/* 彈窗樣式 */
.theme-fintech .pd-modal {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.1);
  background: var(--bg-light);
  --pd-modal-height: min(92dvh, 92vh);
  height: var(--pd-modal-height);
  min-height: var(--pd-modal-height);
  max-height: var(--pd-modal-height);
}

.theme-fintech .pd-header {
  background: var(--bg-light);
  border-bottom: none;
  padding: 20px 20px 10px 20px;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.theme-fintech .pd-header.hku,
.theme-fintech .pd-header.ust,
.theme-fintech .pd-header.cuhk,
.theme-fintech .pd-header.cityu,
.theme-fintech .pd-header.polyu,
.theme-fintech .pd-header.hkbu,
.theme-fintech .pd-header.lingu,
.theme-fintech .pd-header.eduhk {
  border-top: none;
}

.theme-fintech .pd-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--bg-light);
}

.theme-fintech .pd-body {
  padding: 12px 18px 18px;
  background: white;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* 分數區塊 */
.theme-fintech .pd-scores-strip {
  background: var(--bg-light);
  margin: 0;
  border: none;
  box-shadow: none;
  overflow: visible;
  padding: 4px 18px 12px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.theme-fintech .pd-score-cell {
  padding: 10px 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: none;
  background: white;
}

.theme-fintech .pd-score-cell:last-child {
  border-right: none;
}

.theme-fintech .pd-score-cell .sc-num {
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}

.theme-fintech .pd-score-cell.median .sc-num {
  color: var(--text-dark);
}

/* 進度條/狀態條 */
.theme-fintech .pd-prog-bar-fill.safe {
  color: var(--electric-blue);
  background: var(--electric-blue);
}

.theme-fintech .pd-prediction-banner {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: white;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.theme-fintech .pd-prediction-metric-val--score {
  color: var(--text-dark);
}

.theme-fintech .prog-corner-val--score {
  color: var(--text-dark);
}

.theme-fintech .prog-score-item.median .sc-val {
  color: var(--text-mid);
}

.theme-fintech .pd-prediction-banner--high {
  border-color: #e0e7ff;
  background: #f5f8ff;
}

.theme-fintech .pd-prediction-banner--mid {
  border-color: #fef3c7;
  background: #fffdf7;
}

.theme-fintech .pd-prediction-banner--low {
  border-color: #fee2e2;
  background: #fffafa;
}

.theme-fintech .pd-prediction-banner--rich {
  border-color: var(--border);
  gap: 10px;
}

.theme-fintech .pd-prediction-banner--high .pd-prediction-main i {
  color: var(--primary);
}
.theme-fintech .pd-prediction-banner--mid .pd-prediction-main i {
  color: #ca8a04;
}
.theme-fintech .pd-prediction-banner--low .pd-prediction-main i {
  color: #dc2626;
}

.theme-fintech .pd-prediction-banner--rich .pd-prediction-main.pd-prediction-main--note i {
  color: var(--text-light);
  font-size: 0.85rem;
}

.theme-fintech .pd-prediction-main strong {
  display: block;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.theme-fintech .pd-prediction-main span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.theme-fintech .pd-prediction-banner-tail .pd-prediction-main span {
  color: var(--text-light);
}

.theme-fintech .pd-prediction-main--note > span {
  font-size: 0.68rem;
}

.theme-fintech .pd-prediction-main i.fa-flask,
.theme-fintech .pd-prediction-main i.fa-calculator {
  font-size: 1.5rem;
  margin-right: 8px;
}

.theme-fintech .faculty-info-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
}

.theme-fintech .faculty-info-card h5 {
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-fintech .faculty-info-card h5 i {
  color: var(--electric-blue);
}

.theme-fintech .faculty-info-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.theme-fintech .pd-close {
  background: var(--bg-light);
  color: var(--text-mid);
  border-radius: 100px;
  width: 32px;
  height: 32px;
  top: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.theme-fintech .pd-close:hover {
  background: var(--border);
}

.theme-fintech .pd-uni-badge {
  background: white;
  border-radius: 100px;
  padding: 4px 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  max-width: calc(100% - 72px);
  flex-wrap: wrap;
}

.theme-fintech .pd-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  margin-bottom: 2px;
  max-width: none;
}

.theme-fintech .pd-title-en {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 10px;
  max-width: none;
}

.theme-fintech .pd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.theme-fintech .pd-prediction-metric-val--high {
  color: var(--primary-light);
}

.theme-fintech .prog-corner-val--green-zone,
.theme-fintech .pd-prediction-metric-val--green-zone {
  color: #00b86a;
}

.theme-fintech .prog-corner-delta-val--green-zone {
  color: #00b86a;
}

.theme-fintech .pd-prediction-banner--green-zone {
  border-color: #d1e7d7;
  background: #f2faf4;
}

.theme-fintech .pd-prediction-banner--green-zone .pd-prediction-main i {
  color: #15803d;
}

.theme-fintech .pd-prediction-banner--green-zone .pd-prediction-delta {
  color: #15803d;
  background: #d1fae5;
}

.theme-fintech .pd-prediction-metric-val--mid {
  color: #cc8e07;
}

.theme-fintech .pd-prediction-metric-val--low {
  color: #e03565;
}

.theme-fintech .pd-prediction-metrics {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.theme-fintech .pd-prediction-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-fintech .pd-prediction-metric-lbl {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 700;
}

.theme-fintech .pd-prediction-metric-val {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.theme-fintech .pd-prediction-banner-tail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.theme-fintech .pd-prediction-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.theme-fintech .pd-prediction-main i {
  color: var(--electric-blue);
}

.theme-fintech .pd-prediction-delta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--electric-blue);
  background: var(--bg-tint);
  padding: 4px 10px;
  border-radius: 100px;
}

.theme-fintech .pd-section {
  margin-bottom: 18px;
}

.theme-fintech .pd-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-fintech .pd-section-title i {
  color: var(--electric-blue);
}
.theme-fintech .pd-formula-wrap {
  background: white !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}

.theme-fintech .pd-formula-str {
  border: none !important;
  background: var(--bg-light) !important;
  box-shadow: none !important;
  border-radius: var(--radius-sm) !important;
  color: var(--electric-blue) !important;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
}

.theme-fintech .pd-formula-bar-fill.core {
  background: linear-gradient(90deg, var(--electric-blue), var(--primary-light)) !important;
}

.theme-fintech .pd-formula-legend-dot.core {
  background: var(--electric-blue) !important;
}

.theme-fintech .pd-formula-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.theme-fintech .pd-formula-subj {
  width: 80px;
  font-size: 0.9rem;
  color: var(--text-dark);
  font-weight: 600;
}

.theme-fintech .pd-formula-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-light);
  border-radius: 100px;
  overflow: hidden;
}

.theme-fintech .pd-formula-bar-fill {
  height: 100%;
  border-radius: 100px;
}

.theme-fintech .pd-formula-wt {
  width: 40px;
  text-align: right;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 700;
}

.theme-fintech .pd-formula-legend {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.theme-fintech .pd-formula-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-mid);
}

/* 歷年收生趨勢（內距與 .pd-score-card 一致） */
.theme-fintech .pd-history-wrap {
  background: white;
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.theme-fintech .pd-history-wrap > div {
  width: 100%;
  min-width: 0;
}

.theme-fintech .pd-history-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.theme-fintech .pd-history-table th {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px;
  font-weight: 700;
  color: var(--text-mid);
}

.theme-fintech .pd-history-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dark);
}

.theme-fintech .pd-history-table tr.current-year td {
  background: var(--bg-light);
}

.theme-fintech .pd-history-table tr.current-year td:first-child {
  color: var(--electric-blue);
}

.theme-fintech .pd-history-table .med-val {
  color: var(--electric-blue);
}

.theme-fintech .pd-trend-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 12px;
}

.theme-fintech .pd-trend-badge.up {
  background: #fee2e2;
  color: #b91c1c;
}

.theme-fintech .pd-trend-badge.down {
  background: #eef2ff;
  color: var(--primary-dark);
}

.theme-fintech .pd-trend-badge.flat {
  background: var(--bg-light);
  color: var(--text-mid);
}

.theme-fintech .pd-history-chart {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.theme-fintech .pd-history-chart svg {
  width: 100%;
  height: auto;
  max-height: 120px;
  display: block;
}

.theme-fintech .pd-chart-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 700;
  margin-bottom: 12px;
}
.theme-fintech .pd-req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-fintech .pd-req-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-fintech .pd-req-item .req-label {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 700;
}

.theme-fintech .pd-req-item .req-val {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.theme-fintech .pd-faculty-info-grid .pd-req-item {
  background: white;
}

.theme-fintech .pd-subj-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-fintech .pd-career-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-fintech .pd-tabpanel--course .pd-intro {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.65;
}

.theme-fintech .pd-tabpanel--course .pd-intro-careers .pd-section-title {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.theme-fintech .pd-tabpanel--course .pd-section-title {
  font-size: 0.8125rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.theme-fintech .pd-tabpanel--course .pd-req-item .req-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

.theme-fintech .pd-tabpanel--course .pd-req-item .req-val {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.55;
}

.theme-fintech .pd-tabpanel--course .pd-career-tag {
  font-size: 0.8125rem;
  font-weight: 600;
}

.theme-fintech .pd-tabpanel--info .pd-section-title--row > span:first-child {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-dark);
}

.theme-fintech .pd-tabpanel--info .pd-faculty-info-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.theme-fintech .pd-tabpanel--info .pd-faculty-info-grid .req-label {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--text-dark);
}

.theme-fintech .pd-tabpanel--info .pd-faculty-info-grid .req-val {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-mid);
}

/* 工具列 */
.theme-fintech .prog-toolbar {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

.theme-fintech .prog-toolbar.is-stuck {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.theme-fintech .tb-chip {
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: none;
  padding: 5px 11px;
  font-size: 0.74rem;
  line-height: 1.2;
  min-height: 28px;
  font-weight: 700;
  color: var(--text-dark);
}

.theme-fintech .tb-chip-row--uni .tb-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.theme-fintech .tb-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.theme-fintech .tb-chip-row-label {
  color: var(--text-mid);
  font-weight: 800;
}

/* 搜索框 */
.theme-fintech .tb-search-box {
  border: 1px solid var(--border);
  background: var(--bg-light);
  border-radius: 12px;
}

.theme-fintech .tb-search-box:focus-within {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}

/* 品牌字標：漸變 + 主題色標 */
.theme-fintech .brand-logo__name {
  background: linear-gradient(118deg, #0f172a 0%, #1e1b4b 42%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-fintech .brand-logo__tag {
  color: var(--primary);
}

.theme-fintech .brand-logo--footer .brand-logo__name {
  background: linear-gradient(118deg, #fff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme-fintech .brand-logo--footer .brand-logo__year {
  -webkit-text-fill-color: rgba(255, 255, 255, 0.75);
  color: rgba(255, 255, 255, 0.75);
  background: none;
}

/* 首頁：降低過亮文字與強調色 */
.page-home .hero-text .hero-badge {
  color: var(--primary);
  background: var(--accent-soft);
  border-color: var(--accent-light);
}

.page-home .hero-text .hero-badge i {
  color: var(--primary);
}

.page-home .hero-text .hero-title .highlight {
  color: var(--primary);
  -webkit-text-fill-color: var(--primary);
  background: linear-gradient(120deg, var(--accent-light) 0%, transparent 100%);
}

.page-home .section-badge {
  color: var(--primary);
  background: var(--accent-soft);
}

.page-home .section-subtitle {
  color: var(--text-mid);
}

.page-home .dse-hero-card--compact {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.page-home .dse-hero-card__score {
  color: var(--primary-dark);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4);
  font-family: var(--font-mono);
  font-size: 2.8rem;
  letter-spacing: -2px;
}

.page-home .dse-hero-card__unit {
  color: rgba(15, 23, 42, 0.5);
  font-size: 0.9rem;
  font-weight: 600;
  vertical-align: baseline;
  position: relative;
  top: -10px;
}

.page-home .dse-hero-card__eyebrow,
.page-home .dse-hero-card__detail-label {
  color: rgba(15, 23, 42, 0.65);
}

.page-home .dse-hero-card__compact-divider {
  background: rgba(15, 23, 42, 0.15);
}

.page-home .dse-hero-card__edit-btn {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-dark);
  border-color: transparent;
}

.page-home .dse-hero-card__edit-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-dark);
  border-color: transparent;
}

.page-home .dse-hero-card__edit-btn i {
  color: var(--primary-dark);
}

.page-home .step-date {
  background: var(--accent);
  color: #fff;
}

/* Hero 精簡分數卡（無卡片底色） */
.page-home .hero-card-stack::before {
  display: none;
}

.page-home .hero-card-stack[data-state="compact"][data-panel="collapsed"] {
  min-height: 0;
}

/* 導航欄：與 logo 同一行，計分後顯示總分按鈕 */
.page-home .navbar-inner {
  justify-content: space-between;
  gap: 12px;
}

.page-home .navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  --navbar-action-size: 38px;
}

.page-home .navbar-fav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--navbar-action-size);
  height: var(--navbar-action-size);
  border-radius: 50%;
  color: var(--text-light);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.page-home .navbar-fav-link:hover {
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.page-home .navbar-fav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  box-sizing: content-box;
  opacity: 1;
  transform: scale(1);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-home .navbar-fav-badge[hidden] {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.page-home .navbar-inner .dse-hero-toggle-btn {
  flex-shrink: 0;
}

.page-home .dse-hero-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: var(--navbar-action-size);
  max-width: min(140px, calc(100vw - 120px));
  padding: 0 10px 0 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.page-home .dse-hero-toggle-btn[hidden] {
  display: none !important;
}

.page-home .dse-hero-toggle-btn:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.page-home .dse-hero-toggle-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1;
}

.page-home .dse-hero-toggle-btn__score {
  font-size: 1rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.page-home .dse-hero-toggle-btn__chevron {
  color: var(--text-light);
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.page-home .dse-hero-toggle-btn[aria-expanded="true"] .dse-hero-toggle-btn__chevron {
  transform: rotate(180deg);
}

@media (max-width: 400px) {
  .page-home .dse-hero-toggle-btn {
    max-width: none;
    padding: 0 8px;
  }
}

.page-home .dse-compact-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 16px;
  width: 100%;
  text-align: center;
  position: relative;
}

.page-home .dse-compact-panel.is-measure {
  opacity: 0;
  pointer-events: none;
}

.page-home .dse-compact-panel.is-morph-reveal {
  opacity: 1;
  transition: opacity 0.28s ease;
}

.page-home .hero-card-stack[data-panel="expanded"] .dse-compact-panel__edit {
  right: 48px;
}

.page-home .dse-compact-panel__edit {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  color: var(--text-mid);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.page-home .dse-compact-panel__edit:hover {
  border-color: var(--primary-light);
  background: var(--bg-tint);
}

.page-home .dse-compact-panel__title {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.page-home .dse-compact-panel__ring {
  transform: scale(0.75);
  margin-top: -30px;
  margin-bottom: -30px;
}

.page-home .dse-compact-panel__body .health-score-center {
  cursor: pointer;
}

.page-home .dse-compact-panel__grades {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--text-mid);
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.page-home .dse-compact-panel .health-score-center {
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

.page-home .dse-compact-panel .dse-compact-chip {
  color: var(--text-dark);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  font-weight: 700;
}

.page-home .dse-compact-panel__career {
  margin-top: 16px;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.page-home .dse-compact-panel__career-title {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-home .dse-compact-panel__career-title i {
  color: var(--accent);
}

.page-home .dse-compact-panel__career-hint {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.page-home .dse-compact-panel__chart {
  width: 100%;
  height: 140px;
}

/* 首頁：Banner 與金剛區間距 */
.page-home .home-banner-slider {
  padding-bottom: 4px;
}

/* 首頁：常用功能入口（金剛區）— 左右 16px 與搜尋/課程區一致 */
.home-quick-access {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  padding: 2px 16px 12px;
}

.home-quick-access-inner[hidden] {
  display: none !important;
}

.home-quick-access-inner {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-evenly;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}

.home-quick-access-inner .home-quick-item {
  flex: 1 1 0;
  min-width: 0;
}

.home-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  padding: 0px 0;
  text-decoration: none;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.home-quick-item:active {
  transform: scale(0.94);
}

.home-quick-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

/* 首頁金剛區圖標：無底色，僅圖標本體 */
.home-quick-icon--edu {
  overflow: visible;
  color: var(--primary);
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.home-quick-icon--edu i {
  font-size: 2rem;
  line-height: 1;
  color: currentColor;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.1));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-quick-item[href="info-day.html"] .fa-building-columns {
  background: linear-gradient(135deg, #12BFD0 0%, #08899A 38%, #4f46e5 68%, #FF7A1A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.home-quick-icon--edu img {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-quick-item[href="career-outlook.html"] .home-quick-icon--edu img {
  filter: none;
}

.home-quick-svg {
  width: 52px;
  height: 52px;
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.1));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.home-quick-item:hover .home-quick-icon--edu,
.home-quick-item:focus-visible .home-quick-icon--edu {
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.home-quick-item:hover .home-quick-icon--edu i,
.home-quick-item:focus-visible .home-quick-icon--edu i,
.home-quick-item:hover .home-quick-icon--edu img,
.home-quick-item:focus-visible .home-quick-icon--edu img,
.home-quick-item:hover .home-quick-svg,
.home-quick-item:focus-visible .home-quick-svg {
  transform: translateY(-1px) scale(1.05);
  filter: drop-shadow(0 10px 12px rgba(15, 23, 42, 0.12));
}

.home-quick-item[href="career-outlook.html"]:hover .home-quick-icon--edu img,
.home-quick-item[href="career-outlook.html"]:focus-visible .home-quick-icon--edu img {
  filter: none;
}

.home-quick-item:active .home-quick-icon--edu i,
.home-quick-item:active .home-quick-icon--edu img,
.home-quick-item:active .home-quick-svg {
  transform: translateY(0) scale(0.96);
}

.home-quick-item:focus-visible {
  outline: none;
}

.home-quick-item:focus-visible .home-quick-label {
  color: var(--primary);
}

.home-quick-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-quick-access-inner--grid4 {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 4px;
}

.home-quick-access-inner--grid4 .home-quick-item {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.home-quick-access-inner--grid4 .home-quick-label {
  white-space: nowrap;
  font-size: 0.62rem;
}

.home-quick-access-inner--grid5 {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 4px;
}

.home-quick-access-inner--grid5 .home-quick-item {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
}

.home-quick-access-inner--grid5 .home-quick-label {
  white-space: nowrap;
  font-size: 0.58rem;
}

.home-quick-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.25;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* App 子頁返回按鈕：中性樣式，無漸變／下劃線／主題色 */
.theme-fintech .app-top-bar__back,
.theme-fintech .app-top-bar__back:hover,
.theme-fintech .app-top-bar__back:focus-visible {
  color: var(--text-dark);
  text-decoration: none;
  background: transparent;
}

.theme-fintech .app-top-bar__back-icon {
  background: transparent;
  box-shadow: none;
}

/* ============================================================
   首頁「為你推薦」課程卡（一行 3 張，雙態）
   ============================================================ */
.home-recs {
  padding: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-recs[data-mode="cta"] {
  gap: 6px;
}

.home-recs__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
}

.home-recs__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.home-recs__my-test-btn {
  font-size: 0.68rem;
  color: var(--text-mid);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-tint);
  padding: 5px 8px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  line-height: 1.2;
  flex-shrink: 0;
}

.home-recs__my-test-btn i {
  font-size: 0.64rem;
  opacity: 0.72;
}

.home-recs__grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 0 2px;
  scroll-padding-inline: 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
/* 左右留白：比 padding 更稳，首张卡不会被 scroll-snap 贴边 */
.home-recs__grid::before,
.home-recs__grid::after {
  content: "";
  flex: 0 0 16px;
  scroll-snap-align: none;
}
.home-recs__grid::-webkit-scrollbar {
  display: none;
}

.home-rec-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: auto;
  overflow: hidden;
}

.home-rec-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.home-rec-card:active { transform: scale(0.98); }

.home-rec-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.home-rec-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-mid);
  background: var(--bg-tint);
  border-radius: 999px;
  padding: 2px 7px 2px 4px;
  line-height: 1.3;
}
.home-rec-kind__icon { font-size: 0.85rem; line-height: 1; }
.home-rec-card--hot    .home-rec-kind { color: #be123c; background: #ffe4e6; }
.home-rec-card--value  .home-rec-kind { color: var(--primary-dark); background: var(--accent-soft); }
.home-rec-card--future .home-rec-kind { color: #3730a3; background: #e0e7ff; }

.home-rec-uni { display: inline-flex; align-items: center; }
.home-rec-uni .uni-logo-img { width: 18px; height: 18px; }

.home-rec-uni-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--text-dark);
  background: var(--bg-tint);
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}
.home-rec-uni-pill .uni-logo-img { width: 16px; height: 16px; }

.home-rec-prob {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 3px;
  line-height: 1.05;
  font-family: 'Space Mono', ui-monospace, monospace;
}
.home-rec-prob__val {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.home-rec-prob__lvl {
  font-family: 'Noto Sans HK', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  margin-top: 0;
  letter-spacing: 0.01em;
}
.home-rec-prob__val,
.home-rec-prob__lvl { color: #00b86a; }

.home-rec-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.25;
  letter-spacing: -0.01em;
  min-height: 2.5em;
}

.home-rec-delta {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.home-rec-card__foot {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px dashed var(--border);
}

.home-rec-stat { 
  display: flex; 
  flex-direction: row; 
  align-items: center; 
  gap: 4px; 
  line-height: 1.1; 
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-mid);
}
.home-rec-stat__val {
  font-family: 'Space Mono', ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.home-rec-careers {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
  max-height: calc(2 * (0.62rem * 1.4 + 4px) + 4px);
  overflow: hidden;
}
.home-rec-career {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--bg-tint, #f0f4f8);
  color: var(--text-mid, #556677);
  white-space: nowrap;
  line-height: 1.4;
  flex-shrink: 0;
}

.home-rec-card__cta {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.home-rec-card__cta i { font-size: 0.6rem; transition: transform 0.2s ease; }
.home-rec-card:hover .home-rec-card__cta i { transform: translateX(2px); }

/* 引導 CTA（未填分數時掛在卡片下方） */
.home-rec-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.22);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.home-rec-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(76, 175, 80, 0.28); }
.home-rec-cta:active { transform: scale(0.99); }

.home-rec-cta__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.home-rec-cta__icon i { font-size: 1rem; color: #fff; }

.home-rec-cta__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.home-rec-cta__text strong {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.home-rec-cta__text span {
  font-size: 0.7rem;
  opacity: 0.92;
  font-weight: 500;
  margin-top: 2px;
}
.home-rec-cta__arrow {
  font-size: 0.85rem;
  opacity: 0.9;
  flex-shrink: 0;
}

/* 已填分數、未完成職業測試時的引導面板 */
.home-rec-career-panel {
  margin: 0 16px;
  padding: 16px;
  background: linear-gradient(145deg, #ffffff 0%, var(--bg-tint, #f8fafc) 100%);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.home-rec-career-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-rec-career-panel__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, rgba(167, 139, 250, 0.14) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(88, 28, 135, 0.12);
}

.home-rec-career-panel__icon img {
  width: 42px;
  height: 42px;
  display: block;
}

.home-rec-career-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.home-rec-career-panel__desc {
  margin: 0;
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.5;
}

.home-rec-career-panel__desc b {
  color: var(--text-dark);
  font-weight: 700;
}

.home-rec-career-panel__btn {
  width: 100%;
  font-size: 0.95rem;
  padding: 12px 20px;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.22);
}

/* --- AI 光线绕圈动画定义 --- */
@property --ai-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes ai-spin-border {
  to {
    --ai-angle: 360deg;
  }
}

/* 為你推薦 · 引導測試鎖定區 */
.home-recs__locked-wrap {
  position: relative;
  margin: 4px 16px 0;
  border-radius: var(--radius-lg, 24px); /* 和其他卡片保持一致的圆角 */
  overflow: hidden;
  
  /* 边框稍微变细一点，显得更精致 */
  border: 1.5px solid transparent; 
  
  /* 核心技巧：双层背景
     更优雅的渐变：拉长尾巴，颜色过渡更柔和 */
  background: 
    linear-gradient(var(--bg-card, #ffffff), var(--bg-card, #ffffff)) padding-box,
    conic-gradient(
      from var(--ai-angle, 0deg), 
      var(--border, #e2e8f0) 0%, 
      var(--border, #e2e8f0) 40%, 
      color-mix(in srgb, var(--primary) 15%, var(--border, #e2e8f0)) 65%,
      color-mix(in srgb, var(--primary) 60%, var(--border, #e2e8f0)) 85%,
      var(--primary) 100%
    ) border-box;
    
  /* 匀速且加快转动速度 */
  animation: ai-spin-border 3s linear infinite;
}

.home-recs__grid--blur {
  filter: blur(3px) saturate(0.85);
  opacity: 0.88;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  padding: 4px 16px 16px;
}

.home-recs__unlock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  padding: 0 24px;
  gap: 8px;
  text-align: center;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--primary) 6%, transparent) 0%,
    color-mix(in srgb, var(--primary) 32%, transparent) 55%,
    color-mix(in srgb, var(--primary) 48%, transparent) 100%
  );
}

.home-recs__unlock-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 8px color-mix(in srgb, var(--primary-dark) 40%, transparent);
}

.home-recs__unlock-desc {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  line-height: 1.45;
  text-shadow: 0 1px 6px color-mix(in srgb, var(--primary-dark) 35%, transparent);
}

.home-recs__unlock-btn {
  flex: none;
  width: auto;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 22px;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  color: #fff;
  background: var(--primary);
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}

/* 按钮的光泽扫过动画层 */
.home-recs__unlock-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: skewX(-20deg);
  /* 更快、更连贯的匀速扫过 */
  animation: ai-btn-shimmer 2s infinite linear;
}

@keyframes ai-btn-shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.home-recs__unlock-btn:hover {
  background: var(--primary-dark);
}

.home-recs__unlock-btn:active {
  transform: scale(0.97);
}

/* 窄屏：稍微調整卡片寬度 */
@media (max-width: 360px) {
  .home-rec-card { flex: 0 0 230px; min-height: auto; }
  .home-rec-card__name {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    min-height: 0;
  }
}

/* 首頁職業測試選擇彈窗 */
.career-modal-overlay {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(10,20,50,0.1) 0%, rgba(10,20,50,0.7) 100%);
}

.theme-fintech .pd-modal.career-modal,
.pd-modal.career-modal {
  --pd-modal-height: auto;
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 140px);
  border-radius: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.theme-fintech .pd-modal.career-modal .pd-header {
  background: transparent;
}

.theme-fintech .pd-modal.career-modal .pd-scroll {
  border-radius: 0;
  background: transparent;
}

.career-modal {
  margin: 0;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.97);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.career-modal-overlay.open .career-modal {
  transform: scale(1);
}

.theme-fintech .pd-modal.career-modal .pd-header.career-modal__header,
.pd-modal.career-modal .pd-header.career-modal__header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  padding: 32px 24px 12px !important;
  border-bottom: none;
  background: transparent;
  gap: 8px;
  text-align: center;
}

.theme-fintech .pd-modal.career-modal .career-modal__title,
.pd-modal.career-modal .career-modal__title {
  font-size: 1.35rem;
  text-align: center !important;
  width: 100%;
  max-width: 100%;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.5px;
  padding-right: 0 !important;
  margin: 0 auto !important;
  justify-content: center;
}

.theme-fintech .pd-modal.career-modal .career-modal__subtitle,
.pd-modal.career-modal .career-modal__subtitle {
  text-align: center !important;
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  font-weight: 500;
  width: 100%;
}

.theme-fintech .pd-modal.career-modal .pd-scroll,
.career-modal__body {
  flex: 0 1 auto;
  overflow-y: auto;
}

.career-modal__body {
  padding: 4px 20px 20px;
}

.career-modal__footnote {
  margin: 12px 0 0;
  padding: 0 4px;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.5;
  text-align: center;
}

.career-modal__body .ct-pick-list {
  margin: 0;
}

.career-modal__close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
  z-index: 100;
  padding: 0;
  outline: none;
  box-shadow: none;
}

.career-modal__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

#careerModal .ct-pick-label {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  color: #4338ca;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
}

/* 文字左、icon 右；尺寸沿用 guide.css 的 guide-topic-icon */
#careerModal .ct-topic-row .guide-topic-headline {
  order: 1;
  flex: 1;
}

#careerModal .ct-topic-row .guide-topic-icon {
  order: 2;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  transform: translateY(-4px);
}

#careerModal .ct-topic-row .guide-topic-icon::after {
  display: none;
}

#careerModal .ct-topic-row .guide-topic-icon-img {
  width: 84px;
  height: 84px;
  filter: none;
}

@media (min-width: 480px) {
  #careerModal .ct-topic-row .guide-topic-icon-img {
    width: 92px;
    height: 92px;
  }
}

@media (hover: hover) {
  #careerModal .guide-topic-row:hover .guide-topic-icon {
    background: none;
    box-shadow: none;
    transform: translateY(-4px);
  }
}

#careerModal .ct-topic-row .guide-topic-arrow {
  display: none;
}

/* =========================================
   AI 智能感動畫 (為你推薦 CTA)
   ========================================= */

/* 1. AI 数据扫描线 */
.ai-scanner-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary, #4a90e2), transparent);
  box-shadow: 0 0 15px 2px var(--primary, #4a90e2);
  z-index: 2;
  pointer-events: none;
  animation: aiScan 3s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes aiScan {
  0% { top: 10%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 90%; opacity: 0; }
}

/* 2. 流光呼吸按钮 */
.ai-glow-btn {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: aiBreathing 2.5s infinite alternate;
}

@keyframes aiBreathing {
  0% { box-shadow: 0 0 8px color-mix(in srgb, var(--primary, #4a90e2) 40%, transparent); }
  100% { box-shadow: 0 0 24px color-mix(in srgb, var(--primary, #4a90e2) 80%, transparent), 0 0 10px rgba(255,255,255,0.5); }
}

/* 按钮内部的扫光效果 */
.ai-glow-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: aiSweep 4s infinite;
}

@keyframes aiSweep {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

/* 3. 打字机文字效果 */
.ai-typing-text {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--primary, #4a90e2);
  animation: typing 2s steps(15, end), blink-caret 0.8s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--primary, #4a90e2); }
}
