/* ============================================================
   護理職場透明化運動 — Global Styles
   風格：溫暖人文 + 醫療專業感
   ============================================================ */

:root {
  /* 主色票 */
  --primary: #2E86AB;
  --primary-dark: #1F5F7A;
  --primary-soft: #5BA8C6;
  --accent: #A8DADC;
  --accent-soft: #C7E6E8;
  --warm: #F1FAEE;

  /* 文字 */
  --ink: #1D3557;
  --ink-soft: #46557A;
  --muted: #6B7C93;
  --muted-light: #9AA5B8;

  /* 狀態色 */
  --danger: #E63946;
  --warning: #F4A261;
  --success: #06A77D;

  /* 結構 */
  --surface: #FFFFFF;
  --surface-soft: #FBFCFD;
  --border: #E5E9F0;
  --border-soft: #F1F3F7;

  /* 類別色（與 config.js 同步） */
  --cat-icu: #2E86AB;
  --cat-dialysis: #06A77D;
  --cat-er: #E63946;
  --cat-ward: #F4A261;
  --cat-outpatient: #9D4EDD;

  /* 設計 token */
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-tag: 999px;
  --shadow-card: 0 4px 20px rgba(29, 53, 87, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(29, 53, 87, 0.12);
  --shadow-soft: 0 2px 8px rgba(29, 53, 87, 0.04);

  /* 字型 */
  --font-serif: 'Lora', 'Noto Serif TC', Georgia, serif;
  --font-sans: 'Noto Sans TC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* 動畫 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--warm);
  line-height: 1.65;
  font-feature-settings: 'palt';
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); }

p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 64px 0; }
@media (max-width: 768px) { section { padding: 44px 0; } }
@media (max-width: 480px) {
  section { padding: 32px 0; }
  .container, .container-narrow { padding: 0 16px; }
}

/* hide hardcoded <br> on small screens (let text wrap naturally) */
.md-only { display: inline; }
@media (max-width: 768px) {
  .md-only { display: none; }
}

/* prevent awkward overflow & ensure text wraps */
h1, h2, h3, p, span, a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 1px 0 rgba(29, 53, 87, 0.04);
}

/* 給內容留出 header 高度，避免被遮住 */
body {
  padding-top: 64px;
}

/* 錨點跳轉時不讓 header 蓋住目標 */
:target,
section[id],
h1[id], h2[id], h3[id] {
  scroll-margin-top: 80px;
}

.site-header .nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
}

.site-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  color: white;
}

.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.site-nav a.active {
  color: var(--primary);
}
/* 外部連結頁簽（RT 姊妹站）：比其他頁簽更淡、更細、略小，退為次要 */
.site-nav a.nav-external {
  color: var(--muted-light);
  font-weight: 400;
  font-size: 0.8rem;
}
.site-nav a.nav-external:hover { color: var(--muted); }
.nav-external-arrow { font-size: 0.78em; opacity: 0.55; }

/* 橫向可捲動列的「左右滑動」提示（由 js/scroll-hint.js 動態插入） */
.scroll-hint {
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted-light);
  margin-top: 6px;
  transition: opacity .35s ease;
  user-select: none;
}
.scroll-hint--done { opacity: 0; }
.scroll-hint-arrow {
  display: inline-block;
  font-weight: 700;
  color: var(--primary);
  animation: scroll-hint-nudge 1.4s ease-in-out infinite;
}
.scroll-hint-arrow:last-child { animation-delay: .2s; }
@keyframes scroll-hint-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint-arrow { animation: none; }
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* 導覽下拉群組（資料查詢） */
.nav-group { position: relative; display: inline-flex; align-items: center; }
.nav-group-trigger {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 0.95rem; font-weight: 500;
  color: var(--ink-soft); display: inline-flex; align-items: center; gap: 4px;
}
.nav-group-trigger.active { color: var(--primary); }
.nav-group-caret { font-size: 0.7em; transition: transform .2s; }
.nav-group:hover .nav-group-caret,
.nav-group.open .nav-group-caret { transform: rotate(180deg); }
/* 透明橋接：補 trigger 與下拉之間的空隙，避免 hover 中斷 */
.nav-group::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.nav-submenu {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 170px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: 12px;
  box-shadow: var(--shadow-soft); padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s; z-index: 60;
}
.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu,
.nav-group.open .nav-submenu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-submenu a {
  padding: 9px 12px; border-radius: 8px; white-space: nowrap;
  color: var(--ink-soft); font-size: 0.92rem; font-weight: 500;
}
.nav-submenu a:hover { background: var(--border-soft); color: var(--ink); }
.nav-submenu a.active { color: var(--primary); background: rgba(46,134,171,0.08); }
.nav-submenu a.active::after { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;   /* 手機：改左對齊全寬，與「資料查詢」群組一致 */
    padding: 16px 24px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
  }
  .site-nav > a { padding: 2px 0; }
  .site-nav.open { display: flex; }
  .site-nav a.active::after { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  /* 手機：資料查詢群組直接展開，trigger 當小標題、子項縮排 */
  .nav-group { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: stretch; }
  .nav-group::after { display: none; }
  .nav-group-trigger {
    pointer-events: none; cursor: default;
    color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: .04em;
    padding: 2px 0;
  }
  .nav-group-caret { display: none; }
  .nav-submenu {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; border: none; background: none;
    padding: 0 0 0 12px; margin-left: 2px; gap: 12px;
    border-left: 2px solid var(--border-soft); border-radius: 0;
    transition: none;   /* 手機為靜態展開，關掉桌機下拉的滑動動畫 */
  }
  /* 手機點子項時避免 focus-within/open 觸發桌機的位移動畫 */
  .nav-group.open .nav-submenu,
  .nav-group:hover .nav-submenu,
  .nav-group:focus-within .nav-submenu { transform: none; }
  .nav-submenu a { padding: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(46, 134, 171, 0.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(46, 134, 171, 0.32);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 「複製連結」按鈕成功狀態 — 給 platform 詳情 modal + violations 詳情 modal 共用 */
#modal-copylink-btn.copied,
#viol-modal-copylink.copied {
  background: var(--success);
  color: white;
  border-color: var(--success);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
#modal-copylink-btn.copied:hover,
#viol-modal-copylink.copied:hover {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

/* Toast 容器 + 樣式 */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  font-size: 0.88rem;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-warn { background: var(--warning); color: var(--ink); }
.toast-error { background: var(--danger); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-ghost:hover { color: var(--primary); background: var(--accent-soft); }

.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  border: 1px solid var(--border-soft);
}
@media (max-width: 480px) {
  .card, .card-flat { padding: 20px 18px; }
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.card-flat {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  border: 1px solid var(--border);
}

/* ---------- Tags / Badges ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-tag);
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.tag-icu       { background: rgba(46, 134, 171, 0.12); color: var(--cat-icu); }
.tag-dialysis  { background: rgba(6, 167, 125, 0.12);  color: var(--cat-dialysis); }
.tag-er        { background: rgba(230, 57, 70, 0.12);  color: var(--cat-er); }
.tag-ward      { background: rgba(244, 162, 97, 0.16); color: #B36A2C; }
.tag-outpatient{ background: rgba(157, 78, 221, 0.12); color: var(--cat-outpatient); }
.tag-or        { background: rgba(255, 107, 157, 0.14); color: #BE185D; }
.tag-special   { background: rgba(20, 184, 166, 0.14);  color: #0F766E; }
.tag-other     { background: rgba(100, 116, 139, 0.16); color: #475569; }
.tag-psych     { background: rgba(79, 70, 229, 0.12);  color: #4338CA; }
.tag-clinic    { background: rgba(8, 145, 178, 0.12);  color: #0E7490; }

/* ============================================================
   官方參考數據 section（衛福部 + 護理全聯會）
   採用網站既有風格 — 不用深色 banner / 漸層背景，與使用者分頁視覺一致
============================================================ */
.official-tag-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.official-tag-line h2 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.off-source-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(46, 134, 171, 0.12);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.off-source-pill-alt {
  background: rgba(6, 167, 125, 0.12);
  color: var(--success);
}

/* 照護司外部連結入口（橫向 strip 風格，置於官方分頁頂部，整片可點） */
.mohw-entry-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(46,134,171,0.10) 0%, rgba(168,218,220,0.20) 100%);
  border: 1px solid rgba(46,134,171,0.25);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
}
.mohw-entry-strip:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(46,134,171,0.14);
  color: var(--ink);
}
.mohw-strip-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mohw-strip-body { flex: 1; min-width: 0; }
.mohw-strip-title {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
}
.mohw-strip-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mohw-strip-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.55;
}
.mohw-strip-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background .15s ease;
}
.mohw-entry-strip:hover .mohw-strip-cta { background: var(--primary-dark); }

@media (max-width: 720px) {
  .mohw-entry-strip { flex-wrap: wrap; padding: 14px 16px; gap: 12px; }
  .mohw-strip-body { flex: 1 1 100%; order: 2; }
  .mohw-strip-icon { order: 1; }
  .mohw-strip-cta { order: 3; margin-left: auto; }
  .mohw-strip-title { font-size: 0.95rem; }
  .mohw-strip-desc { font-size: 0.82rem; }
}

