  :root {
    --bg: #fafaf7;
    --card: #ffffff;
    --border: #e3e1dc;
    --text: #1d1d1d;
    --muted: #6b6b6b;
    --accent: #2c5aa0;
    --warn-bg: #fff8e1;
    --warn-border: #f0c040;
    --safe: #2e7d32;
    --maybe: #ed6c02;
    --hard: #c62828;
    --na: #9e9e9e;
    --target: #fff4d6;
  }
  * { box-sizing: border-box; }
  .univ-mode-switch { display: flex; gap: 8px; margin: 4px 0 2px; flex-wrap: wrap; }
  .univ-mode-btn {
    flex: 1; min-width: 150px; padding: 9px 12px;
    border: 1px solid var(--border); background: var(--card);
    border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--muted);
    transition: background .15s, color .15s, border-color .15s;
  }
  .univ-mode-btn:hover { border-color: var(--accent); }
  .univ-mode-btn.active {
    background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700;
  }
  body {
    font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
    background: var(--bg); color: var(--text);
    max-width: 960px; margin: 0 auto; padding: 24px;
    line-height: 1.55;
  }
  h1 { margin: 0 0 4px; font-size: 24px; }
  .subtitle { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
  .warning {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    border-left: 4px solid var(--warn-border);
    padding: 12px 16px; border-radius: 4px;
    margin-bottom: 20px; font-size: 14px;
  }
  .critical-warning {
    background: #fff3e0;
    border-left-width: 6px;
    border-left-color: #d84315;
    border-color: #ffab91;
  }
  .critical-warning a { color: #b71c1c; text-decoration: underline; }
  details.warning summary { cursor: pointer; }
  details.warning[open] summary { margin-bottom: 4px; }
  .school-links { display: inline-flex; gap: 8px; margin-left: 8px; }
  .school-links a {
    font-size: 11px; color: var(--accent); text-decoration: none;
    padding: 1px 6px; border: 1px solid var(--border); border-radius: 3px;
    background: white;
  }
  .school-links a:hover { background: var(--accent); color: white; border-color: var(--accent); }
  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
  }
  .card h2 { margin: 0 0 12px; font-size: 18px; }
  .input-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .input-row label { min-width: 110px; font-weight: 600; }
  input[type=number] {
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 15px; width: 120px;
  }
  select {
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px;
    font-size: 14px; background: white;
  }
  button {
    background: var(--accent); color: white; border: none;
    padding: 10px 20px; border-radius: 4px; font-size: 15px;
    cursor: pointer; font-weight: 600;
  }
  button:hover { opacity: 0.9; }
  button.secondary { background: #6b6b6b; font-size: 13px; padding: 6px 12px; }
  details { margin: 12px 0; }
  details summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 4px 0; }
  .subjects {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px; margin: 12px 0;
  }
  .subjects > div { display: flex; flex-direction: column; gap: 4px; }
  .subjects label { font-size: 13px; color: var(--muted); }
  .calc-result {
    background: #f4f0e8; padding: 10px 14px; border-radius: 4px;
    margin: 10px 0; font-size: 14px;
  }
  table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
  th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
  th { background: #f4f4f0; font-weight: 600; color: var(--muted); font-size: 13px; }
  tr.target { background: var(--target); }
  .tier-header {
    margin-top: 24px; padding: 8px 12px;
    background: #ececec; border-radius: 4px;
    font-weight: 600; font-size: 15px;
  }
  .badge {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 600; color: white;
  }
  .badge.safe { background: var(--safe); }
  .badge.maybe { background: var(--maybe); }
  .badge.hard { background: var(--hard); }
  .badge.na { background: var(--na); }
  .diff-pos { color: var(--safe); font-weight: 600; }
  .diff-neg { color: var(--hard); font-weight: 600; }
  .diff-zero { color: var(--muted); }
  .empty-state { color: var(--muted); font-style: italic; padding: 20px; text-align: center; }
  .star { color: #d4a017; }
  tr.school-row { cursor: pointer; }
  tr.school-row:hover { background: #f9f7f0; }
  tr.school-row td:first-child::before {
    content: "▸"; color: var(--muted); margin-right: 6px; display: inline-block;
    transition: transform 0.15s; font-size: 11px;
  }
  tr.school-row.expanded td:first-child::before { transform: rotate(90deg); }
  tr.detail-row { display: none; background: #fafaf7; }
  tr.detail-row.show { display: table-row; }
  tr.detail-row > td { padding: 12px 16px; }
  .uni-detail { font-size: 13px; margin: 0; }
  .uni-detail th, .uni-detail td {
    padding: 5px 8px; border: none;
    border-bottom: 1px solid #ececec; text-align: center;
  }
  .uni-detail th { background: transparent; color: var(--muted); font-size: 12px; }
  .uni-detail td:first-child { text-align: left; font-weight: 600; }
  .uni-detail .no-data { color: var(--muted); font-style: italic; }
  .uni-rate { display: inline-block; padding: 2px 8px; border-radius: 10px;
              font-size: 12px; font-weight: 600; }
  .uni-rate.high { background: #e3f1e3; color: var(--safe); }
  .uni-rate.mid  { background: #fff0e0; color: var(--maybe); }
  .uni-rate.low  { background: #f0f0f0; color: var(--muted); }
  .uni-rate.none { background: transparent; color: var(--muted); font-style: italic; font-weight: normal; }
  .info-icon {
    display: inline-block; width: 14px; height: 14px; line-height: 14px;
    text-align: center; border-radius: 50%; background: var(--muted); color: white;
    font-size: 10px; font-weight: 600; cursor: help; margin-left: 4px;
    vertical-align: middle; font-style: normal;
  }
  .info-icon:hover { background: var(--accent); }
  .tooltip-anchor { position: relative; display: inline-block; }
  .tooltip-anchor .tooltip {
    visibility: hidden; opacity: 0; transition: opacity 0.15s;
    position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%);
    background: #2a2a2a; color: #f5f5f5; padding: 8px 12px; border-radius: 4px;
    font-size: 12px; font-weight: normal; font-style: normal;
    text-align: left; width: 280px; z-index: 100;
    line-height: 1.5; pointer-events: none;
  }
  .tooltip-anchor .tooltip::after {
    content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
    border: 5px solid transparent; border-top-color: #2a2a2a;
  }
  .tooltip-anchor:hover .tooltip,
  .tooltip-anchor:focus-within .tooltip { visibility: visible; opacity: 1; }
  .target-selector { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
  .target-selector summary { font-weight: 600; }
  .target-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 4px 12px; margin: 10px 0; font-size: 14px;
  }
  .target-check { cursor: pointer; user-select: none; padding: 2px 4px; border-radius: 3px; }
  .target-check:hover { background: #f4f0e8; }
  .target-check input { vertical-align: middle; margin-right: 4px; }
  .target-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; }
  .target-count { color: var(--muted); }
  footer { color: var(--muted); font-size: 12px; margin-top: 30px; text-align: center; }
  .region-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: white; border: 1px solid var(--border);
    border-radius: 6px; padding: 12px 16px; margin-bottom: 16px;
  }
  .region-bar label { font-weight: 600; font-size: 14px; }
  .region-bar select { font-size: 15px; min-width: 200px; padding: 6px 10px; }
  .region-bar .region-cities { color: var(--muted); font-size: 12px; }
  .region-bar option.unavailable { color: #aaa; }
  .career-card {
    background: #fcfaf5; border: 1px solid #e8dfc8; border-radius: 6px;
    padding: 14px 18px; font-size: 13px; line-height: 1.55;
  }
  .career-section { margin-top: 8px; }
  .career-section-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #5b4a1f; }
  .career-list { margin: 4px 0 8px; padding-left: 22px; }
  .career-list li { margin: 2px 0; }
  .career-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
  @media (max-width: 700px) { .career-grid { grid-template-columns: 1fr; } }
  .career-salary { background: white; padding: 10px 12px; border-radius: 4px; border: 1px solid #eee; }
  .career-warn {
    background: #fff4d6; border-left: 4px solid #d4a017;
    padding: 8px 12px; border-radius: 4px; margin-top: 12px; font-size: 12.5px;
  }
  .dept-info {
    background: #f0f7ff; border-left: 4px solid #1976d2;
    padding: 10px 14px; border-radius: 4px; margin-bottom: 12px;
    font-size: 13px; line-height: 1.55;
  }
  .dept-info-title { font-weight: 700; color: #0d47a1; margin-bottom: 6px; font-size: 13.5px; }
  .dept-info-row { margin-top: 4px; }
  .dept-info-label {
    display: inline-block; background: #1976d2; color: white;
    border-radius: 3px; padding: 1px 8px;
    font-size: 11px; margin-right: 6px; font-weight: 600;
  }
  .uac-history {
    background: #f4f1e8; border: 1px solid #e3dec7;
    padding: 10px 14px; border-radius: 4px; margin-bottom: 12px;
    font-size: 12.5px;
  }
  .uac-title { font-weight: 700; color: #5b4a1f; margin-bottom: 4px; font-size: 13px; }
  .uac-note {
    font-size: 11px; color: var(--muted); margin-bottom: 8px; line-height: 1.45;
  }
  .uac-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .uac-table th { background: #ece7d3; padding: 4px 8px; text-align: left; color: #5b4a1f; }
  .uac-table td { padding: 4px 8px; border-top: 1px solid #ece7d3; }
  .uac-table tr:hover td { background: #fafaf3; }
  .career-reality {
    background: #ffeae0; border-left: 4px solid #d84315;
    padding: 10px 14px; border-radius: 4px; margin: 8px 0 12px;
    font-size: 13px; line-height: 1.6;
  }
  .career-reality-title {
    font-weight: 700; font-size: 13.5px; color: #b71c1c; margin-bottom: 6px;
  }
  .career-path {
    background: #e3f2fd; border-left: 4px solid #1976d2;
    padding: 10px 14px; border-radius: 4px; margin-bottom: 12px;
    font-size: 13px; line-height: 1.6;
  }
  .career-path-title {
    font-weight: 700; font-size: 13.5px; color: #0d47a1; margin-bottom: 6px;
  }
  .tracks-section {
    margin-top: 14px; padding: 10px 12px;
    background: #f5f3ec; border-radius: 6px; border: 1px solid #e3dec7;
  }
  .tracks-section-title {
    font-weight: 600; font-size: 13px; color: #5b4a1f; margin-bottom: 6px;
  }
  .track-block {
    background: white; border: 1px solid var(--border); border-radius: 4px;
    padding: 8px 12px; margin-top: 6px; font-size: 12.5px; line-height: 1.55;
  }
  .track-block .track-head { font-weight: 600; margin-bottom: 4px; }
  .track-block .track-field { margin-top: 3px; }
  .track-block .track-field strong { color: var(--accent); font-weight: 600; }
  .track-block .track-copy-btn {
    font-size: 11px; padding: 1px 8px; background: white; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 10px;
    cursor: pointer; margin-left: 8px;
  }
  .track-block .track-copy-btn:hover { background: var(--accent); color: white; }
  .track-block .track-copy-btn.copied { background: #2e7d32; border-color: #2e7d32; color: white; }
  /* ---- Copy-prompt button ---- */
  .copy-prompt-btn {
    margin-top: 10px; font-size: 13px;
    background: white; color: var(--accent);
    border: 1px solid var(--accent); border-radius: 4px;
    padding: 6px 12px; cursor: pointer;
  }
  .copy-prompt-btn:hover { background: var(--accent); color: white; }
  .copy-prompt-btn.copied { background: #2e7d32; border-color: #2e7d32; color: white; }
  .copy-prompt-btn:disabled { opacity: 0.6; cursor: wait; }
  .copy-prompt-hint {
    font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5;
  }
  /* ---- Alumni voices ---- */
  .alumni-voices {
    margin-top: 14px; padding: 10px 12px;
    background: #f3e5f5; border-radius: 6px; border-left: 4px solid #9c27b0;
  }
  .alumni-voices-title {
    font-weight: 600; font-size: 13px; color: #6a1b9a; margin-bottom: 6px;
  }
  .alumni-voice-card {
    background: white; padding: 8px 12px; border-radius: 4px;
    margin-top: 6px; font-size: 13px; line-height: 1.55;
    white-space: pre-wrap; word-break: break-word;
  }
  .alumni-cta-btn {
    margin-top: 10px; font-size: 13px;
    background: white; color: #7b1fa2;
    border: 1px solid #7b1fa2; border-radius: 4px;
    padding: 6px 12px; cursor: pointer;
  }
  .alumni-cta-btn:hover { background: #7b1fa2; color: white; }
  .alumni-cta-hint {
    font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5;
  }
  .radio-group { display: flex; gap: 12px; font-size: 13px; }
  .radio-group label { font-weight: normal; display: flex; align-items: center; gap: 4px; }
  .radio-group input[type="radio"] { width: auto; margin: 0; }
  /* ---- Chip filters ---- */
  .filter-card {
    background: white; border: 1px solid var(--border);
    border-radius: 6px; padding: 10px 14px; margin-bottom: 16px;
    font-size: 13px;
  }
  .filter-row { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
  .filter-row + .filter-row { border-top: 1px dashed #eee; }
  .filter-label {
    font-weight: 600; font-size: 13px; min-width: 56px;
    color: #555; padding-top: 4px;
  }
  .chip-group { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
  .chip {
    font-size: 12px; padding: 3px 10px; border-radius: 13px;
    background: white; border: 1px solid var(--border); color: #444;
    cursor: pointer; user-select: none; transition: all 0.1s;
  }
  .chip:hover { background: #f4f0e8; }
  .chip.active { background: var(--accent); color: white; border-color: var(--accent); }
  .chip.all { font-weight: 600; background: #f4f4f0; }
  .chip.all.active { background: #2e7d32; border-color: #2e7d32; color: white; }
  .chip.preset {
    background: white; border-color: #d8a86a; color: #8c6427;
    font-weight: 500;
  }
  .chip.preset:hover { background: #fdf6e8; }
  .chip.preset.active { background: #b88746; border-color: #b88746; color: white; }
  .chip.preset.partial { background: #fdf6e8; border-style: dashed; }
  .chip .region-tag {
    display: inline-block; margin-right: 3px;
    font-size: 10px; color: var(--muted); padding: 0 2px;
  }
  .chip.active .region-tag { color: rgba(255,255,255,0.8); }
  .filter-count { color: var(--muted); font-size: 11px; margin-left: 6px; }

  /* ---- Feedback modal ---- */
  #feedback-fab {
    position: fixed; left: 20px; bottom: 20px; z-index: 200;
    background: #6b6b6b; color: white; border: none;
    padding: 8px 14px; border-radius: 20px; font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); cursor: pointer;
  }
  #feedback-fab:hover { background: var(--accent); }
  #feedback-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300;
    display: none; align-items: center; justify-content: center;
  }
  #feedback-modal.open { display: flex; }
  .feedback-card {
    background: white; border-radius: 8px; width: 480px; max-width: 92vw;
    max-height: 90vh; overflow-y: auto;
    padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  .feedback-card h3 { margin: 0 0 10px; font-size: 16px; }
  .feedback-card .desc { font-size: 12px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
  .feedback-field { margin-bottom: 10px; }
  .feedback-field label {
    display: block; font-size: 12px; font-weight: 600; color: #555; margin-bottom: 3px;
  }
  .feedback-field input, .feedback-field select, .feedback-field textarea {
    width: 100%; padding: 6px 9px; border: 1px solid var(--border);
    border-radius: 4px; font-size: 13px; font-family: inherit;
  }
  .feedback-field textarea { resize: vertical; min-height: 80px; }
  .feedback-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
  .feedback-result {
    padding: 10px 12px; border-radius: 4px; margin-top: 10px; font-size: 13px;
  }
  .feedback-result.ok { background: #e3f1e3; color: var(--safe); }
  .feedback-result.err { background: #ffeaea; color: #b71c1c; }

  /* ---- Version badge + changelog ---- */
  .version-badge {
    display: inline-block;
    font-size: 11px; padding: 2px 8px; border-radius: 10px;
    background: #ececec; color: #555; cursor: pointer; margin-left: 8px;
    border: 1px solid var(--border); user-select: none;
    vertical-align: middle;
  }
  .version-badge:hover { background: var(--accent); color: white; border-color: var(--accent); }
  .version-badge.new { background: #ffe082; color: #5b4a1f; border-color: #f0c040; }
  .version-badge.new:hover { background: #f0c040; }
  #changelog-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 300;
    display: none; align-items: center; justify-content: center;
  }
  #changelog-modal.open { display: flex; }
  .changelog-card {
    background: white; border-radius: 8px; width: 600px; max-width: 92vw;
    max-height: 85vh; overflow-y: auto;
    padding: 22px 26px; box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }
  .changelog-card h3 { margin: 0 0 4px; font-size: 18px; }
  .changelog-card .subtitle { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
  .cl-entry { padding: 12px 0; border-top: 1px solid #eee; }
  .cl-entry:first-of-type { border-top: none; padding-top: 0; }
  .cl-version {
    display: inline-block; font-weight: 700; font-size: 15px; color: var(--accent);
  }
  .cl-version.latest::after {
    content: "目前"; background: #2e7d32; color: white;
    font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: 6px;
    font-weight: 500; vertical-align: middle;
  }
  .cl-date { color: var(--muted); font-size: 12px; margin-left: 10px; }
  .cl-highlights {
    background: #fff8e1; border-left: 3px solid #f0c040;
    padding: 8px 12px; margin: 8px 0; font-size: 13px; border-radius: 3px;
  }
  .cl-changes { font-size: 12.5px; padding-left: 20px; margin: 6px 0; }
  .cl-changes li { margin: 2px 0; }
  .cl-tag {
    display: inline-block; font-size: 10px; padding: 1px 6px;
    border-radius: 3px; margin-right: 6px; font-weight: 600;
    color: white; min-width: 38px; text-align: center;
  }
  .cl-tag.feature { background: #1976d2; }
  .cl-tag.data { background: #2e7d32; }
  .cl-tag.fix { background: #c62828; }
  .cl-tag.refactor { background: #6b6b6b; }
  .changelog-close-btn {
    float: right; background: none; border: none; cursor: pointer;
    font-size: 20px; color: var(--muted); padding: 0 4px;
  }

  /* ============================================
     Phase 1 redesign: multi-page shell
     新增 tokens + nav + hero + sections + footer。
     舊 .card / .filter-card / 既有元件不動，落點分析頁仍套用舊樣式。
     ============================================ */
  @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@500;700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

  :root {
    --cream: #faf8f3;
    --cream-2: #f4ede0;
    --paper: #ffffff;
    --ink: #1a1a1a;
    --ink-soft: #4a4a4a;
    --rule: #d8d2c4;
    --gold: #b88746;
    --gold-soft: #d8a86a;
    --gold-deep: #8c6427;
    --serif: "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif;
  }

  body {
    background: var(--cream);
    max-width: none;
    padding: 0;
    margin: 0;
  }

  .view-container {
    max-width: 960px; margin: 0 auto;
    padding: 28px 24px;
  }
  .view-container.wide { max-width: 1120px; }
  .view { display: none; }
  .view.is-active { display: block; }

  /* ---- Top nav ---- */
  .site-nav {
    background: rgba(255,255,255,0.92);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(6px);
  }
  .nav-inner {
    max-width: 1120px; margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 58px; gap: 20px;
  }
  .nav-logo {
    font-family: var(--serif);
    font-size: 18px; font-weight: 700;
    color: var(--ink); text-decoration: none;
    letter-spacing: 0.04em;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .nav-logo-mark {
    display: inline-block;
    width: 28px; height: 28px; line-height: 28px;
    background: var(--gold); color: white;
    border-radius: 4px; text-align: center;
    font-size: 15px;
    font-family: var(--serif);
  }
  .nav-links { display: flex; gap: 2px; flex-wrap: wrap; }
  .nav-links a {
    display: inline-block; padding: 8px 12px;
    font-size: 14px; color: var(--ink-soft); text-decoration: none;
    border-radius: 4px; position: relative;
  }
  .nav-links a:hover { background: var(--cream-2); color: var(--ink); }
  .nav-links a.active { color: var(--gold-deep); font-weight: 600; }
  .nav-links a.active::after {
    content: ""; position: absolute;
    left: 12px; right: 12px; bottom: 2px;
    height: 2px; background: var(--gold); border-radius: 1px;
  }
  @media (max-width: 720px) {
    .nav-inner { height: auto; padding: 10px 14px; flex-wrap: wrap; }
    .nav-links { width: 100%; justify-content: flex-start; }
    .nav-links a { padding: 6px 10px; font-size: 13px; }
  }

  /* ---- Hero ---- */
  .hero {
    text-align: center;
    padding: 56px 18px 40px;
    background:
      radial-gradient(ellipse at top, rgba(184,135,70,0.08) 0%, transparent 60%),
      linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
    border-radius: 8px;
    border: 1px solid var(--rule);
    margin-bottom: 38px;
  }
  .hero-eyebrow {
    font-size: 12px; letter-spacing: 0.32em; color: var(--gold);
    text-transform: uppercase; margin-bottom: 14px; font-weight: 600;
  }
  .hero-title {
    font-family: var(--serif);
    font-size: 38px; font-weight: 700;
    margin: 0 0 16px; line-height: 1.35; color: var(--ink);
    letter-spacing: 0.03em;
  }
  .hero-sub {
    font-size: 16px; color: var(--ink-soft);
    max-width: 620px; margin: 0 auto 28px; line-height: 1.85;
  }
  .hero-actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
  .hero-cta {
    display: inline-block; padding: 12px 28px;
    background: var(--gold); color: white;
    border-radius: 4px; text-decoration: none;
    font-weight: 600; font-size: 15px;
    border: none; cursor: pointer;
    font-family: inherit;
  }
  .hero-cta:hover { background: var(--gold-deep); color: white; }
  .hero-cta.outline {
    background: white; color: var(--gold-deep);
    border: 1px solid var(--gold);
  }
  .hero-cta.outline:hover { background: var(--cream-2); }
  @media (max-width: 640px) {
    .hero { padding: 40px 14px 28px; }
    .hero-title { font-size: 26px; }
    .hero-sub { font-size: 14.5px; }
  }

  /* ---- Section heading ---- */
  .section { margin: 48px 0; }
  .section-title {
    font-family: var(--serif);
    font-size: 22px; font-weight: 700;
    margin: 0 0 6px; color: var(--ink);
    padding-left: 14px;
    border-left: 4px solid var(--gold);
    line-height: 1.4;
  }
  .section-sub {
    font-size: 13px; color: var(--ink-soft);
    margin: 0 0 20px; padding-left: 18px; line-height: 1.6;
  }

  /* ---- Quick analyze on home ---- */
  .quick-analyze {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; padding: 22px 26px; margin: 0 auto;
    max-width: 640px;
  }
  .quick-analyze h3 {
    font-family: var(--serif); font-size: 18px;
    margin: 0 0 14px; color: var(--ink);
  }
  .qa-row {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 12px; flex-wrap: wrap;
  }
  .qa-row label { font-size: 13px; font-weight: 600; min-width: 80px; color: var(--ink-soft); }
  .qa-row select, .qa-row input {
    font-size: 14px; padding: 7px 10px;
    border: 1px solid var(--rule); border-radius: 4px;
    background: white; font-family: inherit;
  }
  .qa-row input { width: 120px; }
  .qa-row .qa-suffix { font-size: 12px; color: var(--ink-soft); }
  .qa-go-btn {
    background: var(--gold); color: white;
    padding: 10px 24px; border: none; border-radius: 4px;
    font-size: 14px; font-weight: 600;
    cursor: pointer; margin-top: 8px; font-family: inherit;
  }
  .qa-go-btn:hover { background: var(--gold-deep); }
  .qa-hint {
    font-size: 12px; color: var(--ink-soft); margin-top: 10px;
    line-height: 1.7;
  }

  /* ---- News (公告) list ---- */
  .news-list {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; overflow: hidden;
  }
  .news-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--rule);
    display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
  }
  .news-item:last-child { border-bottom: none; }
  .news-version {
    font-family: var(--serif); font-weight: 700;
    color: var(--gold-deep); font-size: 14px; min-width: 56px;
  }
  .news-date { color: var(--ink-soft); font-size: 12px; min-width: 96px; }
  .news-summary { flex: 1; min-width: 220px; font-size: 14px; color: var(--ink); line-height: 1.65; }
  .news-empty { padding: 18px; color: var(--ink-soft); font-style: italic; font-size: 13px; }
  .news-more { text-align: right; margin-top: 10px; font-size: 13px; }
  .news-more a { color: var(--gold-deep); text-decoration: none; }
  .news-more a:hover { text-decoration: underline; }

  /* ---- Feature cards (三大特色) ---- */
  .feature-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  }
  @media (max-width: 800px) { .feature-grid { grid-template-columns: 1fr; } }
  .feature-card {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; padding: 24px 22px;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  }
  .feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    border-color: var(--gold-soft);
  }
  .feature-icon { font-size: 24px; margin-bottom: 10px; }
  .feature-title {
    font-family: var(--serif); font-size: 16px; font-weight: 700;
    color: var(--ink); margin: 0 0 8px;
  }
  .feature-body {
    font-size: 13.5px; color: var(--ink-soft);
    line-height: 1.8;
  }

  /* ---- Article preview cards (placeholder for Phase 2) ---- */
  .article-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  }
  @media (max-width: 800px) { .article-grid { grid-template-columns: 1fr; } }
  .article-card {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; padding: 20px 20px 18px;
    text-decoration: none; color: var(--ink); display: block;
    transition: transform 0.15s, border-color 0.15s;
  }
  .article-card:hover { transform: translateY(-2px); border-color: var(--gold); }
  .article-eyebrow {
    font-size: 11px; color: var(--gold-deep); letter-spacing: 0.22em;
    text-transform: uppercase; margin-bottom: 8px; font-weight: 600;
  }
  .article-title {
    font-family: var(--serif); font-size: 15.5px; font-weight: 700;
    margin: 0 0 8px; line-height: 1.55;
  }
  .article-excerpt {
    font-size: 13px; color: var(--ink-soft);
    line-height: 1.75;
  }
  .article-stub {
    background: var(--cream-2); border: 1px dashed var(--rule);
    padding: 22px; border-radius: 6px; text-align: center;
    color: var(--ink-soft); font-size: 13.5px; line-height: 1.75;
  }

  /* ---- AdSense slot placeholders ---- */
  /* 橫向（首頁中段 / 文末 / 大型內容區）：乾淨白底 + 細邊 + 「贊助」小標。
     AdSense 啟用後 .ad-slot 內塞 <ins class="adsbygoogle">，placeholder 自動隱藏。 */
  .ad-slot {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    min-height: 100px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--ink-soft);
    margin: 30px 0;
    position: relative;
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  }
  .ad-slot::before {
    content: "贊助";
    position: absolute; top: 8px; left: 12px;
    font-size: 10px; letter-spacing: 0.28em; opacity: 0.45;
  }
  .ad-slot::after {
    content: "Advertisement";
    font-size: 11px; letter-spacing: 0.14em; opacity: 0.35;
  }
  .ad-slot[data-loaded="true"]::before,
  .ad-slot[data-loaded="true"]::after { content: ""; }

  /* 直立（左右兩側 rail）：fixed 在 viewport，只在 >=1480px 桌面寬螢顯示。
     1120 內容 + 兩側各 160 廣告 + 各 20 buffer = 1480。低於這個寬度直接 display:none。 */
  .side-ad {
    position: fixed; top: calc(50% + 29px);   /* 在 58px 導覽列下方置中 → 上下 margin 等高 */
    transform: translateY(-50%);
    width: 160px; height: 600px;
    display: none;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  .side-ad.left { left: 24px; }
  .side-ad.right { right: 24px; }
  .side-ad-label {
    font-size: 10px; letter-spacing: 0.28em; color: var(--ink-soft);
    text-align: center; padding: 8px 0;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    text-transform: uppercase; opacity: 0.6;
  }
  .side-ad-body {
    flex: 1; display: flex; align-items: center; justify-content: center;
    text-align: center; color: var(--ink-soft);
    font-size: 12px; line-height: 1.7;
  }
  .side-ad-body .ad-dim {
    display: block; margin-top: 4px;
    font-size: 10px; opacity: 0.55; letter-spacing: 0.08em;
  }
  .side-ad[data-loaded="true"] .side-ad-body { display: none; }

  @media (min-width: 1480px) {
    .side-ad { display: flex; }
  }

  /* AdSense 完全關閉時：body.ads-hidden 把所有廣告位整個移除版面 */
  body.ads-hidden .ad-slot,
  body.ads-hidden .side-ad { display: none !important; }

  /* 送審中（有 client_id、未設 slot_ids）：只藏內文橫向版位；左右 rail 改放草葉裝飾 */
  body.ads-pending .ad-slot { display: none !important; }

  /* side rail 沒有廣告時的植物裝飾（送審期 + 過審後未填滿都用這個）。
     保留卡片邊框 + 米色底；植物素材靠牆 + 底部錨定，從邊緣長出。 */
  .side-ad.is-fallback {
    background: var(--cream);
    border-color: var(--rule);
    padding: 0;
  }
  .side-ad.is-fallback .side-ad-label,
  .side-ad.is-fallback .side-ad-body { display: none; }
  .side-ad.is-fallback .decor {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0.33;
  }
  /* 頂部用容器整株垂直翻轉，成為底部的精確鏡像 → 上下 margin 完全對稱 */
  .side-ad.is-fallback .decor-top-wrap {
    position: absolute; inset: 0;
    transform: scaleY(-1);
    transform-origin: center;
  }
  /* 兩株共用「靠牆 + 底角錨定」；rotate 角度、scale 大小可在此微調 */
  .side-ad.left.is-fallback .decor {
    object-position: left bottom; transform-origin: left bottom;
    transform: rotate(4deg) scale(0.85);
  }
  .side-ad.right.is-fallback .decor {
    object-position: right bottom; transform-origin: right bottom;
    transform: rotate(-4deg) scale(0.85);
  }

  /* ---- Stub page (FAQ / About / Privacy / Articles 還沒做完) ---- */
  .stub-card {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; padding: 44px 32px; text-align: center;
  }
  .stub-card h2 {
    font-family: var(--serif); margin: 0 0 14px; font-size: 22px;
  }
  .stub-card p {
    font-size: 14px; color: var(--ink-soft); line-height: 1.85;
    max-width: 520px; margin: 0 auto;
  }
  .stub-card .stub-tag {
    display: inline-block; background: var(--cream-2);
    color: var(--gold-deep); padding: 4px 12px; border-radius: 12px;
    font-size: 11px; letter-spacing: 0.16em; margin-bottom: 16px;
  }

  /* ---- Footer ---- */
  .site-footer {
    background: #1f1d18; color: #d3cbb6;
    padding: 44px 0 28px; margin-top: 60px;
  }
  .footer-inner {
    max-width: 1120px; margin: 0 auto;
    padding: 0 24px;
  }
  .footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
    margin-bottom: 32px;
  }
  @media (max-width: 800px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
  }
  .footer-col h4 {
    font-family: var(--serif); color: #f4ede0;
    font-size: 14px; margin: 0 0 14px; font-weight: 700;
    letter-spacing: 0.08em;
  }
  .footer-col a {
    display: block; padding: 4px 0; color: #ada386;
    font-size: 13px; text-decoration: none;
  }
  .footer-col a:hover { color: var(--gold-soft); }
  .footer-blurb {
    font-size: 13px; line-height: 1.85; color: #a39a7e;
  }
  .footer-blurb .footer-brand {
    font-family: var(--serif); font-size: 15px;
    color: #f4ede0; display: block; margin-bottom: 10px;
  }
  .footer-bottom {
    border-top: 1px solid #3a3528; padding-top: 18px;
    font-size: 12px; color: #8a8169;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  }

  /* ---- Analyze-view header tweaks (留 serif 感) ---- */
  #view-analyze h1#page-title {
    font-family: var(--serif);
    font-size: 26px; letter-spacing: 0.02em;
    margin-top: 6px;
  }

  /* ---- Prose pages: FAQ / About / Privacy ---- */
  .prose-page h1 {
    font-family: var(--serif); font-size: 32px;
    margin: 0 0 6px; color: var(--ink); letter-spacing: 0.02em;
  }
  .prose-page .page-sub {
    color: var(--ink-soft); font-size: 14px; margin-bottom: 36px;
    line-height: 1.7;
  }
  .prose-section {
    margin-bottom: 40px;
  }
  .prose-section h2 {
    font-family: var(--serif); font-size: 22px;
    margin: 0 0 14px; padding-left: 12px;
    border-left: 4px solid var(--gold); line-height: 1.4;
  }
  .prose-section h3 {
    font-family: var(--serif); font-size: 17px;
    margin: 24px 0 8px; color: var(--ink);
  }
  .prose-section p {
    font-size: 14.5px; line-height: 1.95; color: var(--ink);
    margin: 0 0 12px;
  }
  .prose-section ul, .prose-section ol {
    font-size: 14.5px; line-height: 1.95; color: var(--ink);
    padding-left: 22px; margin: 0 0 12px;
  }
  .prose-section ul li, .prose-section ol li { margin: 4px 0; }
  .prose-section strong { color: var(--ink); font-weight: 700; }
  .prose-section a { color: var(--gold-deep); text-decoration: underline; text-decoration-color: var(--rule); }
  .prose-section a:hover { text-decoration-color: var(--gold); }
  .prose-section code {
    background: var(--cream-2); padding: 1px 6px;
    border-radius: 3px; font-size: 13px;
    font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  }

  /* FAQ details/summary */
  .faq-item {
    background: var(--paper); border: 1px solid var(--rule);
    border-radius: 6px; margin-bottom: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .faq-item[open] {
    border-color: var(--gold-soft);
    box-shadow: 0 2px 8px rgba(184,135,70,0.06);
  }
  .faq-item summary {
    list-style: none; cursor: pointer;
    padding: 14px 48px 14px 18px; position: relative;
    font-weight: 600; font-size: 14.5px; color: var(--ink);
    line-height: 1.55;
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary::after {
    content: "+"; position: absolute;
    right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 22px; color: var(--gold-deep); font-weight: 400;
    transition: transform 0.2s;
  }
  .faq-item[open] summary::after { content: "−"; }
  .faq-item .faq-body {
    padding: 0 18px 16px;
    color: var(--ink-soft); font-size: 14px; line-height: 1.95;
  }
  .faq-item .faq-body p { margin: 0 0 10px; }
  .faq-item .faq-body p:last-child { margin: 0; }
  .faq-item .faq-body ul, .faq-item .faq-body ol {
    padding-left: 22px; margin: 6px 0 10px;
  }

  /* Callout box (used in About / Privacy) */
  .callout {
    background: var(--cream); border-left: 4px solid var(--gold);
    padding: 14px 18px; margin: 18px 0; border-radius: 0 4px 4px 0;
    font-size: 14px; line-height: 1.85; color: var(--ink);
  }
  .callout.warn {
    background: #fdf4e3; border-left-color: #d2691e;
  }
  .callout strong { color: var(--gold-deep); }
  .callout.warn strong { color: #b35400; }

  /* Privacy data table */
  .privacy-table {
    width: 100%; border-collapse: collapse; margin: 12px 0 18px;
    font-size: 13.5px;
  }
  .privacy-table th, .privacy-table td {
    text-align: left; padding: 10px 12px;
    border-bottom: 1px solid var(--rule); vertical-align: top;
  }
  .privacy-table th {
    background: var(--cream-2); font-weight: 700;
    color: var(--ink); font-size: 13px;
    letter-spacing: 0.05em;
  }
  .privacy-table td:first-child { width: 28%; font-weight: 600; color: var(--ink); }
  .privacy-table .yes { color: #2e7d32; font-weight: 700; }
  .privacy-table .no { color: #c62828; font-weight: 700; }
  .privacy-table .maybe { color: #ed6c02; font-weight: 700; }

  /* Privacy / About last updated stamp */
  .doc-stamp {
    text-align: right; color: var(--ink-soft);
    font-size: 12px; margin-top: 32px; padding-top: 14px;
    border-top: 1px solid var(--rule);
  }

  /* ---- Route breadcrumb (SPA 各頁頂部「首頁 › X」，與靜態頁的 .crumb 一致) ---- */
  .route-crumb {
    max-width: 960px; margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 13px; color: var(--ink-soft);
  }
  .route-crumb a { color: var(--gold-deep); text-decoration: none; }
  .route-crumb a:hover { text-decoration: underline; }
  .route-crumb[hidden] { display: none; }

  /* ---- 回到頂端按鈕（右下角，捲動後才出現；SPA 與靜態頁共用） ---- */
  .back-to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 200;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--gold); color: #fff; border: none;
    font-size: 20px; line-height: 42px; text-align: center;
    cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.15s;
    padding: 0;
  }
  .back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
  .back-to-top:hover { background: var(--gold-deep); }

  /* ---- 靜態頁的回饋 FAB（深連結回 SPA 的 /?feedback=1，樣式對齊 #feedback-fab） ---- */
  .feedback-fab {
    position: fixed; left: 20px; bottom: 20px; z-index: 200;
    background: #6b6b6b; color: #fff; text-decoration: none;
    padding: 8px 14px; border-radius: 20px; font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
  .feedback-fab:hover { background: var(--gold); color: #fff; }