/* 報告分頁切換（segmented control 風格） */
.off-subtabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  background: rgba(46, 134, 171, 0.07);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
}
.off-subtab {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
  color: var(--ink-soft);
  font-family: inherit;
  text-align: left;
}
.off-subtab:hover {
  background: rgba(46, 134, 171, 0.08);
  color: var(--ink);
}
.off-subtab.active {
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(29, 53, 87, 0.08);
  color: var(--ink);
}
.off-subtab > span:last-child {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.off-subtab-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(46, 134, 171, 0.15);
  color: var(--primary);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.off-subtab-pill.off-subtab-pill-alt {
  background: rgba(6, 167, 125, 0.15);
  color: var(--success);
}
.off-subtab.active .off-subtab-pill {
  background: var(--primary);
  color: white;
}
.off-subtab.active .off-subtab-pill.off-subtab-pill-alt {
  background: var(--success);
  color: white;
}
@media (max-width: 720px) {
  .off-subtab { min-width: 100%; }
}
.official-meta {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.8;
  margin: 4px 0 0;
}
.official-meta strong { color: var(--ink); }
.off-pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 薪資範圍表格 */
.off-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.off-salary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.off-salary-table th,
.off-salary-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.off-salary-table thead th {
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}
.off-salary-table thead th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.78rem;
  margin-top: 2px;
}
.off-salary-table tbody th {
  color: var(--ink);
  font-weight: 600;
  background: rgba(46, 134, 171, 0.04);
  white-space: nowrap;
}
.off-salary-table tbody th small {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.76rem;
  margin-top: 2px;
}
.off-money-avg {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.off-money-unit {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 2px;
}
.off-money-range {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.off-empty { color: var(--muted-light); text-align: center; font-style: italic; }
.off-region-meta {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 500;
}

@media (max-width: 600px) {
  .off-salary-table { font-size: 0.85rem; }
  .off-salary-table th, .off-salary-table td { padding: 10px 8px; }
  .official-tag-line h2 { font-size: 1.2rem; }
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--primary-dark);
}

/* ---------- Stat Card ---------- */
.stat-card {
  text-align: center;
  padding: 32px 24px;
}
.stat-card .stat-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}
.stat-card .stat-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
@media (max-width: 480px) {
  .stat-card { padding: 24px 16px; }
  .stat-card .stat-num { font-size: 2rem; }
  .stat-card .stat-label { font-size: 0.85rem; }
}

/* 訪客卡：今日 / 累積 並排於同一張卡，中間細分隔線 */
.visits-split {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.visits-split .visits-cell {
  flex: 1;
  min-width: 0;
}
.visits-split .stat-num {
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
}
.visits-split .visits-divider {
  align-self: stretch;
  width: 1px;
  background: var(--border);
  margin: 4px 0;
}
/* 累積訪客：次要資訊，縮小 + 淡色，讓「今日訪客」為主 */
.visits-split .visits-cell-secondary .stat-num {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--muted);
}
@media (max-width: 480px) {
  .visits-split { gap: 12px; }
  .visits-split .stat-num { font-size: 1.7rem; }
  .visits-split .visits-cell-secondary .stat-num { font-size: 1.25rem; }
}

/* ---------- 統一 KPI 數字字卡（給有多種格式：純數字、數字+單位、日期、百分比） ---------- */
/* 用 flex + min-height 強制每張卡的數字區塊高度一致，避免不同 font-size 讓 label 跑位 */
.stat-card .kpi-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-height: 50px;
  white-space: nowrap;
}
.stat-card .kpi-num .kpi-unit {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
/* 字數較多（例：「45-50」工時區間、「114/12/31」日期）自動縮一階字級 */
.stat-card .kpi-num.is-text {
  font-size: 1.75rem;
}
@media (max-width: 480px) {
  .stat-card .kpi-num { font-size: 1.85rem; min-height: 44px; }
  .stat-card .kpi-num.is-text { font-size: 1.5rem; }
  .stat-card .kpi-num .kpi-unit { font-size: 0.85rem; }
}

/* ---------- KPI info icon + tooltip ---------- */
.kpi-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  vertical-align: -3px;
  color: var(--muted-light);
  cursor: help;
  position: relative;
  outline: none;
  transition: color .15s ease;
}
.kpi-info:hover,
.kpi-info:focus-visible {
  color: var(--primary);
}
.kpi-info-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 280px;
  max-width: 80vw;
  padding: 12px 14px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.6;
  text-align: left;
  font-weight: 400;
  letter-spacing: 0;
  box-shadow: 0 10px 30px rgba(29, 53, 87, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 50;
}
.kpi-info-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.kpi-info-tip strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-weight: 600;
}
.kpi-info:hover .kpi-info-tip,
.kpi-info:focus-visible .kpi-info-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
@media (max-width: 480px) {
  .kpi-info-tip {
    width: 260px;
    font-size: 0.78rem;
  }
}

/* ---------- Category Card ---------- */
.cat-card {
  position: relative;
  overflow: hidden;
  text-align: left;
}
/* 統一所有 .cat-icon-wrap：置中、白色 icon、尺寸可被 inline 覆寫 */
.cat-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: white;
  flex-shrink: 0;
}
.cat-icon-wrap svg {
  display: block;
}
.cat-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.cat-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 16px;
}
.cat-card .cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
}
.cat-card .cat-cta {
  color: var(--primary);
  font-weight: 500;
}

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(168, 218, 220, 0.35), transparent 60%),
    radial-gradient(600px 300px at 100% 0%, rgba(46, 134, 171, 0.08), transparent 50%);
}
@media (max-width: 768px) { .hero { padding: 48px 0 32px; } }
@media (max-width: 480px) { .hero { padding: 36px 0 24px; } }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--primary-dark);
  border-radius: var(--radius-tag);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(1.85rem, 4.5vw, 3.4rem);
  margin: 0 0 20px;
  line-height: 1.25;
  max-width: 18ch;
}
@media (max-width: 480px) {
  .hero-title { line-height: 1.35; max-width: 100%; }
}
.hero-title em {
  font-style: normal;
  color: var(--primary);
  position: relative;
}
.hero-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--accent);
  opacity: 0.55;
  border-radius: 4px;
  z-index: -1;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 32px;
  line-height: 1.75;
  max-width: 38ch;
}
@media (max-width: 768px) {
  .hero-sub { font-size: 1rem; max-width: 100%; }
}
@media (max-width: 480px) {
  .hero-sub { font-size: 0.95rem; line-height: 1.7; margin-bottom: 24px; }
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { flex: 1 1 auto; min-width: 140px; justify-content: center; }
@media (min-width: 640px) {
  .hero-cta .btn { flex: 0 0 auto; }
}

.hero-art {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(46, 134, 171, 0.08) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}
.tab {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); background: var(--border-soft); }
.tab.active { background: var(--primary); color: white; }
.tab.active .badge { background: rgba(255,255,255,0.25); color: white; }

/* Horizontal scroll for tabs on small screens */
@media (max-width: 640px) {
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 9px 14px; font-size: 0.88rem; }
}

/* ---------- Filter Panel ---------- */
.filter-panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 20px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

/* ---------- Stats 篩選條件折疊 ---------- */
.stat-filter-panel {
  padding: 0;
  overflow: hidden;
}
.stat-filter-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  transition: background .15s ease;
}
.stat-filter-panel > summary::-webkit-details-marker { display: none; }
.stat-filter-panel > summary::marker { display: none; }
.stat-filter-panel > summary:hover { background: var(--surface-soft); }
.stat-filter-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.stat-filter-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  background: var(--primary);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.stat-filter-chev {
  display: inline-flex;
  color: var(--muted);
  transition: transform .25s var(--ease);
}
.stat-filter-panel[open] > summary .stat-filter-chev {
  transform: rotate(180deg);
}
.stat-filter-body {
  padding: 4px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
}
/* platform.html：收折面板裡塞 renderFilters() 的輸出，移除二重卡片邊框/底色 */
.stat-filter-panel .stat-filter-body > #filter-panel > .filter-panel {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
}
.stat-filter-panel .stat-filter-body .filter-section { margin-bottom: 16px; }
.stat-filter-panel .stat-filter-body .filter-section:last-of-type { margin-bottom: 12px; }
.filter-section {
  margin-bottom: 20px;
}
.filter-section h4 {
  margin: 0 0 10px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-tag);
  background: var(--border-soft);
  color: var(--ink-soft);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s ease;
  user-select: none;
}
.filter-chip:hover { border-color: var(--primary); }
.filter-chip.active {
  background: var(--primary);
  color: white;
}

/* ---------- Data Table ---------- */
.data-table-wrap {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table thead th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.data-table thead th:hover { color: var(--primary); }
.data-table thead th.sort-asc::after { content: ' ↑'; color: var(--primary); }
.data-table thead th.sort-desc::after { content: ' ↓'; color: var(--primary); }
/* 未貢獻者：thead 鎖住 — 不可 hover 變色、不顯示箭頭、cursor 改 default */
.data-table thead th.g2g-sort-locked,
.data-table thead th.g2g-sort-locked:hover { cursor: default; color: var(--muted); }
.data-table thead th.g2g-sort-locked::after { content: none; }

/* 序號欄（不可排序、固定窄寬、置中） */
.data-table th.seq-col,
.data-table td.seq-col {
  width: 56px;
  min-width: 56px;
  padding-left: 12px;
  padding-right: 8px;
  text-align: center;
  color: var(--muted-light);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
}
/* 序號欄可排序（依 _seq；hover 同其他欄位變主色） */
.data-table thead th.seq-col { cursor: pointer; }
.data-table thead th.seq-col:hover { color: var(--primary); }

.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--ink-soft);
  vertical-align: middle;
  white-space: nowrap;
}
.data-table tbody td .truncate {
  display: inline-block;
  vertical-align: middle;
}

.data-table tbody tr:hover { background: var(--surface-soft); cursor: pointer; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .recommend-cell {
  font-weight: 600;
}

.data-table .truncate {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 機構/單位名稱：截斷 + hover 顯示完整 tooltip */
.data-table .cell-trunc {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  cursor: help;
}
.data-table .cell-trunc[data-key="unitName"] {
  max-width: 140px;
}
@media (max-width: 1100px) {
  .data-table .cell-trunc { max-width: 140px; }
  .data-table .cell-trunc[data-key="unitName"] { max-width: 110px; }
}

/* ---------- 勞檢紀錄：頁頂「看資料前請先了解」說明卡 ---------- */
.viol-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(168, 218, 220, 0.22) 0%, rgba(168, 218, 220, 0.10) 100%);
  border: 1px solid rgba(46, 134, 171, 0.18);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
}
.viol-notice-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viol-notice-body { flex: 1; min-width: 0; }
.viol-notice-title {
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.viol-notice-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.85;
}
.viol-notice-list li {
  position: relative;
  padding: 2px 0 2px 18px;
}
.viol-notice-list li::before {
  content: '';
  position: absolute;
  left: 4px; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.55;
}
.viol-notice-list strong { color: var(--ink); }
.viol-notice-list a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 600px) {
  .viol-notice { padding: 16px 16px; gap: 12px; }
  .viol-notice-icon { width: 32px; height: 32px; }
  .viol-notice-title { font-size: 0.96rem; }
  .viol-notice-list { font-size: 0.88rem; line-height: 1.8; }
}

/* ---------- 違規紀錄合併頁 sub-tabs（勞檢 · 性平 · 職安）---------- */
.records-subtabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.records-subtab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.records-subtab:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 134, 171, 0.10);
  color: var(--ink);
}
.records-subtab.active {
  background: linear-gradient(135deg, rgba(46, 134, 171, 0.10) 0%, rgba(168, 218, 220, 0.20) 100%);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(46, 134, 171, 0.12);
}
.records-subtab-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.records-subtab-sub {
  font-size: 0.82rem;
  color: var(--muted);
}
.records-subtab-badge {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 8px;
  background: var(--border-soft);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.records-subtab.active .records-subtab-badge {
  color: var(--primary);
  background: rgba(46, 134, 171, 0.15);
}
@media (max-width: 768px) {
  .records-subtabs { grid-template-columns: 1fr; }
  .records-subtab { padding: 12px 16px; }
  .records-subtab-badge { top: 12px; right: 14px; }
}

/* ---------- records.html 緊湊型 intro strip ---------- */
.records-intro-strip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(46, 134, 171, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.records-intro-icon {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
  display: inline-flex;
}
.records-intro-body { flex: 1; min-width: 0; }
.records-intro-tab {
  margin: 0 0 6px;
  color: var(--ink);
}
.records-intro-tab strong { color: var(--primary); font-weight: 600; }
.records-intro-common {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.records-intro-common strong { color: var(--ink); font-weight: 600; }
.records-intro-common a { color: var(--primary); font-weight: 600; }
@media (max-width: 640px) {
  .records-intro-strip { padding: 10px 12px; font-size: 0.82rem; }
  .records-intro-tab { margin-bottom: 4px; }
  .records-intro-common { font-size: 0.78rem; }
}

/* ---------- 勞檢紀錄表格專屬 ---------- */
.viol-table th { background: var(--surface-soft); }
.viol-table .viol-date {
  font-family: 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;
  font-size: 0.86rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.viol-table .viol-loc {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(46, 134, 171, 0.1);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.viol-table .viol-fine {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--danger);
  white-space: nowrap;
}
/* 機構名稱欄：拿掉舊的 cell-trunc 截斷、允許換行、給更多寬度 */
.viol-table .viol-inst-col { min-width: 240px; }
.viol-table .viol-inst-cell {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.5;
  white-space: normal;
  word-break: break-word;
}

/* 每列可點：hover 高亮 + cursor 指標，讓使用者知道可以點開細節 */
.viol-table tbody tr.viol-row { cursor: pointer; transition: background .12s ease; }
.viol-table tbody tr.viol-row:hover { background: rgba(46, 134, 171, 0.06); }

/* 詳情 modal：勞檢紀錄用的紅色 tag（跟 platform 的分類 tag 區隔）*/
.viol-detail-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(230, 57, 70, 0.10);
  color: var(--danger);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.viol-detail-modal .modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) {
  .viol-detail-modal .modal-grid { grid-template-columns: 1fr; }
}
body.viol-modal-open { overflow: hidden; }

.viol-law-chip {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(230, 57, 70, 0.1);
  color: var(--danger);
  border-radius: 6px;
  white-space: nowrap;
  cursor: help;
}
/* 違反法條欄（第 5 欄）允許多 chip 換行，避免擠掉後面的罰鍰欄 */
.viol-table td:nth-child(5),
.viol-table th:nth-child(5) {
  white-space: normal;
  max-width: 240px;
  line-height: 1.7;
}
@media (max-width: 900px) {
  .viol-table .viol-desc { max-width: 180px; }
  .viol-table th, .viol-table td { padding-left: 10px; padding-right: 10px; }
  .viol-table td:nth-child(5),
  .viol-table th:nth-child(5) { max-width: 180px; }
}

/* 自訂浮動 tooltip（給機構/單位被截斷時 hover 用） */
.cell-tip {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  padding: 8px 12px;
  background: var(--ink);
  color: white;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 8px;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(29, 53, 87, 0.25);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .12s ease, transform .12s ease;
  white-space: normal;
  word-break: break-word;
}
.cell-tip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card view (mobile) */
.data-cards {
  display: grid;
  gap: 12px;
}
.data-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}
/* 卡片頂列：類別 tag（左）＋ 推薦 pill（右），兩者常駐 */
.data-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.data-card-titlerow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.data-card-title {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
  min-width: 0;
}
.data-card-seq {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted-light);
  letter-spacing: 0.03em;
}
.data-card-unit {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 2px;
}
.data-card-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}
/* 亮點統計列：累計年資 + 年薪（兩欄等寬；只有一個值時自動撐滿） */
.data-card-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.data-card-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg,
    rgba(46,134,171,0.08) 0%,
    rgba(168,218,220,0.14) 100%);
  border: 1px solid rgba(46,134,171,0.15);
}
.data-card-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.data-card-stat-val {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.data-card-stat-unit {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}
/* full-width comment block inside card */
.data-card-comment {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
.data-card-comment .key {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 4px;
}

/* ---------- Recommend pill ---------- */
.pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: var(--radius-tag);
  font-size: 0.78rem;
  font-weight: 600;
}
.pill-rec-5 { background: rgba(6,167,125,0.15);  color: var(--success); }
.pill-rec-4 { background: rgba(46,134,171,0.12); color: var(--primary); }
.pill-rec-3 { background: rgba(244,162,97,0.16); color: #B36A2C; }
.pill-rec-2 { background: rgba(230,57,70,0.12);  color: var(--danger); }
.pill-rec-1 { background: rgba(153,27,27,0.15);  color: #7F1D1D; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(29, 53, 87, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-card);
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(29, 53, 87, 0.25);
  animation: modalIn .3s var(--ease);
}
@media (max-width: 600px) {
  .modal-backdrop { padding: 0; align-items: stretch; }
  .modal {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    margin-top: auto;
    padding: 24px 20px 32px;
  }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
@media (max-width: 480px) {
  #modal-share-btn { padding: 7px 10px !important; font-size: 0.78rem !important; }
  #modal-share-btn span:last-child { display: none; }
}
/* 手機：標頭改直向堆疊，動作鈕列移到上方靠右，標題取得整行寬度
   （避免長按鈕把標題擠成一行一字） */
@media (max-width: 600px) {
  .modal-header { flex-direction: column; align-items: stretch; }
  .modal-header > :last-child { order: -1; justify-content: flex-end; flex-wrap: wrap; }
}
.modal-close {
  background: var(--border-soft);
  border: none;
  width: 36px; height: 36px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--border); color: var(--ink); }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}
.modal-grid .key {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.modal-grid .val {
  color: var(--ink);
  font-weight: 500;
}
@media (max-width: 600px) { .modal-grid { grid-template-columns: 1fr; } }

/* ---------- Spinner ---------- */
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- PWA Install Prompt ---------- */
.pwa-prompt {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(29, 53, 87, 0.22);
  border: 1px solid var(--border-soft);
  padding: 14px 14px 14px 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .25s ease;
}
.pwa-prompt.show {
  transform: translateY(0);
  opacity: 1;
}
.pwa-prompt-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-prompt-body {
  flex: 1;
  min-width: 0;
}
.pwa-prompt-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.3;
}
.pwa-prompt-text {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}
.pwa-prompt-text strong { color: var(--ink); font-weight: 600; }
.pwa-prompt-link {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.pwa-prompt-link:hover { background: var(--accent-soft); }
.pwa-prompt-install {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}
.pwa-prompt-install:hover { filter: brightness(1.05); }
.pwa-prompt-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  border-radius: 6px;
}
.pwa-prompt-close:hover { background: var(--border-soft); }
@media (max-width: 400px) {
  .pwa-prompt { padding: 12px; gap: 8px; }
  .pwa-prompt-icon { width: 36px; height: 36px; }
  .pwa-prompt-title { font-size: 0.88rem; }
  .pwa-prompt-text { font-size: 0.75rem; }
  .pwa-prompt-link { font-size: 0.78rem; padding: 5px 10px; }
  .pwa-prompt-install { font-size: 0.78rem; padding: 6px 12px; }
}

/* Install Guide modal — current platform highlight */
.install-section-current {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 4px 14px 12px;
  margin: 8px -8px 0;
}
.install-section-current h4::before {
  content: '👉 ';
}

/* ---------- Loading skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border-soft) 25%, #ECF0F4 50%, var(--border-soft) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s infinite;
  border-radius: 8px;
}
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.site-footer h4 {
  color: white;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: white; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-footer { padding: 44px 0 28px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Chart card ---------- */
.chart-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}
.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.chart-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-family: var(--font-sans);
  font-weight: 600;
}
.chart-card .chart-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}
.chart-canvas-wrap {
  position: relative;
  height: 280px;
}
@media (max-width: 600px) {
  .chart-canvas-wrap { height: 240px; }
  .chart-card { padding: 18px; }
}

/* ---------- Salary stats panel（年薪四分位摘要） ---------- */
.salary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding: 14px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.salary-stats > div {
  text-align: center;
  padding: 4px 2px;
}
.salary-stats .ss-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.salary-stats .ss-value {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.salary-stats .ss-unit {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 2px;
  font-weight: 500;
}
.salary-stats .ss-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px 0;
}
.salary-stats.empty {
  grid-template-columns: 1fr;
}
@media (max-width: 480px) {
  .salary-stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 12px;
  }
  .salary-stats .ss-value { font-size: 1.1rem; }
}

select.chart-select {
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7C93' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

/* ---------- Misc utility ---------- */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 32px 0;
}

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

/* ---------- 捐款 widget（js/donate.js） ---------- */
.donate-tiers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}
.donate-tier {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.donate-tier:hover { border-color: var(--primary); }
.donate-tier.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.donate-custom-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  margin: 0 auto 14px;
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  padding: 8px 14px;
}
.donate-custom-prefix { color: var(--muted); font-weight: 600; }
.donate-custom-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  font-variant-numeric: tabular-nums;
}
.donate-submit {
  font-size: 1rem;
  padding: 12px 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.donate-submit:disabled { opacity: .6; cursor: default; }
/* 站標同款心型：實心、色隨父層（用於「支持平台走得更遠」裝飾） */
.support-heart { fill: currentColor; stroke: none; }
/* 跳動白愛心：共用於「前往付款」鈕與分享平台浮動贊助入口（lub-dub 心跳節奏） */
.donate-heart {
  display: inline-block;
  transform-origin: center;
  animation: heartbeat 1.1s ease-in-out infinite;
}
.donate-submit:disabled .donate-heart { animation: none; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.5); }
  36% { transform: scale(1); }
  54% { transform: scale(1.3); }
  72% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .donate-heart { animation: none; }
}

/* 分享平台右下角浮動贊助入口：白愛心、可拖曳、可關閉 */
body.donate-modal-open .donate-fab { display: none; }  /* 開捐款彈窗時隱藏浮標 */
.donate-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 46px;
  height: 46px;
}
.donate-fab-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #2E86AB 0%, #57BFD6 100%);
  color: #fff;
  font-size: 19px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(46, 134, 171, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.donate-fab-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(46, 134, 171, 0.45); }
.donate-fab-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #64748b;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.donate-fab-close:hover { background: #475569; }
/* 手機：浮動愛心再縮小 */
@media (max-width: 600px) {
  .donate-fab, .donate-fab-btn { width: 44px; height: 44px; }
  .donate-fab-btn { font-size: 18px; }
}
/* 捐款彈窗：關閉鈕固定右上角（不套用明細視窗 modal-header 的 RWD 規則） */
.donate-modal-card { position: relative; max-width: 480px; }
.donate-modal-close-btn { position: absolute; top: 16px; right: 16px; }
/* 捐款彈窗內：前往付款鈕置中 */
#donate-widget-modal .donate-submit {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.donate-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 12px 0 0;
}
.donate-note {
  color: var(--muted-light);
  font-size: 0.82rem;
  line-height: 1.6;
  margin: 14px 0 0;
}

/* 「我們的承諾」清單：icon 包在有 class 的外層（renderIcons 會保留 class、丟掉 inline style），
   顏色/對齊寫在此，確保每一則的打勾圖示完全一致。 */
.promise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}
.promise-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
}
.promise-list li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.promise-ico {
  flex: 0 0 auto;
  display: inline-flex;
  color: var(--primary);
  line-height: 0;
  margin-top: 3px;
}

/* ---------- Manifesto / About sections ---------- */
.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.manifesto-item .num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1;
}
@media (max-width: 768px) { .manifesto-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}
.faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] { box-shadow: var(--shadow-card); }
.faq details p {
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.7;
}

/* ---------- About 頁 Q&A 對話流 ---------- */
.about-lead {
  color: var(--ink-soft);
  font-size: 1.2rem;
  line-height: 1.85;
  font-weight: 500;
  margin: 0 0 20px;
}
.about-context {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.95;
  margin: 0 0 40px;
}
.about-context strong { color: var(--ink); }

.faq-block {
  margin: 32px 0;
  display: flex;
  flex-direction: column;
}
.faq-item {
  padding: 24px 0 24px;
  border-bottom: 1px solid var(--border-soft);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.faq-a {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.95;
  padding-left: 2px;
}
.faq-a p { margin: 0; }
.faq-a p + p,
.faq-a p + .faq-list,
.faq-a .faq-list + p { margin-top: 12px; }
.faq-a strong { color: var(--ink); }
.faq-a a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-list {
  margin: 0;
  padding-left: 20px;
  list-style: none;
}
.faq-list li {
  position: relative;
  padding: 4px 0 4px 14px;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}
.faq-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.7;
}

/* About 頁 10 大工作場域字卡 */
.about-cat-grid {
  margin: 16px 0 18px;
  gap: 12px;
}
.about-cat-card {
  padding: 16px 14px !important;
  text-align: left;
  background: var(--surface) !important;
  border: 1px solid var(--border-soft);
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease;
}
.about-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: transparent;
}
.about-cat-card .cat-icon-wrap {
  /* size 由 inline style 覆寫 */
  margin-bottom: 10px !important;
}
.about-cat-name {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
@media (max-width: 880px) {
  .about-cat-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 560px) {
  .about-cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .about-cat-card { padding: 14px 12px !important; }
  .about-cat-name { font-size: 0.92rem; }
}
@media (max-width: 600px) {
  .about-lead { font-size: 1.08rem; }
  .about-context { font-size: 0.98rem; line-height: 1.85; }
  .faq-q { font-size: 1.05rem; }
  .faq-a { font-size: 0.96rem; line-height: 1.85; }
}

/* ---------- View mode switcher ---------- */
.view-switch {
  display: inline-flex;
  background: var(--border-soft);
  padding: 4px;
  border-radius: 10px;
}
.view-switch button {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
}
.view-switch button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

/* ---------- Form card (participate page) ---------- */
.form-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.form-card .form-status {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-tag);
  letter-spacing: 0.05em;
}
.form-status-live   { background: rgba(6,167,125,0.15); color: var(--success); }
.form-status-soon   { background: var(--border-soft);   color: var(--muted); }

.form-card .form-cta {
  margin-top: auto;
  padding-top: 20px;
}

/* ============================================================
   薪資百分位 KPI 條 (platform.html, top of table)
   ============================================================ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.kpi-strip-item {
  background: #fff;
  padding: 14px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
}
.kpi-strip-item-hi {
  background: linear-gradient(180deg, #FFF8EF 0%, #FFFFFF 100%);
}
.kpi-strip-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.kpi-strip-item-hi .kpi-strip-num { color: var(--primary); }
.kpi-strip-unit {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.kpi-strip-label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.25;
}
@media (max-width: 980px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .kpi-strip-item { min-height: 70px; padding: 12px 8px; }
  .kpi-strip-num { font-size: 1.3rem; }
  .kpi-strip-label { font-size: 0.74rem; }
}
@media (max-width: 480px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-strip-item { min-height: 64px; padding: 10px 8px; }
  .kpi-strip-num { font-size: 1.2rem; }
}

/* ============================================================
   薪資試算工具 — Modal (platform.html)
   ============================================================ */
.calc-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.calc-modal[hidden] { display: none !important; }
.calc-modal.open { opacity: 1; }
.calc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.calc-modal-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.18s ease;
}
.calc-modal.open .calc-modal-panel { transform: translateY(0) scale(1); }
.calc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.calc-modal-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.calc-modal-title-icon {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
}
.calc-modal-title-icon svg { display: block; }
.calc-modal-close {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.calc-modal-close:hover { background: var(--border-soft); color: var(--ink); }
.calc-modal-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
}

.calc-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.calc-field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.calc-field-label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.calc-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.12);
}
.calc-input-wrap input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  font-variant-numeric: tabular-nums;
}
.calc-suffix {
  padding-right: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.calc-go { flex: 0 0 auto; min-width: 96px; }

.calc-result { margin-top: 14px; }
.calc-empty {
  padding: 14px 16px;
  background: var(--border-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.calc-result-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  border-left: 4px solid var(--calc-accent, var(--primary));
}
/* 比較條件區塊（在結果卡片頂端） */
.calc-conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border-soft);
}
.calc-conditions-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-right: 4px;
}
.calc-conditions-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(46, 134, 171, 0.08);
  border: 1px solid rgba(46, 134, 171, 0.18);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.calc-conditions-key {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.74rem;
}
.calc-conditions-key::after { content: '：'; color: var(--muted-light); }
.calc-conditions-all {
  font-size: 0.82rem;
  color: var(--ink-soft);
  /* 不用 italic — html2canvas 對合成斜體的中文字寬量測會錯，導致截圖重疊 */
}

/* 分享 / 隱藏數字 工具列（位於結果卡底部） */
.calc-share-bar {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.calc-privacy-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink-soft);
  user-select: none;
}
.calc-privacy-toggle input { accent-color: var(--primary); cursor: pointer; }
.calc-privacy-icon { font-size: 1rem; }
.calc-share-btn {
  padding: 8px 14px !important;
  font-size: 0.88rem !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.calc-share-btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.calc-share-icon { font-size: 1rem; }

/* 截圖時暫時隱藏分享列 */
.calc-result-card.capturing .calc-share-bar { display: none; }
/* 隱私模式：marker tooltip 不重要、視覺微調可在這加 */
.calc-result-card.is-private .calc-bar-marker { /* 保持可見 */ }

@media (max-width: 480px) {
  .calc-share-bar { gap: 10px; }
  .calc-share-btn { width: 100%; justify-content: center; }
  .calc-privacy-toggle { width: 100%; justify-content: flex-start; }
}
.calc-rank-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.calc-rank-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--calc-accent, var(--primary));
  font-variant-numeric: tabular-nums;
}
.calc-rank-pct {
  font-size: 1.4rem;
  font-weight: 600;
  margin-left: 2px;
}
.calc-rank-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
.calc-rank-text strong { font-weight: 700; }
.calc-verdict {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 10px;
  background: var(--calc-verdict-bg, rgba(46, 134, 171, 0.12));
  color: var(--calc-accent, var(--primary));
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
}

.calc-bar-wrap { margin-top: 22px; }
.calc-bar {
  position: relative;
  height: 12px;
  background: linear-gradient(90deg, #fef2f2 0%, #fffaf0 35%, #ecfdf5 100%);
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}
.calc-bar-tick {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 16px;
  background: rgba(15, 23, 42, 0.4);
  transform: translateX(-50%);
}
.calc-bar-tick-mid { background: rgba(15, 23, 42, 0.7); }
.calc-bar-tick span {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* P25/P50/P75 標籤水平距離過近時，靠 P50 的那邊改放到下排避免重疊 */
.calc-bar-tick span.tick-stagger { top: 34px; }
.calc-bar-wrap.has-stagger .calc-bar-axis { margin-top: 56px; }
.calc-bar-marker {
  position: absolute;
  top: -8px;
  width: 14px;
  height: 28px;
  border-radius: 4px;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  border: 2px solid #fff;
}
.calc-bar-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 38px;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.calc-summary {
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--border-soft);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.6;
}
.calc-edge-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--calc-edge-bg, rgba(46, 134, 171, 0.08));
  border-left: 3px solid var(--calc-accent, var(--primary));
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.55;
}
.calc-hint {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 640px) {
  /* 手機：modal 改為從底部滑上的 bottom-sheet */
  .calc-modal { padding: 0; align-items: flex-end; }
  .calc-modal-panel {
    max-width: 100%;
    /* dvh = dynamic viewport height，會隨行動瀏覽器 UI chrome + 軟鍵盤動態縮小 */
    max-height: 86dvh;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  .calc-modal.open .calc-modal-panel { transform: translateY(0); }
  .calc-modal-body { padding: 16px; }
  .calc-rank-num { font-size: 2.4rem; }
  .calc-rank-text { font-size: 0.92rem; }
  .calc-go { width: 100%; }
  /* tick label 在窄螢幕字體再縮小 + 錯位樣式多留下方空間避免碰 axis */
  .calc-bar-tick span { font-size: 0.65rem; }
  .calc-bar-wrap.has-stagger { padding-bottom: 26px; }
}

/* modal 開啟時鎖住 body 滾動，避免 iOS 手機 modal 內滾動穿透 */
body.calc-modal-open { overflow: hidden; }

/* ============================================================
   分享平台底部 CTA 卡片（倒流到 participate.html）
   ============================================================ */
/* 桌機：兩張卡並排（分享 + 諮詢）*/
.platform-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 880px) {
  /* 中等以下螢幕：兩卡疊成單欄 */
  .platform-cta-row { grid-template-columns: 1fr; }
}

.platform-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 26px;
  background: linear-gradient(135deg, rgba(46, 134, 171, 0.08) 0%, rgba(168, 218, 220, 0.20) 100%);
  border: 1px solid rgba(46, 134, 171, 0.22);
  border-radius: 16px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  height: 100%; /* 兩卡同高 */
}
.platform-cta-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(46, 134, 171, 0.14);
  border-color: var(--primary);
  color: var(--ink);
}
.platform-cta-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-cta-body { width: 100%; min-width: 0; flex: 1; }
.platform-cta-body h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.platform-cta-body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 0.92rem;
}
.platform-cta-body strong { color: var(--ink); font-weight: 600; }

.platform-cta-action {
  flex-shrink: 0;
  margin-top: auto; /* 按鈕釘在卡底，兩卡視覺對齊 */
}
.platform-cta-action .btn {
  pointer-events: none; /* 整片 <a> 已可點，按鈕只當視覺 */
}

/* 諮詢卡：暖色調區分（橙），跟「分享」(藍) 視覺上有明顯差異 */
.platform-cta-card-consult {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.08) 0%, rgba(244, 162, 97, 0.18) 100%);
  border-color: rgba(244, 162, 97, 0.30);
}
.platform-cta-card-consult:hover {
  border-color: #E76F51;
  box-shadow: 0 10px 28px rgba(244, 162, 97, 0.20);
}
.platform-cta-card-consult .platform-cta-icon {
  background: linear-gradient(135deg, #F4A261 0%, #E76F51 100%);
}

/* 薪資百分位試算入口卡（KPI strip 下方）*/
.calc-trigger-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(46, 134, 171, 0.06) 0%, rgba(168, 218, 220, 0.18) 100%);
  border: 1px solid rgba(46, 134, 171, 0.22);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.calc-trigger-card:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(46, 134, 171, 0.14);
}
.calc-trigger-icon {
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  color: var(--primary);
}
.calc-trigger-body { flex: 1; min-width: 0; }
.calc-trigger-title {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 2px;
  color: var(--ink);
}
.calc-trigger-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.calc-trigger-arrow {
  font-size: 22px;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.calc-trigger-card:hover .calc-trigger-arrow { transform: translateX(3px); }
@media (max-width: 640px) {
  .calc-trigger-card { padding: 14px 18px; gap: 12px; }
  .calc-trigger-icon { font-size: 24px; }
  .calc-trigger-title { font-size: 0.96rem; }
  .calc-trigger-sub { font-size: 0.8rem; }
}

@media (max-width: 640px) {
  .platform-cta-card {
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
    gap: 16px;
    text-align: center;
  }
  .platform-cta-icon { margin: 0 auto; }
  .platform-cta-action .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   stats.html · 官方參考數據分頁 — 行動裝置版面收斂
   ============================================================ */
@media (max-width: 640px) {
  /* 1. Sub-tabs 改為單行緊湊 + 橫向可滾，省去 3 張全寬卡片的高度 */
  #stats-tab-official .off-subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 4px;
    padding: 4px;
  }
  #stats-tab-official .off-subtabs::-webkit-scrollbar { height: 4px; }
  #stats-tab-official .off-subtab {
    min-width: auto;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    white-space: nowrap;
  }
  #stats-tab-official .off-subtab > span:last-child {
    font-size: 0.84rem;
    font-weight: 600;
  }
  #stats-tab-official .off-subtab-pill {
    font-size: 0.66rem;
    padding: 1px 6px;
    letter-spacing: 0.02em;
  }

  /* 2. KPI 4 卡 → 2 欄（避免全寬大磚塊一張接一張） */
  #stats-tab-official .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  #stats-tab-official .stat-card { padding: 18px 12px; }
  #stats-tab-official .stat-card .kpi-num {
    font-size: 1.55rem;
    min-height: 36px;
  }
  #stats-tab-official .stat-card .stat-label {
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 4px;
  }

  /* 3. 簡介卡縮小（圖示更小、文字更密） */
  #stats-tab-official .card-flat {
    padding: 14px;
    font-size: 0.86rem;
  }
  #stats-tab-official .card-flat strong { font-size: 0.9rem; }

  /* 4. tag-line / meta 字體與行高收緊 */
  #stats-tab-official .official-tag-line {
    gap: 8px;
    margin-bottom: 4px;
  }
  #stats-tab-official .official-tag-line h2 {
    font-size: 1.18rem;
  }
  #stats-tab-official .off-source-pill {
    font-size: 0.74rem;
    padding: 3px 10px;
  }
  #stats-tab-official .official-meta {
    font-size: 0.82rem;
    line-height: 1.65;
  }
  #stats-tab-official .off-pdf-link { font-size: 0.82rem; }

  /* 5. Chart card 內距與字體收緊 */
  #stats-tab-official .chart-card { padding: 14px; }
  #stats-tab-official .chart-card h3 { font-size: 0.95rem; }
  #stats-tab-official .chart-card .chart-sub { font-size: 0.76rem; line-height: 1.45; }
  #stats-tab-official .grid-2 { gap: 14px; }

  /* 6. Section 上下空隙收緊（inline style 有 padding，需 !important 覆寫） */
  #stats-tab-official > section { padding-top: 0 !important; padding-bottom: 14px !important; }
  #stats-tab-official > div > section { padding-top: 0 !important; padding-bottom: 18px !important; }
}

/* 更窄螢幕（< 380px）KPI 仍維持 2 欄但更壓縮 */
@media (max-width: 380px) {
  #stats-tab-official .stat-card .kpi-num { font-size: 1.35rem; }
  #stats-tab-official .stat-card .stat-label { font-size: 0.72rem; }
}

/* ============================================================
   分頁列 (platform.html 分享平台 + violations.html 勞檢紀錄)
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  padding: 12px;
  flex-wrap: wrap;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.pg-btn:hover:not(:disabled) {
  background: rgba(46, 134, 171, 0.06);
  border-color: var(--primary);
  color: var(--primary);
}
.pg-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-info {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pg-current {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
}
.pg-sep { color: var(--muted-light); }
.pg-total { color: var(--ink-soft); font-weight: 600; }
.pg-range {
  margin-left: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  .pagination { gap: 10px; padding: 8px; margin-top: 16px; }
  .pg-btn { padding: 6px 12px; font-size: 0.85rem; }
  .pg-range { display: block; flex-basis: 100%; text-align: center; margin-left: 0; margin-top: 6px; }
}

/* ============================================================
   自建表單頁面 (.dform-*) — participate-dialysis.html etc.
   ============================================================ */
.dform { display: flex; flex-direction: column; gap: 0; }

.dform-callout {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(6, 167, 125, 0.08);
  border: 1px solid rgba(6, 167, 125, 0.25);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  display: flex; align-items: center; gap: 10px;
  line-height: 1.55;
}
.dform-callout [data-icon] { color: var(--success); flex-shrink: 0; }

.dform-section {
  border-top: 2px solid var(--border);
  padding-top: 28px;
  margin-top: 28px;
}
.dform-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.dform-section-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.dform-section-intro {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.6;
  background: var(--surface-soft);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.dform-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}
.dform-field:first-of-type { margin-top: 0; }
.dform-label {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}
.dform-required {
  color: var(--danger);
  margin-left: 3px;
  font-weight: 700;
}
.dform-help {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}
.dform-error-msg {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 2px;
  display: none;
}
.dform-field.has-error .dform-error-msg { display: block; }

/* Text / number / email / textarea */
.dform-input, .dform-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.dform-input:focus, .dform-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.12);
}
.dform-textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.6;
}
.dform-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7C93' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 40px;
  cursor: pointer;
}
.dform-field.has-error .dform-input,
.dform-field.has-error .dform-textarea,
.dform-field.has-error .dform-options {
  border-color: var(--danger);
}
.dform-field.has-error .dform-options { border: none; }
.dform-field.has-error .dform-option {
  border-color: rgba(230, 57, 70, 0.4);
}

/* Radio / Checkbox — 卡片化（手機觸控友善） */
.dform-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.dform-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1.3;
}
.dform-option:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.dform-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.dform-option.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.dform-option.checked:hover { color: #fff; }

/* 機構名稱 autocomplete — 提示條 + 建議下拉 */
.dform-suggest-hint {
  margin: 4px 0 8px;
  padding: 10px 14px;
  background: rgba(46, 134, 171, 0.07);
  border: 1px solid rgba(46, 134, 171, 0.25);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.dform-suggest-hint strong { color: var(--primary); font-weight: 600; }
.dform-suggest-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.dform-suggest-link:hover { color: var(--primary-dark, #1F5F7A); }
.dform-suggest-link svg { vertical-align: -1px; }

/* 機構名稱 input 的 anchor：讓建議下拉用 absolute 飄在底下 */
.dform-input-anchor { position: relative; }

.dform-suggest-host {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.dform-suggest-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
.dform-suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 14px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s ease;
}
.dform-suggest-item:hover {
  background: rgba(46, 134, 171, 0.08);
}
.suggest-name {
  flex: 1;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}
.suggest-name mark {
  background: rgba(244, 162, 97, 0.35);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
.suggest-meta {
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.suggest-short, .picker-short {
  color: var(--ink-soft);
}
.suggest-short mark, .picker-short mark {
  background: rgba(46, 134, 171, 0.20);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 3px;
}

/* 跨等級備援區塊：橘色 divider + 不同色的等級 badge */
.dform-suggest-divider {
  padding: 10px 14px 6px;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--warning, #b96b1f);
  background: rgba(244, 162, 97, 0.08);
  border-top: 1px dashed rgba(244, 162, 97, 0.4);
  font-weight: 600;
  line-height: 1.45;
}
.dform-suggest-item.is-cross .suggest-level {
  display: inline-block;
  padding: 1px 7px;
  margin-right: 2px;
  background: rgba(244, 162, 97, 0.18);
  color: #b96b1f;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
}

/* 手機：inline dropdown 在條件齊備時改為隱藏（換 bottom sheet 處理） */
@media (max-width: 640px) {
  .dform-suggest-host { display: none; }
}

/* ============================================================
   機構名稱 Bottom Sheet Picker（手機版）
   ============================================================ */
.dform-picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.dform-picker-sheet[hidden] { display: none; }
.dform-picker-sheet.open { opacity: 1; }
.dform-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.dform-picker-panel {
  position: relative;
  background: #fff;
  border-radius: 18px 18px 0 0;
  max-height: 92vh;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.18);
}
.dform-picker-sheet.open .dform-picker-panel { transform: translateY(0); }

.dform-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.dform-picker-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.dform-picker-close {
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dform-picker-close:hover { background: var(--border-soft); color: var(--ink); }

.dform-picker-search-wrap {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--surface-soft);
}
.dform-picker-search {
  width: 100%;
  padding: 11px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dform-picker-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.14);
}

.dform-picker-content {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.dform-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dform-picker-item {
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.12s ease;
}
.dform-picker-item:active,
.dform-picker-item:hover {
  background: rgba(46, 134, 171, 0.10);
}
.picker-name {
  font-size: 0.96rem;
  color: var(--ink);
  line-height: 1.55;
  word-break: break-word;
}
.picker-name mark {
  background: rgba(244, 162, 97, 0.35);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}
.picker-meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.picker-level {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(244, 162, 97, 0.18);
  color: #b96b1f;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  margin-right: 2px;
}
.dform-picker-item.is-cross {
  background: rgba(244, 162, 97, 0.04);
}

.dform-picker-divider {
  padding: 10px 18px 6px;
  font-size: 0.78rem;
  color: #b96b1f;
  background: rgba(244, 162, 97, 0.10);
  border-top: 1px dashed rgba(244, 162, 97, 0.4);
  border-bottom: 1px dashed rgba(244, 162, 97, 0.4);
  font-weight: 600;
  line-height: 1.45;
}

.dform-picker-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.dform-picker-empty small {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted-light);
}

.dform-picker-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  flex-shrink: 0;
  background: var(--surface-soft);
}
.dform-picker-freetext {
  width: 100%;
  justify-content: center;
}

/* 開啟時鎖背景捲動（不用 position:fixed 避免捲動位置歸零） */
body.dform-picker-open {
  overflow: hidden;
  touch-action: none;
}

@media (min-width: 641px) {
  /* 桌機完全不使用 sheet（即使被 ensureSheet 建出來也不顯示） */
  .dform-picker-sheet { display: none !important; }
}

/* 「其他」自填文字框（radio/checkbox 選到「其他」時才顯示） */
.dform-other-input {
  margin-top: 10px;
  width: 100%;
  max-width: 420px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
.dform-other-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.16);
}
.dform-other-input::placeholder { color: var(--muted-light); }

/* Submit 區塊 */
.dform-submit-bar {
  margin-top: 32px;
  padding: 24px 0 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.dform-submit-btn { min-width: 160px; }
.dform-submit-btn[disabled] { opacity: 0.6; cursor: not-allowed; }
/* （舊基底 .dform-required-note 已棄用，統一用 .dform-required-note-top） */
.dform-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

/* 送出前警語（橘色 callout） */
.dform-warning-card {
  margin-top: 36px;
  padding: 20px 24px;
  background: rgba(244, 162, 97, 0.10);
  border: 2px solid rgba(244, 162, 97, 0.45);
  border-radius: 12px;
}
.dform-warning-title {
  font-weight: 700;
  font-size: 1rem;
  color: #b96b1f;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}
.dform-warning-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.85;
}
.dform-warning-list li { margin-bottom: 4px; }
.dform-warning-list strong { color: var(--ink); font-weight: 600; }
.dform-warning-danger { color: var(--danger) !important; }

/* 法律同意條款卡（藍色 callout，比 warning 更正式）*/
.dform-consent-card {
  margin-top: 24px;
  padding: 22px 24px;
  background: rgba(46, 134, 171, 0.06);
  border: 2px solid rgba(46, 134, 171, 0.30);
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dform-consent-card.has-error {
  border-color: var(--danger);
  background: rgba(230, 57, 70, 0.06);
}
.dform-consent-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.dform-consent-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.6;
}
.dform-consent-hint a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dform-consent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dform-consent-list li { margin-bottom: 10px; }
.dform-consent-list li:last-child { margin-bottom: 0; }
.dform-consent-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid rgba(46, 134, 171, 0.18);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dform-consent-item:hover {
  border-color: var(--primary);
  background: rgba(46, 134, 171, 0.06);
}
.dform-consent-item:has(input:checked) {
  background: rgba(46, 134, 171, 0.10);
  border-color: rgba(46, 134, 171, 0.45);
}
.dform-consent-item input[type="checkbox"] {
  margin: 4px 0 0;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.dform-consent-item input[type="checkbox"]:checked + .dform-consent-text { color: var(--ink); }
.dform-consent-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.dform-consent-text strong { color: var(--ink); font-weight: 700; }
.dform-consent-card .dform-error-msg {
  display: none;
  margin-top: 10px;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}
.dform-consent-card.has-error .dform-error-msg { display: block; }

/* 「標 * 為必填」放在表單最上方（簡潔小字、右對齊） */
.dform-required-note-top {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
  padding: 0;
  background: transparent;
}
.dform-required-note-top .dform-required {
  font-weight: 700;
  margin: 0 1px;
}

/* 驗證碼欄位 */
.dform-captcha-field { margin-top: 24px; }
.dform-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.dform-captcha-display {
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
  width: 220px;
  height: 56px;
  padding: 0 14px;
  background: linear-gradient(135deg, #F0F7FA 0%, #E8F1F5 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  user-select: none;
  font-family: 'Lora', 'Noto Serif TC', Georgia, serif;
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
/* 干擾條紋（CSS-only 噪點） */
.dform-captcha-display::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(46,134,171,0.15) 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(46,134,171,0.18) 1px, transparent 2px),
    radial-gradient(circle at 45% 80%, rgba(46,134,171,0.12) 1px, transparent 2px),
    radial-gradient(circle at 85% 20%, rgba(46,134,171,0.16) 1px, transparent 2px),
    radial-gradient(circle at 10% 70%, rgba(46,134,171,0.14) 1px, transparent 2px);
  pointer-events: none;
}
.dform-captcha-char {
  position: relative;
  z-index: 1;
  display: inline-block;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.dform-captcha-refresh {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.2s ease;
}
.dform-captcha-refresh:hover {
  background: rgba(46, 134, 171, 0.06);
  border-color: var(--primary);
  color: var(--primary-dark, #1F5F7A);
}
.dform-captcha-refresh:active { transform: rotate(180deg); }

.dform-captcha-input {
  flex: 1;
  min-width: 160px;
  font-family: 'Lora', 'Noto Serif TC', serif;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .dform-captcha-row { gap: 8px; }
  .dform-captcha-display { width: 190px; height: 48px; font-size: 20px; padding: 0 10px; }
  .dform-captcha-input { min-width: 0; flex: 1 1 100%; order: 3; }
}

/* 草稿提示條 */
.dform-draft-banner {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(244, 162, 97, 0.12);
  border: 1px solid rgba(244, 162, 97, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.dform-draft-banner button {
  padding: 5px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.dform-draft-banner button:hover {
  background: var(--border-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* 感謝畫面 — 彈出視窗 */
.dform-thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.dform-thanks-modal.open { opacity: 1; pointer-events: auto; }
.dform-thanks-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.dform-thanks-panel {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 40px 32px 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  text-align: center;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-sizing: border-box;
}
.dform-thanks-modal.open .dform-thanks-panel {
  transform: translateY(0) scale(1);
}
.dform-thanks-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: rgba(6, 167, 125, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
  animation: thanks-pop 0.45s cubic-bezier(0.22, 1.4, 0.36, 1) 0.1s both;
}
@keyframes thanks-pop {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}
.dform-thanks-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--ink);
  margin: 0 0 12px;
}
.dform-thanks-panel p {
  color: var(--muted);
  line-height: 1.75;
  margin: 0 0 14px;
  font-size: 0.95rem;
}
.dform-thanks-countdown {
  font-size: 0.85rem !important;
  color: var(--primary) !important;
  background: rgba(46, 134, 171, 0.08);
  padding: 8px 16px;
  border-radius: 999px;
  display: inline-block;
  margin: 0 auto 22px !important;
  font-weight: 500;
}
.dform-thanks-countdown #thanks-countdown-num {
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  margin-right: 2px;
}
.dform-thanks-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
body.dform-thanks-open { overflow: hidden; }

@media (max-width: 480px) {
  .dform-thanks-panel { padding: 32px 24px 24px; }
  .dform-thanks-panel h2 { font-size: 1.35rem; }
  .dform-thanks-actions { flex-direction: column; }
  .dform-thanks-actions .btn { width: 100%; justify-content: center; }
}

/* 手機 */
@media (max-width: 640px) {
  .dform-section { padding-top: 22px; margin-top: 22px; }
  .dform-section-title { font-size: 1.08rem; }
  .dform-option { padding: 10px 14px; font-size: 0.92rem; }
  .dform-submit-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .dform-submit-btn { width: 100%; min-width: 0; }
}

/* ============================================================
   Soft Give-to-Get：未貢獻者限筆數 CTA + participate 自助勾選
   ============================================================ */
.g2g-cta-block {
  margin-top: 18px;
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(46, 134, 171, 0.08) 0%, rgba(168, 218, 220, 0.20) 100%);
  border: 1px solid rgba(46, 134, 171, 0.22);
  border-radius: 16px;
  text-align: center;
}
.g2g-cta-text {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 14px;
  line-height: 1.65;
}
.g2g-cta-text strong { color: var(--ink); font-weight: 700; }
.g2g-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  padding: 12px 22px;
}
.g2g-cta-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.g2g-self-claim {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 26px;
  background: rgba(168, 218, 220, 0.15);
  border: 1px dashed rgba(46, 134, 171, 0.35);
  border-radius: 14px;
  flex-wrap: wrap;
}
.g2g-self-claim.g2g-claimed {
  background: rgba(46, 134, 171, 0.08);
  border-style: solid;
  border-color: rgba(46, 134, 171, 0.30);
}
.g2g-self-claim-body {
  flex: 1;
  min-width: 220px;
}
.g2g-self-claim-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
}
.g2g-self-claim-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.g2g-self-claim-body a {
  color: var(--primary);
  font-weight: 600;
}
.g2g-claim-btn {
  flex-shrink: 0;
}

/* 等待解鎖中：紅色調 + 大字倒數，讓「按下這個動作」感覺有重量 */
.g2g-self-claim.g2g-confirming {
  display: block;
  background: rgba(230, 57, 70, 0.05);
  border-color: rgba(230, 57, 70, 0.30);
  border-style: solid;
  padding: 26px 28px;
}
.g2g-confirm h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}
.g2g-countdown-big {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--danger);
  text-align: center;
  margin: 0 0 20px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1;
}
.g2g-confirm p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.75;
}
.g2g-confirm p strong { color: var(--ink); }
.g2g-confirm p:last-of-type { margin-bottom: 18px; }
.g2g-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.g2g-go-fill-btn { flex-shrink: 0; }

/* ============================================================
   主辦/協作單位 logo strip — footer / hero / about
   ============================================================ */
.org-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin: 0;
}
.org-strip-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.org-strip-role {
  position: relative;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  white-space: nowrap;
  padding-left: 14px;
}
.org-strip-role::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 1.5px;
  background: var(--primary);
}
.org-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  background: #fff;
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  line-height: 1;
}
.org-chip:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(46, 134, 171, 0.18);
  transform: translateY(-1px);
  color: var(--ink);
}
.org-chip img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Footer 上的 org strip：白色 chip 在深色 footer 反差好看 */
.site-footer .org-strip-role { color: rgba(255, 255, 255, 0.7); }
.site-footer .org-strip-role::before { background: var(--accent, #A8DADC); }
.site-footer .org-strip { margin: 18px 0 14px; justify-content: flex-start; }
.site-footer .org-strip-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin: 18px 0 4px;
}
/* 蓋掉 .site-footer a 的白色文字（specificity 0,2,1 勝過 .site-footer a 0,1,1）*/
.site-footer a.org-chip,
.site-footer a.org-chip:hover { color: var(--ink); }

/* Hero 下方 trust strip：較小尺寸、淡背景 */
.hero-trust-strip {
  margin-top: 28px;
  padding: 14px 18px;
  background: rgba(168, 218, 220, 0.18);
  border: 1px solid rgba(46, 134, 171, 0.15);
  border-radius: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  justify-content: flex-start;
}
.hero-trust-strip .org-strip-role { font-size: 0.78rem; }

/* about.html 主辦單位區塊：大 logo 卡片 */
.org-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}
.org-card {
  background: #fff;
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.org-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(46, 134, 171, 0.12);
  color: var(--ink);
}
.org-card-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 12px;
}
.org-card-role {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 6px;
}
.org-card-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}
.org-card-short {
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 768px) {
  .org-cards { grid-template-columns: 1fr; }
  .org-chip { font-size: 0.82rem; padding: 4px 10px 4px 6px; }
  .org-chip img { width: 24px; height: 24px; }
}

/* G2G 確認 modal — 額外一層情緒勒索的確認對話框 */
body.g2g-modal-open { overflow: hidden; }
.g2g-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.g2g-modal-backdrop.open { opacity: 1; }
.g2g-modal {
  background: #fff;
  border-radius: 18px;
  padding: 36px 38px 30px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.22s ease;
  border-top: 6px solid var(--danger);
  max-height: 90vh;
  overflow-y: auto;
}
.g2g-modal-backdrop.open .g2g-modal { transform: translateY(0) scale(1); }
.g2g-modal-icon {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 8px;
  line-height: 1;
}
.g2g-modal h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--danger);
  text-align: center;
}
.g2g-modal p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.8;
}
.g2g-modal p strong { color: var(--ink); }
.g2g-modal-question {
  margin-top: 18px !important;
  padding: 14px 16px;
  background: rgba(230, 57, 70, 0.06);
  border-left: 3px solid var(--danger);
  border-radius: 6px;
  color: var(--ink) !important;
}
.g2g-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.g2g-modal-actions .btn { flex: 1; justify-content: center; min-width: 0; }

/* 通用 danger 按鈕 (給 confirm modal 用) */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
}
.btn-danger:hover {
  background: #c5303d;
  border-color: #c5303d;
  color: #fff;
}

@media (max-width: 640px) {
  .g2g-self-claim { flex-direction: column; align-items: stretch; gap: 14px; }
  .g2g-claim-btn { width: 100%; justify-content: center; }
  .g2g-cta-block { padding: 22px 18px; }
  .g2g-self-claim.g2g-confirming { padding: 22px 18px; }
  .g2g-countdown-big { font-size: 2.6rem; margin-bottom: 16px; }
  .g2g-confirm-actions { flex-direction: column-reverse; align-items: stretch; }
  .g2g-confirm-actions .btn { width: 100%; justify-content: center; }
  .g2g-modal { padding: 28px 24px 22px; border-radius: 14px; }
  .g2g-modal h2 { font-size: 1.18rem; }
  .g2g-modal p { font-size: 0.92rem; }
  .g2g-modal-actions { flex-direction: column-reverse; }
  .g2g-modal-actions .btn { width: 100%; }
}

/* ============================================================
   三班護病比頁面 (nurse-ratio.html)
   ============================================================ */

/* 醫院層級 badge：綠/藍/橙 三色區分 */
.nurse-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* 層級 badge：紫/藍/灰藍三色，跟合規三色（綠/橙/紅）錯開避免誤讀 */
.nurse-level-badge.nurse-level-mc { background: rgba(124, 58, 237, 0.13); color: #7C3AED; }
.nurse-level-badge.nurse-level-rg { background: rgba(46, 134, 171, 0.13); color: var(--primary); }
.nurse-level-badge.nurse-level-dt { background: rgba(100, 116, 139, 0.13); color: #64748B; }

/* 標準參考卡（頁面上方，摘要 3 級標準）*/
.nurse-std-card {
  background: rgba(168, 218, 220, 0.15);
  border: 1px solid rgba(46, 134, 171, 0.20);
  border-radius: 12px;
  padding: 16px 22px;
}
.nurse-std-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* details 版本：預設收起，summary 可點展開 */
.nurse-std-details > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  margin-bottom: 0;
}
.nurse-std-details > summary::-webkit-details-marker { display: none; }
.nurse-std-details[open] > summary { margin-bottom: 12px; }
.nurse-std-caret {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform .2s ease;
}
.nurse-std-details[open] .nurse-std-caret { transform: rotate(90deg); }

/* 合規總覽儀表板 */
.nurse-overview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}
.nurse-overview-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.nurse-overview-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}
.nurse-overview-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.nurse-overview-kpi {
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
}
.nurse-overview-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}
.nurse-overview-kpi-num {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.nurse-overview-kpi-pct {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.nurse-overview-matrix {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.nurse-overview-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nurse-overview-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.nurse-overview-row-total {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.nurse-overview-bar {
  display: flex;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border-soft);
}
.nurse-overview-seg {
  display: block;
  height: 100%;
  transition: opacity .15s ease;
}
.nurse-overview-seg:hover { opacity: 0.8; }
.nurse-overview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.nurse-overview-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nurse-overview-legend-item strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.nurse-overview-legend-pct {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .nurse-overview { padding: 16px 18px; }
  .nurse-overview-kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .nurse-overview-kpi-num { font-size: 1.5rem; }
}
.nurse-std-table {
  display: grid;
  gap: 0;
}
.nurse-std-row {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  font-size: 0.92rem;
  color: var(--ink);
  border-bottom: 1px solid rgba(46, 134, 171, 0.10);
}
.nurse-std-row:last-child { border-bottom: 0; }
.nurse-std-row.nurse-std-head {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding-bottom: 8px;
}

/* 醫院選擇區 */
.nurse-picker {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}
.nurse-picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.nurse-picker-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.nurse-picker-count {
  font-size: 0.85rem;
  color: var(--muted);
}
.nurse-picker-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.nurse-picker-search {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--ink);
}
.nurse-picker-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 134, 171, 0.10);
}
.nurse-picker-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nurse-level-filter {
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--border-soft);
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nurse-level-filter:hover { border-color: var(--primary); }
.nurse-level-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* 醫院清單（按層級分組） */
.nurse-hospital-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
  margin: 0 -4px;
}
.nurse-level-group {
  margin-bottom: 16px;
}
.nurse-level-group:last-child { margin-bottom: 0; }
.nurse-level-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px 0;
}
.nurse-level-count {
  font-size: 0.78rem;
  color: var(--muted);
}
.nurse-hospital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}
.nurse-hospital-chip {
  padding: 8px 12px;
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nurse-hospital-chip:hover {
  border-color: var(--primary);
  background: rgba(46, 134, 171, 0.04);
}
.nurse-hospital-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
}

/* 醫院詳情標頭 */
.nurse-hosp-header {
  padding: 20px 24px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

/* KPI 3 級狀態顏色（safe/watch/danger） */
.kpi-num .status-safe   { color: #06A77D; }
.kpi-num .status-watch  { color: #F4A261; }
.kpi-num .status-danger { color: var(--danger); }

/* 醫院財務表格 */
.fin-table .status-safe   { color: #06A77D; font-weight: 600; }
.fin-table .status-danger { color: var(--danger); font-weight: 600; }
.fin-table th.fin-sort:hover { color: var(--primary); }
.fin-table .fin-hosp-name { font-weight: 500; }
.fin-table .fin-short { color: var(--muted); font-size: 0.82rem; margin-left: 6px; }
.fin-table .fin-rank { color: var(--muted-light); font-size: 0.76rem; margin-left: 5px; }
@media (max-width: 640px) { .fin-table .fin-lv-col { display: none; } }

/* 合併申報／合併提報標註 */
.fin-merge-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  font-size: 0.68rem; font-weight: 600; line-height: 1.5;
  color: #B45309; background: #FEF3C7; border-radius: 4px; white-space: nowrap;
}
.fin-merge-note {
  margin-bottom: 12px; padding: 8px 12px;
  font-size: 0.82rem; line-height: 1.6; color: var(--ink-soft);
  background: #FEF3C7; border-left: 3px solid #F59E0B; border-radius: 6px;
}

/* 財務規模對照卡 */
.fin-benchmark {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
}
.fin-benchmark-summary {
  cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink-soft); font-size: 0.95rem;
  display: flex; align-items: baseline; gap: 10px;
}
.fin-benchmark-summary::-webkit-details-marker { display: none; }
.fin-benchmark-title { flex: 1; line-height: 1.6; }
.fin-benchmark-caret { flex: 0 0 auto; color: var(--muted); transition: transform .2s; }
.fin-benchmark[open] .fin-benchmark-caret { transform: rotate(90deg); }
.fin-benchmark-baseline td { background: var(--surface-soft); color: var(--muted); font-style: italic; }
.fin-benchmark-note { margin-top: 12px; font-size: 0.82rem; color: var(--muted); line-height: 1.75; }
.fin-benchmark-note p { margin: 4px 0; }
.fin-benchmark-note em { font-style: normal; color: var(--ink-soft); font-weight: 500; }
/* backward compat：舊 CSS class 保留 */
.kpi-num .over-std { color: var(--danger); }

/* 永遠展開的分類邏輯說明（在頁面下方） */
.nurse-compliance-explain-static {
  padding: 14px 18px;
  background: rgba(46, 134, 171, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  line-height: 1.75;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.nurse-compliance-explain-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  font-size: 0.92rem;
}
.nurse-compliance-explain-body p { margin: 0 0 8px; }
.nurse-compliance-explain-body p:last-child { margin-bottom: 0; }
.nurse-compliance-explain-body ul { margin: 6px 0 8px; padding-left: 1.2rem; }
.nurse-compliance-explain-body ul li { margin-bottom: 4px; }
.nurse-compliance-explain-body .status-safe-txt   { color: #06A77D; }
.nurse-compliance-explain-body .status-watch-txt  { color: #b96b1f; }
.nurse-compliance-explain-body .status-danger-txt { color: var(--danger); }

/* 「為什麼這樣分類？」展開式說明（保留但不再使用） */
.nurse-compliance-explain {
  margin-top: 12px;
  font-size: 0.85rem;
  width: 100%;
}
.nurse-compliance-explain summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 600;
  padding: 4px 0;
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nurse-compliance-explain summary::-webkit-details-marker { display: none; }
.nurse-compliance-explain summary::before {
  content: '▸';
  display: inline-block;
  transition: transform .2s ease;
}
.nurse-compliance-explain[open] summary::before { transform: rotate(90deg); }
.nurse-compliance-explain summary:hover { color: var(--primary-dark, #1F5F7A); }
.nurse-compliance-explain > div {
  margin-top: 10px;
  padding: 14px 18px;
  background: rgba(46, 134, 171, 0.05);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.nurse-compliance-explain > div p { margin: 0 0 8px; }
.nurse-compliance-explain > div p:last-child { margin-bottom: 0; }
.nurse-compliance-explain ul { margin: 6px 0 8px; padding-left: 1.2rem; }
.nurse-compliance-explain ul li { margin-bottom: 4px; }
.nurse-compliance-explain .status-safe-txt   { color: #06A77D; }
.nurse-compliance-explain .status-watch-txt  { color: #b96b1f; }
.nurse-compliance-explain .status-danger-txt { color: var(--danger); }

/* 地點篩選：跟合規按鈕同款樣式（不同 data attribute） */
.nurse-city-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--border-soft);
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nurse-city-filter:hover { border-color: var(--primary); }
.nurse-city-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.nurse-city-filter.active span { color: rgba(255,255,255,0.85) !important; }

/* 合規篩選按鈕列（多列時排版） */
.nurse-picker-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.nurse-filter-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.nurse-compliance-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--border-soft);
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nurse-compliance-filter:hover { border-color: var(--primary); }
.nurse-compliance-filter.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.nurse-compliance-filter.active .nurse-filter-count { color: rgba(255,255,255,0.85); }
.nurse-filter-count {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

/* 合規狀態 dot (chip 上的小點) + badge (詳情頁的標籤) */
.nurse-compliance-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.nurse-compliance-dot.nurse-compliance-A { background: #06A77D; }
.nurse-compliance-dot.nurse-compliance-B { background: #F4A261; }
.nurse-compliance-dot.nurse-compliance-C { background: #E63946; }
.nurse-compliance-dot.nurse-compliance-N { background: #6B7C93; }

.nurse-compliance-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  margin-left: 6px;
}
.nurse-compliance-badge.nurse-compliance-A { background: rgba(6,167,125,0.13); color: #06A77D; }
.nurse-compliance-badge.nurse-compliance-B { background: rgba(244,162,97,0.15); color: #b96b1f; }
.nurse-compliance-badge.nurse-compliance-C { background: rgba(230,57,70,0.13); color: var(--danger); }
.nurse-compliance-badge.nurse-compliance-N { background: rgba(107,124,147,0.10); color: var(--muted); }

/* hospital chip：dot + 名稱（代號僅在 hover tooltip 顯示） */
.nurse-hospital-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.nurse-hospital-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

/* 縣市 badge（詳情標頭；跟三個 level 色 [深紫/藍/灰藍] 再區隔，用淺青色） */
.nurse-city-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(168, 218, 220, 0.30);
  color: #14545E;
  margin-right: 6px;
}
.nurse-city-badge.unknown {
  background: rgba(107, 124, 147, 0.10);
  color: var(--muted);
  font-weight: 500;
}

/* 共用機構代號多院區的提示 */
.nurse-shared-hint {
  color: #b96b1f;
  font-size: 0.78rem;
  margin-left: 4px;
}
.nurse-shared-banner {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(244, 162, 97, 0.10);
  border-left: 3px solid #F4A261;
  border-radius: 6px;
  color: #814d17;
  font-size: 0.85rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .nurse-std-row {
    grid-template-columns: 80px 1fr 1fr 1fr;
    gap: 8px;
    font-size: 0.85rem;
  }
  .nurse-std-card { padding: 14px 16px; }
  .nurse-picker { padding: 16px 18px; }
  .nurse-picker-controls { flex-direction: column; align-items: stretch; }
  .nurse-hospital-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .nurse-hospital-list { max-height: 320px; }
}
