/* ===========================================================
   哇哇3C日誌  ─  Enhancements (Newsprint v6)
   只放補充樣式：印章、AdSense 包裝、特殊區塊
   主樣式請看 site-new.css
   =========================================================== */

/* ── 「精選」印章補強（site-new.css 已有 ::before） ───────── */
.card.is-featured .post-title a,
.card.is-featured .post-title .link-dark {
  background-image: linear-gradient(transparent 70%, rgba(47, 93, 58, .22) 70%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 2px;
}

/* hero 卡片若為精選，更換印章為「薦」 */
.post-hero.is-featured::after,
.post-hero-wrap:has(.is-featured)::after {
  content: '薦';
  position: absolute;
  top: 12px; right: 10px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--font-han);
  font-weight: 900;
  font-size: 1.2rem;
  transform: rotate(8deg);
  border: 1px solid var(--seal-deep);
  box-shadow: 0 2px 0 var(--seal-deep);
  pointer-events: none;
  z-index: 4;
}

/* ── AdSense 容器包裝：給「廣告」標籤 ─────────────────────── */
.adsense-wrap,
.blog.single .icontent ins.adsbygoogle,
.blog-content > ins.adsbygoogle,
[data-list-grid] ins.adsbygoogle {
  position: relative;
}
.adsense-wrap::before,
[data-list-grid] > div > ins.adsbygoogle::before {
  content: 'AD  廣告';
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Reading time 樣式 ────────────────────────────────────── */
#reading-time-wrap::before {
  content: '✦';
  display: inline-block;
  margin-right: 6px;
  color: var(--seal);
  transform: translateY(-1px);
}

/* ── Code block 行號（若有 hljs class） ───────────────────── */
.hljs { background: transparent !important; color: inherit !important; }

/* ── 文字選取與焦點：印刷感 ─────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

/* ── 表格 zebra（內文）── */
.article tbody tr:nth-child(odd),
#article-body tbody tr:nth-child(odd) {
  background: rgba(20, 17, 10, .03);
}

/* ── 文末「印製於」尾註，可在 entry.php 內加上 ── */
.entry-colophon {
  margin: 36px 0 0;
  padding: 18px 0;
  border-top: 1px dashed var(--rule-soft);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.entry-colophon::before {
  content: '⟂';
  margin-right: 10px;
  color: var(--seal);
}

/* ── Hero 「圖｜文」反向版型，用於奇數期數可手動加上 ─── */
.post-hero.is-reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}
.post-hero.is-reverse .post-hero-img { order: 2; }
.post-hero.is-reverse .post-hero-body { order: 1; }
@media (max-width: 880px){
  .post-hero.is-reverse { grid-template-columns: 1fr; }
}

/* ── 報紙風裝飾：每個 .container 上層淡淡水印 ── */
@media (min-width: 1280px) {
  .wrapper.bg-light::before {
    content: '哇';
    position: absolute;
    left: 12px; top: 110px;
    font-family: var(--font-han);
    font-weight: 900;
    font-size: 22vw;
    color: rgba(20, 17, 10, .025);
    pointer-events: none;
    line-height: 1;
    z-index: 0;
    user-select: none;
  }
  .wrapper.bg-light { position: relative; overflow: hidden; }
  .wrapper.bg-light > .container { position: relative; z-index: 1; }
}

/* ── 搜尋頁結果卡片小修飾 ── */
.search-results-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.search-results-item:last-child { border-bottom: 0; }

/* ── 漢字 dropcap 微調：避免半形數字也被放大 ── */
.article > p:first-of-type:not(:has(*))::first-letter,
#article-body > p:first-of-type:not(:has(*))::first-letter {
  /* 規則已在 site-new.css，這裡只做 fallback */
}

/* ── Mobile：縮小 dropcap，避免擠版 ── */
@media (max-width: 560px){
  .article > p:first-of-type::first-letter,
  #article-body > p:first-of-type::first-letter {
    font-size: 3.4em;
  }
}

/* ── 印刷分割線：可在任意處加 hr.rule-double ── */
hr.rule-double { border: 0; height: 6px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 32px 0; }

/* ── Utility 補充 ─────────────────────────────────────────── */
.flex-column { flex-direction: column; }
.w-100 { width: 100%; }
.text-start { text-align: left; }
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.rounded { border-radius: 0; }
.pill { display: inline-block; padding: 2px 8px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; border: 1px solid var(--rule); }

.bg-soft-leaf { background: var(--paper-3); }
.text-leaf { color: var(--moss); }
.text-fuchsia { color: var(--seal) !important; }
.ttext-blue { color: var(--moss) !important; }

/* uil 圖示（沒有載入字體圖示庫時隱藏） */
[class*="uil-"] {
  display: inline-block;
  width: 0; height: 0; overflow: hidden;
}

/* ── 分類索引頁 ───────────────────────────────────────────── */
.category-index-section {
  margin: 0 0 36px;
}
.category-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
}
.category-index-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-han);
  font-weight: 700;
  font-size: 1.02rem;
  background: var(--paper);
  transition: background .15s;
}
.category-index-item:hover {
  background: var(--ink);
  color: var(--paper);
}
.category-index-item:hover .category-index-dot { color: var(--paper); }
.category-index-dot {
  color: var(--seal);
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
}

/* ── 標籤索引頁 ───────────────────────────────────────────── */
.tag-index-header,
.tag-page-header {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  margin-bottom: 28px;
}
.tag-index-title,
.tag-page-title {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}
.tag-section-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--seal);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
.tag-keyword-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 18px;
}
.tag-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .1em;
  color: var(--ink);
  background: var(--paper-3);
  border: 1px solid var(--rule);
  padding: 4px 10px;
  text-decoration: none;
}
.tag-badge:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-related-tags { margin-top: 28px; }

/* ================================================================
   下載頁全面重設計
   download_index.php（清單）＋ download_gate.php（單一軟體）
   ================================================================ */

/* ── 基礎 ─────────────────────────────────────────────────── */
.dl-list-page,
.dl-page { font-family: var(--font-han); }

/* ── 下載清單頁：索引卡片列表 ────────────────────────────── */
/* 下載列表：沿用印刷目錄式清單（.dl-mirror-item），此處只留容器 */
.dl-file-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
}
.dl-file-row { padding: 0; position: static; }
.dl-file-row .dl-mirror-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* ── 下載頁標題 ─────────────────────────────────────────── */
.dl-header {
  padding: 0 0 24px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 28px;
}
.dl-eyebrow {
  display: inline-block;
  font-family: var(--font-han);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--seal);
  background: var(--seal-soft);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.dl-title {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.32;
  margin: 0 0 14px;
  color: var(--ink);
}
.dl-source-article {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-han);
  font-size: .88rem;
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px dashed var(--rule-mid);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.dl-source-article:hover { color: var(--seal); border-color: var(--seal); }
.dl-source-article i { display: none; }
.dl-source-article::before {
  content: '↗';
  font-size: 1em;
}

/* ── VirusTotal 安全檢測 ─────────────────────────────────── */
.dl-safety-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: #FAFAF8;
  border: 1px solid var(--rule-soft);
  border-left: 4px solid var(--seal);
  border-radius: 0 6px 6px 0;
  margin: 0 0 28px;
}
.dl-safety-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dl-safety-mark { color: var(--seal); flex-shrink: 0; }
.dl-safety-mark svg { display: block; }
.dl-safety-text { display: flex; flex-direction: column; gap: 2px; }
.dl-safety-eyebrow {
  font-family: var(--font-han);
  font-size: 12px;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  color: var(--seal);
  font-weight: 700;
}
.dl-safety-vendor {
  font-family: var(--font-han);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}
.dl-safety-result {
  font-family: var(--font-han);
  font-weight: 700;
  font-size: .92rem;
  text-align: right;
  flex-shrink: 0;
  color: var(--ink);
}
.dl-safety-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-han);
  font-size: .88rem;
  color: var(--ink-3);
}
.dl-safety-spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--rule-soft);
  border-top-color: var(--seal);
  border-radius: 50%;
  animation: dl-spin .9s linear infinite;
}
@keyframes dl-spin { to { transform: rotate(360deg); } }

/* 檢測結果（VirusCheck.php 注入的 #vcheck） */
.vt-result {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-han);
  text-align: right;
}
.vt-result-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.6;
}
.vt-result--ok   .vt-result-line { background: var(--seal-soft); border-color: var(--seal-line); color: var(--seal-deep); }
.vt-result--warn .vt-result-line { background: #F7EDD3; border-color: #D8C08A; color: #7A5A1E; }
.vt-result--bad  .vt-result-line { background: #F6E2DE; border-color: #D89A8E; color: #8C2F24; }
.vt-result--info .vt-result-line { background: #E7ECF2; border-color: #AFC0D0; color: #33506B; }
.vt-result-link {
  font-size: .8rem;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.vt-result-link:hover { color: inherit; opacity: .75; }
.vt-result-note {
  font-size: .78rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 380px;
}

/* ── 來源文章 + CTA ─────────────────────────────────────── */
.dl-article {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  grid-template-areas: "img body" "cta body";
  grid-template-rows: auto 1fr;
  gap: 16px 24px;
  align-items: start;
  margin: 0 0 28px;
}
@media (max-width: 640px) {
  .dl-article {
    grid-template-columns: 1fr;
    grid-template-areas: "img" "body" "cta";
    grid-template-rows: none;
  }
}
.dl-article-body { grid-area: body; }
.dl-article > .dl-cta {
  grid-area: cta;
  flex-direction: column;
  align-items: stretch;
}
.dl-article > .dl-cta .dl-verify-details { width: 100%; }
.dl-article > .dl-cta .dl-btn--primary { width: 100%; }

/* 多空間按鈕：橫排一列、均分寬度 */
.dl-article > .dl-cta:has(> .dl-btn--primary + .dl-btn--primary) {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}
.dl-article > .dl-cta:has(> .dl-btn--primary + .dl-btn--primary) .dl-btn--primary {
  width: auto;
  flex: 1 1 150px;
}

/* 驗證面板展開或多空間按鈕時，CTA 橫跨整個區塊，避免左欄被拉長失衡 */
@media (min-width: 641px) {
  .dl-article:has(.dl-verify-details[open]),
  .dl-article:has(.dl-cta > .dl-btn--primary + .dl-btn--primary) {
    grid-template-areas: "img body" "cta cta";
  }
  .dl-article:has(.dl-verify-details[open]) .dl-verify-panel {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(220px, auto);
    align-items: center;
    align-content: center;
    gap: 12px 32px;
  }
  .dl-article:has(.dl-verify-details[open]) .dl-steps-mini {
    grid-row: 1 / 3;
    margin: 0;
  }
  .dl-article:has(.dl-verify-details[open]) .dl-step-mini {
    white-space: nowrap;
  }
  .dl-article:has(.dl-verify-details[open]) .dl-verify-panel > .dl-btn {
    grid-column: 2;
    width: 100%;
  }
}

.dl-article-img {
  grid-area: img;
  aspect-ratio: 19 / 10;
  border: 1px solid var(--rule-soft);
  background: var(--paper-2);
  overflow: hidden;
  border-radius: 2px;
  margin: 0;
}
.dl-article-img a { display: block; height: 100%; }
.dl-article-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dl-article-img:hover img { transform: scale(1.04); }

.dl-article-body { font-family: var(--font-han); }
.dl-article-title {
  font-weight: 900;
  font-size: 1.2rem;
  line-height: 1.45;
  margin: 0 0 10px;
}
.dl-article-title a { color: var(--ink); text-decoration: none; }
.dl-article-title a:hover { color: var(--seal); }
.dl-article-excerpt {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0 0 18px;
}

/* ── 下載按鈕 ────────────────────────────────────────────── */
.dl-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-han);
  font-weight: 700;
  font-size: .98rem;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: all .22s ease;
  cursor: pointer;
  white-space: nowrap;
}
.dl-btn i { display: none; }
/* 蓋章式下載鈕：紙上鉛字版，hover 往右下壓下去、填滿印泥綠 */
.dl-btn--primary {
  background: #FFFFFF;
  border-color: var(--seal);
  color: var(--seal-deep);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--seal-line);
}
.dl-btn--primary::before { content: '⤓ '; font-size: 1.1em; }
.dl-btn--primary:hover,
.dl-btn--primary:active {
  background: var(--seal);
  border-color: var(--seal);
  color: #FFFFFF;
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--seal-line);
}
.dl-btn--primary:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .dl-btn--primary:hover, .dl-btn--primary:active { transform: none; }
}
.dl-btn--secondary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.dl-btn--secondary:hover {
  background: var(--soot-2);
  border-color: var(--soot-2);
  color: var(--paper);
}
.dl-btn--line {
  background: #06C755;
  border-color: #06C755;
  color: #fff;
}
.dl-btn--line::before { content: ''; }
.dl-btn--line:hover { background: #059944; border-color: #059944; color: #fff; }

/* ── 驗證步驟 ────────────────────────────────────────────── */
.dl-verify-details { margin-top: 16px; }
.dl-verify-details > summary { list-style: none; cursor: pointer; width: fit-content; }
.dl-verify-details > summary::-webkit-details-marker { display: none; }
.dl-verify-panel {
  margin: 18px 0 0;
  padding: 20px 22px;
  background: #FAFAF8;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
}
.dl-steps-mini {
  list-style: none; padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-step-mini {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-han);
  font-size: .95rem;
  color: var(--ink);
}
.dl-step-num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: var(--seal);
  color: #FFFFFF;
  font-weight: 900;
  font-size: .9rem;
  border-radius: 50%;
}

/* ── 分流載點 / 歷史版本 ─────────────────────────────────── */
.dl-section {
  margin: 32px 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.dl-section-title {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0 0 12px;
  padding: 0 0 9px;
  border-bottom: 2px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}
.dl-section-title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 1em;
  background: var(--seal);
  border-radius: 2px;
  flex-shrink: 0;
  transform: translateY(1px);
}
.dl-mirror-list,
.dl-popular-list {
  list-style: none; padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
}
.dl-popular-list { gap: 7px; }

/* 印刷目錄式清單：章戳 + 標題 + 點線 leader + 記號 */
.dl-mirror-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px dotted var(--rule-mid);
  text-decoration: none;
  color: var(--ink);
  transition: color .18s;
}
.dl-mirror-item:hover { color: var(--seal); }
.dl-mirror-item:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 2px;
}
.dl-mirror-tag {
  order: 0;
  flex-shrink: 0;
  font-family: var(--font-han);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  line-height: 1.4;
  color: var(--seal);
  border: 1px solid var(--seal-line);
  border-radius: 2px;
  padding: 2px 6px 2px 7px;
  transition: background .18s, color .18s, border-color .18s;
}
.dl-mirror-item:hover .dl-mirror-tag {
  background: var(--seal);
  border-color: var(--seal);
  color: #FFFFFF;
}
.dl-mirror-name {
  order: 1;
  font-family: var(--font-han);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.5;
}
.dl-mirror-item::before {
  content: '';
  order: 2;
  flex: 1 1 24px;
  min-width: 24px;
  align-self: center;
  border-bottom: 1px dotted var(--rule-soft);
  transform: translateY(1px);
  transition: border-color .18s;
}
.dl-mirror-item:hover::before { border-bottom-color: var(--seal-line); }
.dl-mirror-item::after {
  content: '↓';
  order: 3;
  flex-shrink: 0;
  font-size: .9rem;
  font-weight: 700;
  color: var(--seal);
}
.dl-mirror-item i { display: none; }
.dl-mirror-date {
  order: 3;
  flex-shrink: 0;
  font-family: var(--font-mono, monospace);
  font-size: .78rem;
  color: var(--ink-3);
  letter-spacing: .5px;
}

/* 歷史版本：章戳轉墨灰，標示「這是封存」 */
.dl-mirror-list--history .dl-mirror-tag {
  color: var(--ink-3);
  border-color: var(--rule-mid);
}
.dl-mirror-list--history .dl-mirror-item:hover .dl-mirror-tag {
  background: var(--ink-2);
  border-color: var(--ink-2);
  color: #FFFFFF;
}

/* 查看所有歷史版本：純文字索引列 */
.dl-mirror-item--all { border-bottom: 0; padding-top: 13px; }
.dl-mirror-item--all .dl-mirror-name { font-weight: 700; color: var(--ink-2); }
.dl-mirror-item--all:hover .dl-mirror-name { color: var(--seal); }
.dl-mirror-item--all::after { content: '→'; }

/* ── 熱門下載排行 ────────────────────────────────────────── */
.dl-popular-item {
  border: 0; padding: 0; position: static;
}
.dl-popular-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid var(--rule-soft);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 17, 10, .05);
  transition: box-shadow .2s, color .2s, border-color .2s;
}
.dl-popular-item a:hover {
  box-shadow: 0 3px 10px rgba(20, 17, 10, .1);
  color: var(--seal);
  border-color: var(--rule-mid);
}
.dl-popular-rank {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--ink-3);
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}
.dl-popular-item:nth-child(1) .dl-popular-rank { color: #C19A3D; font-size: 1.3rem; }
.dl-popular-item:nth-child(2) .dl-popular-rank { color: var(--ink-2); font-size: 1.2rem; }
.dl-popular-item:nth-child(3) .dl-popular-rank { color: var(--seal); }
.dl-popular-title {
  font-family: var(--font-han);
  font-weight: 700;
  font-size: .95rem;
  flex: 1 1 auto;
  color: inherit;
}
.dl-popular-label {
  font-family: var(--font-han);
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}

/* ── 通知 / 警告 ─────────────────────────────────────────── */
.dl-notice {
  padding: 14px 18px;
  background: var(--paper-3);
  border: 1px solid var(--rule-soft);
  border-left: 4px solid var(--ink-3);
  border-radius: 0 6px 6px 0;
  font-family: var(--font-han);
  font-size: .95rem;
  line-height: 1.7;
  margin: 16px 0;
}
.dl-notice--warn {
  border-left-color: #B5392C;
  background: #FFF0EE;
  color: #8A271D;
}

/* ── 標籤 / 備註 ─────────────────────────────────────────── */
.dl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.dl-footnote {
  margin-top: 24px;
  padding: 12px 0;
  border-top: 1px dashed var(--rule-soft);
  font-family: var(--font-han);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  line-height: 1.7;
}

/* pagination .page-link 等 fallback */
.pagination ul, .pagination > .page-item { list-style: none; }
.page-item {
  display: inline-block;
  margin: 0 2px;
}
.page-item.disabled .page-link { opacity: .4; pointer-events: none; }
.page-link {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}
.page-link:hover, .page-item.active .page-link {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}

/* archive_index */
.lede {
  font-family: var(--font-body);
  font-size: 1.08rem;
  font-style: italic;
  color: var(--ink-2);
  margin: 0 0 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--rule);
}
.list-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
.list-date {
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .14em;
  color: var(--seal);
}
.list-title { font-family: var(--font-han); font-size: 1rem; }
.list-title a { text-decoration: none; color: var(--ink); border-bottom: 1px solid transparent; }
.list-title a:hover { border-bottom-color: var(--seal); color: var(--seal); }

/* search/tag 列表內的 isotope grid */
.row.isotope { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.row.isotope > .item.post {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  margin-bottom: 22px;
}
@media (min-width: 992px) {
  .gx-md-4 { --gutter: 14px; }
}
.gy-4 { row-gap: 1.8rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* fs alias */
.fs-13 { font-size: .82rem; }
.fs-18 { font-size: 1.1rem; }

/* tag page accent (Tags 字側強調) */
.accent {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--seal);
  font-weight: 400;
  margin-left: 10px;
  font-size: .65em;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  vertical-align: baseline;
}

/* ── PostHero 結構：朱紅小印章方塊「號外」（首頁第一篇可選） ── */
.post-hero-wrap.is-special::before {
  content: '號外　EXTRA';
  color: var(--paper);
  background: var(--seal);
  padding: 4px 14px;
}

/* ===========================================================
   全站拍立得卡片
   作用範圍：所有列表頁與相關文章的 .post > .card
   - 純白相紙
   - 不旋轉（端正）
   - 分類 chip 浮在圖片左上角
   =========================================================== */

.blog .post {
  position: relative;
}

/* ── 拍立得本體 ─────────────────────────────────────────── */
.blog.grid .post > .card,
.blog.grid-view .post > .card,
.blog.classic-view .post > .card,
section.wrapper.bg-light.mt-10 .post > .card {
  background: #FFFFFF;
  padding: 10px;                                    /* 統一相紙白邊 */
  border-top: 0 !important;
  box-shadow:
    0 1px 2px rgba(20, 17, 10, .05),
    0 16px 28px -16px rgba(20, 17, 10, .22),
    0 0 0 1px rgba(20, 17, 10, .05);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1),
              box-shadow .35s ease;
  position: relative;
}

/* hover：上浮 + 陰影加重 */
.blog.grid .post > .card:hover,
.blog.grid-view .post > .card:hover,
.blog.classic-view .post > .card:hover,
section.wrapper.bg-light.mt-10 .post > .card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 2px 4px rgba(20, 17, 10, .08),
    0 28px 42px -18px rgba(20, 17, 10, .32),
    0 0 0 1px rgba(20, 17, 10, .07);
  z-index: 5;
}

/* ── 圖片區：拿掉外框，相紙白邊承擔 ─────────────────────── */
.blog.grid .post .card-img-top,
.blog.grid-view .post .card-img-top,
.blog.classic-view .post .card-img-top,
.blog.grid .post figure.card-img-top,
.blog.grid-view .post figure.card-img-top,
.blog.classic-view .post figure.card-img-top,
section.wrapper.bg-light.mt-10 .post .card-img-top,
section.wrapper.bg-light.mt-10 .post figure.card-img-top {
  border: 0;
  background: #14110A;
  aspect-ratio: 19 / 10;
  margin: 0;
  position: relative;
}
.blog .post .card-img-top img,
section.wrapper.bg-light.mt-10 .post .card-img-top img {
  filter: contrast(1.04) saturate(.96);
}

/* tag.php / search_results.php 用 figure.rounded（沒有 .card-img-top） */
.blog.grid-view .post figure.rounded {
  border: 1px solid var(--rule-soft);
  /* 載入前顯示 .media-placeholder 的紙質底紋，不用墨黑（慢載時像壞圖） */
  aspect-ratio: 19 / 10;
  margin: 0;
  border-radius: 0 !important;
  position: relative;
  overflow: hidden;
}
.blog.grid-view .post figure.rounded img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(.96);
}

/* ── 分類 chip：膠帶從卡片左上角外側黏進來 ────────────────── */
.blog.grid .post .card-body,
.blog.grid-view .post .card-body,
.blog.classic-view .post .card-body,
section.wrapper.bg-light.mt-10 .post .card-body {
  padding: 14px 4px 6px;
  position: static;            /* 讓 .post-category absolute 相對 .card 而非 .card-body */
}

.blog.grid .post .card-body > .post-category,
.blog.grid-view .post .card-body > .post-category,
.blog.classic-view .post .card-body > .post-category,
section.wrapper.bg-light.mt-10 .post .card-body > .post-category {
  position: absolute;
  top: 8px;                    /* 配合放大微調 */
  left: -34px;                 /* 膠帶放大後左端也加長 */
  margin: 0;
  z-index: 6;
}

/* 分類 chip → 紙膠帶風（米黃半透明 + 右側 dashed 撕邊 + 微旋轉 + 左端從外側淡入） */
.blog.grid .post .card-body > .post-category a,
.blog.grid-view .post .card-body > .post-category a,
.blog.classic-view .post .card-body > .post-category a,
section.wrapper.bg-light.mt-10 .post .card-body > .post-category a {
  display: inline-block;
  background: rgba(254, 232, 164, .85);
  color: var(--ink);
  border: 0;
  border-right: 1px dashed rgba(255, 255, 255, .78);
  padding: 9px 22px 8px 34px;          /* 放大：6/16/5/26 → 9/22/8/34 */
  font-family: var(--font-mono);
  font-size: .82rem;                   /* 放大：.68 → .82 */
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    0 3px 7px rgba(20, 17, 10, .16),
    inset 0 1px 0 rgba(255, 255, 255, .4);
  transform: rotate(-2.4deg);
  transition: transform .25s ease, background .2s;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  -webkit-mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, .35) 8px,
    rgba(0, 0, 0, .75) 18px,
    rgba(0, 0, 0, 1) 28px,
    rgba(0, 0, 0, 1) 100%);
          mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, .35) 8px,
    rgba(0, 0, 0, .75) 18px,
    rgba(0, 0, 0, 1) 28px,
    rgba(0, 0, 0, 1) 100%);
}

/* 每張不同微傾角度（讓多張膠帶不單調） */
.blog .col-md-6:nth-of-type(odd)  > .post .card-body > .post-category a { transform: rotate(-2.4deg); }
.blog .col-md-6:nth-of-type(even) > .post .card-body > .post-category a { transform: rotate(1.8deg); }
.blog .col-xl-4:nth-of-type(3n+1) > .post .card-body > .post-category a { transform: rotate(-2.8deg); }
.blog .col-xl-4:nth-of-type(3n+2) > .post .card-body > .post-category a { transform: rotate(2deg); }
.blog .col-xl-4:nth-of-type(3n)   > .post .card-body > .post-category a { transform: rotate(-1.4deg); }

.blog.grid .post .card-body > .post-category a:hover,
.blog.grid-view .post .card-body > .post-category a:hover,
.blog.classic-view .post .card-body > .post-category a:hover,
section.wrapper.bg-light.mt-10 .post .card-body > .post-category a:hover {
  background: rgba(254, 232, 164, 1);
  transform: rotate(0deg);
}

/* card-footer：相紙底端 */
.blog.grid .post .card-footer,
.blog.grid-view .post .card-footer,
.blog.classic-view .post .card-footer,
section.wrapper.bg-light.mt-10 .post .card-footer {
  padding: 10px 4px 4px;
  border-top: 1px dashed rgba(20, 17, 10, .12);
}

/* 卡片標題下方滑出綠線：拍立得內距調整 */
.blog.grid .post .post-title::after,
.blog.grid-view .post .post-title::after {
  margin-top: 10px;
}

/* 文章頁相關文章標題：縮小（容器較窄不適合大字） */
section.wrapper.bg-light.mt-10 .post .post-title,
section.wrapper.bg-light.mt-10 .col-md-6 .post-title {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem) !important;
  line-height: 1.55;
  margin: .35rem 0 0;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}

/* ── 行距節奏：縮小拍立得卡片間距 ───────────────────────── */
.blog.grid .row[data-home-grid] { row-gap: 1.8rem; padding: 12px 0 20px; }
.blog.grid-view .row { row-gap: 1.8rem; }
.blog.classic-view .post { margin-bottom: 1.8rem; }
section.wrapper.bg-light.mt-10 .row.gy-6 { row-gap: 1.8rem; }

/* ── 等高：col 內的卡片撐滿欄高 ─────────────────────────── */
.blog .col-12 > .post,
.blog .col-md-6 > .post,
.blog .col-xl-4 > .post,
section.wrapper.bg-light.mt-10 .col-md-6 > .post {
  height: 100%;
  display: flex;
}
.blog .post > .card,
section.wrapper.bg-light.mt-10 .post > .card {
  height: 100%;
  width: 100%;
}
.blog .post .card-body {
  flex: 1 1 auto;
}

/* ── 精選文章：紅色手蓋圓章（右下角） ────────────────────── */
.blog .card.is-featured {
  background: #FFFFFF !important;
  padding-top: 12px;
  box-shadow:
    0 1px 2px rgba(20, 17, 10, .06),
    0 16px 28px -16px rgba(20, 17, 10, .24),
    0 0 0 1px rgba(20, 17, 10, .05);
}
.blog .card.is-featured::before {
  content: '精\A 選';
  white-space: pre;
  position: absolute;
  top: auto !important;
  left: auto !important;
  bottom: 10px;
  right: 10px;
  z-index: 6;
  width: 80px;                            /* 放大：58 → 80 */
  height: 80px;
  display: grid;
  place-items: center;
  text-align: center;
  background: transparent;
  color: #B5392C;
  font-family: var(--font-han);
  font-weight: 900;
  font-size: 1.15rem;                     /* 放大：.86 → 1.15 */
  line-height: 1.05;
  letter-spacing: 5px;
  padding: 0;
  border: 3px solid #B5392C;
  border-radius: 50%;
  transform: rotate(-10deg);
  box-shadow:
    inset 0 0 0 2px #FFFFFF,
    inset 0 0 0 4px #B5392C,
    0 0 10px rgba(181, 57, 44, .3),
    0 2px 3px rgba(20, 17, 10, .18);
  filter: contrast(1.08) saturate(1.05);
  opacity: .92;
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: transform .35s ease;
}
.blog .card.is-featured:hover::before {
  transform: rotate(-4deg) scale(1.06);
}

/* 精選標題用淺紅螢光筆 */
.blog .card.is-featured .post-title a,
.blog .card.is-featured .post-title .link-dark {
  background-image: linear-gradient(transparent 70%, rgba(181, 57, 44, .2) 70%) !important;
}

/* ===========================================================
   首頁第一篇 hero ── 大張拍立得
   =========================================================== */

.post-hero-wrap {
  margin: 0 0 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  display: flex;
  justify-content: center;
}
.post-hero-wrap::before { display: none !important; }

.post-hero {
  display: block !important;
  grid-template-columns: none !important;
  gap: 0 !important;
  width: 100%;
  background: #FFFFFF;
  padding: 10px;                                    /* 統一相紙白邊 */
  position: relative;
  box-shadow:
    0 2px 6px rgba(20, 17, 10, .08),
    0 36px 56px -22px rgba(20, 17, 10, .38),
    0 0 0 1px rgba(20, 17, 10, .05);
}

.post-hero-link {
  display: block !important;
  color: inherit;
  text-decoration: none;
}

.post-hero-img {
  aspect-ratio: 19 / 10;
  border: 0 !important;
  background: #14110A;
  margin: 0;
  width: 100%;
  position: relative;
}
.post-hero-img img {
  filter: contrast(1.04) saturate(.96);
}

.post-hero-body {
  padding: 24px 10px 14px !important;
  position: static;            /* 讓 .post-category 相對 .post-hero 定位 */
}

/* hero 分類 chip → 膠帶從卡片左上角外側貼進來 */
.post-hero .post-category {
  position: absolute;
  top: 10px;
  left: -40px;                 /* hero 膠帶超出更多 */
  margin: 0 !important;
  z-index: 6;
}
.post-hero .post-category a {
  display: inline-block;
  background: rgba(254, 232, 164, .88);
  color: var(--ink);
  border: 0;
  border-right: 1px dashed rgba(255, 255, 255, .8);
  padding: 11px 26px 10px 40px;        /* 放大：8/18/7/30 → 11/26/10/40 */
  font-family: var(--font-mono);
  font-size: .92rem;                   /* 放大：.74 → .92 */
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow:
    0 4px 10px rgba(20, 17, 10, .2),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  transform: rotate(-2.5deg);
  transition: transform .25s ease, background .2s;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  -webkit-mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, .35) 10px,
    rgba(0, 0, 0, .75) 22px,
    rgba(0, 0, 0, 1) 34px,
    rgba(0, 0, 0, 1) 100%);
          mask-image: linear-gradient(90deg,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, .35) 10px,
    rgba(0, 0, 0, .75) 22px,
    rgba(0, 0, 0, 1) 34px,
    rgba(0, 0, 0, 1) 100%);
}
.post-hero .post-category a:hover {
  background: rgba(254, 232, 164, 1);
  transform: rotate(0deg);
}

/* hero 標題：黑體大字，置中或左對齊 */
.post-hero-title {
  font-family: var(--font-han) !important;
  font-weight: 900 !important;
  font-size: 22px !important;
  line-height: 1.4 !important;
  letter-spacing: calc(1px + var(--cf-ls, 0px)) !important;
  color: var(--ink) !important;
  margin: 6px 0 14px !important;
  text-decoration: none;
}
.post-hero:hover .post-hero-title { color: var(--seal); }

/* hero meta：日期 + 續閱本文 */
.post-hero-meta {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 14px !important;
  border-top: 1px dashed rgba(20, 17, 10, .14) !important;
}
.post-hero-meta time { color: var(--ink); }
.post-hero-read {
  margin-left: auto;
  color: var(--seal);
  font-weight: 600;
  border: 0;
}
.post-hero:hover .post-hero-read { letter-spacing: .18em; }

/* hero 上方陰影下加一條微亮反光（模擬相片上方光暈） */
.post-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, .8);
  z-index: 6;
}

/* hero 整體 hover：微浮起 */
.post-hero:hover {
  box-shadow:
    0 3px 8px rgba(20, 17, 10, .1),
    0 50px 70px -22px rgba(20, 17, 10, .45),
    0 0 0 1px rgba(20, 17, 10, .07);
  transform: translateY(-3px);
  transition: transform .35s ease, box-shadow .35s ease;
}
.post-hero { transition: transform .35s ease, box-shadow .35s ease; }

@media (max-width: 540px) {
  .post-hero {
    padding: 10px;
  }
  .post-hero-body {
    padding: 18px 4px 10px !important;
  }
  .post-hero .post-category {
    top: -18px;
    left: 10px;
  }
  .post-hero .post-category a {
    font-size: .66rem;
    padding: 5px 12px;
  }
}

/* ===========================================================
   側欄「最新文章」拍立得化
   =========================================================== */

.sidebar-post-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sidebar-post-card {
  border: 0 !important;
  padding: 0 !important;
  background: transparent;
}
.sidebar-post-card .sidebar-card-link {
  display: block !important;          /* 取消原本的 grid 2 col */
  grid-template-columns: none !important;
  background: #FFFFFF;
  padding: 10px 10px 8px;
  box-shadow:
    0 1px 2px rgba(20, 17, 10, .05),
    0 12px 22px -14px rgba(20, 17, 10, .22),
    0 0 0 1px rgba(20, 17, 10, .05);
  text-decoration: none;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
}
.sidebar-post-card .sidebar-card-link:hover {
  transform: translateY(-3px);
  box-shadow:
    0 2px 4px rgba(20, 17, 10, .08),
    0 22px 32px -16px rgba(20, 17, 10, .3),
    0 0 0 1px rgba(20, 17, 10, .07);
}

.sidebar-post-card .sidebar-card-img {
  aspect-ratio: 19 / 10 !important;
  width: 100%;
  border: 0 !important;
  background: #14110A;
  margin: 0 0 10px;
  overflow: hidden;
}
.sidebar-post-card .sidebar-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(.96);
}

.sidebar-post-card .sidebar-card-body {
  padding: 4px 2px 4px;
}
.sidebar-post-card .sidebar-card-title {
  font-family: var(--font-han);
  font-weight: 900;
  font-size: .94rem;
  line-height: 1.55;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  color: var(--ink);
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.sidebar-post-card .sidebar-card-link:hover .sidebar-card-title {
  color: var(--seal);
}
.sidebar-post-card .sidebar-card-date {
  display: block;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 6px;
  border-top: 1px dashed rgba(20, 17, 10, .12);
}

/* ── Mobile：相紙白邊縮小、分類 chip 位置調整 ────────────── */
@media (max-width: 540px) {
  .blog .post > .card,
  section.wrapper.bg-light.mt-10 .post > .card {
    padding: 10px;
  }
  .blog .post .card-body > .post-category {
    top: 8px !important;
    left: -28px !important;
  }
  .blog .post .card-body > .post-category a {
    font-size: .72rem;
    padding: 7px 16px 6px 26px;
  }
  .post-hero .post-category {
    top: 8px !important;
    left: -28px !important;
  }
  .post-hero .post-category a {
    padding: 8px 18px 7px 28px;
    font-size: .78rem;
  }
  .blog .card.is-featured::before {
    width: 66px; height: 66px;
    font-size: .98rem;
    bottom: 6px; right: 6px;
    letter-spacing: 4px;
  }
}

/* ── 區塊分隔線：副刊 / 日誌 等 section heading ─────────── */
.section-rule {
  margin: 38px 0 22px;
  text-align: center;
  position: relative;
}
.section-rule::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
}
.section-rule > span {
  position: relative;
  z-index: 1;
  background: var(--soot);
  color: #fff;
  padding: 5px 18px;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 500;
}
.section-rule > span::before,
.section-rule > span::after {
  content: '✦';
  color: #F4C24B;
  margin: 0 10px;
  font-size: .8em;
}
.section-rule-row { padding-top: 0 !important; padding-bottom: 0 !important; }
.section-rule-row .section-rule { margin: 24px 0 8px; }
@media (max-width: 540px){
  .section-rule > span { padding: 0 10px; font-size: .66rem; letter-spacing: .22em; }
}

/* ================================================================
   細節增強 / 創意細節
   ================================================================ */

/* ── 1. 圖片載入：從模糊到清晰的轉場 ──────────────────────── */
.lazy-img {
  filter: blur(5px);
  transition: opacity .65s ease, filter .9s ease !important;
}
.lazy-img.is-loaded,
.lazy-img.loaded {
  filter: blur(0) !important;
}

/* ── 2. 拍立得圖片：底片顆粒感（grain overlay） ─────────────── */
.blog .post .card-img-top::before,
.blog .post figure.card-img-top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>");
  background-size: 160px 160px;
}

/* ── 3. 快門閃光（hover 時觸發一次性閃白） ──────────────────── */
.blog .post .card-img-top::after,
.blog .post figure.card-img-top::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.blog .post .card:hover .card-img-top::after,
.blog .post .card:hover figure.card-img-top::after {
  animation: shutter-flash .55s ease forwards;
}
@keyframes shutter-flash {
  0%   { opacity: 0; }
  6%   { opacity: .62; }
  22%  { opacity: .06; }
  100% { opacity: 0; }
}

/* ── 4. Hero 大圖：底片暗角（vignette） ─────────────────────── */
.post-hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 45%,
    rgba(20, 17, 10, .28) 100%
  );
}
/* Hero 圖片也加 grain */
.post-hero-img::after {
  z-index: 3;
  background-image:
    linear-gradient(180deg, transparent 62%, rgba(20, 17, 10, .22)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='160' height='160' filter='url(%23g)'/></svg>");
  background-size: auto, 160px 160px;
  opacity: .055;
  mix-blend-mode: multiply;
}

/* ── 5. 膠帶 chip：hover 時微微 3D 翹起感 ───────────────────── */
.blog .post .card-body > .post-category a:hover,
section.wrapper.bg-light.mt-10 .post .card-body > .post-category a:hover {
  transform: rotate(0deg) perspective(500px) rotateX(-10deg) translateY(-3px) !important;
  box-shadow:
    0 6px 14px rgba(20, 17, 10, .2),
    inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
.post-hero .post-category a:hover {
  transform: rotate(0deg) perspective(500px) rotateX(-10deg) translateY(-4px) !important;
  box-shadow:
    0 7px 18px rgba(20, 17, 10, .22),
    inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}

/* ── 6. 文章 time 元素加小日曆前綴 ─────────────────────────── */
.post-meta .post-date time::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 5px;
  background:
    linear-gradient(var(--seal) 0 4px, transparent 4px) no-repeat center top,
    linear-gradient(var(--rule-soft) 0 100%, transparent 0) center / 100% 100%,
    linear-gradient(var(--rule-soft) 0 100%, transparent 0) center / 100% 100%;
  border: 1px solid var(--rule-soft);
  border-radius: 1px;
  vertical-align: middle;
  transform: translateY(-1px);
  /* 簡單的日曆小圖示：上方有條紅線 */
  border-top: 2px solid var(--seal);
  background: transparent;
}

/* ── 7. 卡片進場動畫 class（由 JS IntersectionObserver 觸發） ── */
.blog .post > .card {
  opacity: 1;
  transform: translateY(0);
  transition:
    transform .35s cubic-bezier(.22, .61, .36, 1),
    box-shadow .35s ease,
    opacity .45s ease;
}
.blog .post.is-entering > .card {
  opacity: 0;
  transform: translateY(22px);
}
.blog .post.card-visible > .card {
  opacity: 1;
  transform: translateY(0);
}

/* ── 8. nav 連結 hover：底線從左展開 ───────────────────────── */
.site-nav-list a,
.site-nav-list button {
  position: relative;
  overflow: hidden;
}
.site-nav-list a::before,
.site-nav-list button::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}
.site-nav-list a:hover::before,
.site-nav-list button:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}
.site-nav-list a:hover,
.site-nav-list button:hover {
  background: var(--ink); /* 維持原 hover 背景 */
}

/* ── 9. 文章正文連結：hover 底線從左展開 ───────────────────── */
.article a, #article-body a {
  background-image: linear-gradient(var(--seal), var(--seal));
  background-position: 0 100%;
  background-size: 0% 1px;
  background-repeat: no-repeat;
  text-decoration: none !important;
  border-bottom: 1px solid var(--rule-soft);
  transition: background-size .3s ease, color .2s, border-color .2s;
  padding-bottom: 1px;
}
.article a:hover, #article-body a:hover {
  background-size: 100% 1px;
  border-bottom-color: transparent;
  color: var(--seal);
}

/* ── 10. 精選印章：不均勻紋理（filter 疊加模擬手蓋感） ───────── */
.blog .card.is-featured::before {
  filter: contrast(1.12) saturate(1.05) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='r'><feTurbulence type='turbulence' baseFrequency='0.06' numOctaves='2' result='noise'/><feDisplacementMap in='SourceGraphic' in2='noise' scale='1.8' xChannelSelector='R' yChannelSelector='G'/></filter></svg>#r") !important;
}

/* ── 11. 側欄最新文章卡片 hover 時快門 ─────────────────────── */
.sidebar-post-card .sidebar-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.sidebar-post-card .sidebar-card-link:hover .sidebar-card-img::after {
  animation: shutter-flash .55s ease forwards;
}

/* ── 12. 文章 blockquote 引號更大 ──────────────────────────── */
blockquote::before {
  font-size: 3.2rem !important;
  opacity: .55;
}

/* ================================================================
   以下為用戶直接指定 CSS 修正（以最高 specificity 覆寫）
   ================================================================ */

/* 1. 卡片欄間距 */
.col-xl-4, .col-md-6 { padding: 0 10px; }

/* 2. 相關文章拍立得 title 連結不要底線 */
section.wrapper.bg-light.mt-10 .post-title a {
  text-decoration: none;
}
section.wrapper.bg-light.mt-10 .post-title a:hover {
  color: var(--seal);
}

/* 3. 文章頁麵包屑已有分類，隱藏 post-header 的分類 chip */
.blog.single .post-header .post-category { display: none; }

/* 4. 文章頁內文、footer 修正（標籤樣式已統一在 site-new.css） */
.article p, #article-body p { font-size: 18px; }
.post-footer { padding-top: 32px; }

/* 5. 小字體（12px 左右）清晰：強制像素對齊 + 黑體 */
.post-meta,
.post-meta a,
.post-meta time,
.topbar-date,
.topbar-social a,
.breadcrumb-nav,
.breadcrumb-list,
.breadcrumb-list a,
.sidebar-card-date,
.entry-colophon,
.footer-bottom,
.footer-col-title,
.footer-social a,
.stamp-vol,
.stamp-issue {
  font-family: var(--font-han);
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: auto;
  text-rendering: geometricPrecision;
}

/* mono 小字也改清晰 */
.font-mono-small {
  font-size: 12px;
  font-family: var(--font-han);
  -webkit-font-smoothing: subpixel-antialiased;
}

/* 6. 標籤頁 sidebar 與文章頁一致（以文章頁字型大小為主） */
.sidebar .widget-title { font-size: 1.08rem; }
.sidebar .sidebar-card-title { font-size: .94rem; }
.sidebar .sidebar-card-date { font-size: .72rem; }
/* sidebar 標籤尺寸繼承全站 .entry-tag-link（site-new.css 統一設定） */

/* ── 閱讀舒適度（--cf-* 由選單面板設定、存於 localStorage） ── */
html { font-size: calc(100% * var(--cf-fs, 1)); }
body {
  font-size: calc(16.5px * var(--cf-fs, 1));
  line-height: calc(1.9 * var(--cf-lh, 1));
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}
.post-content,
.post-content p { line-height: calc(1.9 * var(--cf-lh, 1)); }
.dl-article-excerpt { line-height: calc(1.75 * var(--cf-lh, 1)); }

.comfort-panel {
  width: 230px;
  padding: 14px 16px 12px;
  cursor: default;
}
.cf-row { margin: 0 0 12px; }
.cf-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-han);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  color: var(--ink);
  margin: 0 0 6px;
}
.cf-val {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--seal);
}
.cf-range {
  width: 100%;
  margin: 0;
  accent-color: var(--seal);
}
.cf-reset {
  width: 100%;
  background: transparent;
  border: 1px dotted var(--rule-mid);
  border-radius: 3px;
  padding: 6px 0;
  font-family: var(--font-han);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.cf-reset:hover { color: var(--seal); border-color: var(--seal-line); }

.mobile-menu-comfort {
  margin-top: 20px;
  padding: 16px 2px 0;
  border-top: 1px dotted var(--rule-mid);
}
.mobile-comfort-title {
  font-family: var(--font-han);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--ink);
  margin: 0 0 12px;
}

/* 文章內文自帶行高/字距，需一併吃 --cf-* 變數（字級走 rem 已可縮放） */
.article, #article-body {
  line-height: calc(2.0 * var(--cf-lh, 1));
  letter-spacing: calc(1px + var(--cf-ls, 0px));
}

/* ── 舒適度浮動元件（右下角） ── */
.comfort-fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.comfort-fab-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #FFFFFF;
  border: 2px solid var(--seal);
  border-radius: 3px;
  box-shadow: 3px 3px 0 var(--seal-line);
  font-family: var(--font-han);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--seal-deep);
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.comfort-fab-btn:hover,
.comfort-fab.is-open .comfort-fab-btn {
  background: var(--seal);
  color: #FFFFFF;
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--seal-line);
}
.comfort-panel--float {
  width: 230px;
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(20, 17, 10, .12);
  padding: 14px 16px 12px;
}
.comfort-panel-title {
  font-family: var(--font-han);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--ink);
  padding: 0 0 8px;
  margin: 0 0 12px;
  border-bottom: 1px dotted var(--rule-mid);
}
@media (prefers-reduced-motion: reduce) {
  .comfort-fab-btn:hover, .comfort-fab.is-open .comfort-fab-btn { transform: none; }
}
@media (max-width: 640px) {
  .comfort-fab { right: 14px; bottom: 18px; }
}

/* ── 贊助連結（請我喝珍奶）：珍奶兌換券 ── */
.sponsor-boba {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin: 30px 0;
  padding: 18px 24px;
  background: #FBF1E0;
  border: 2px dashed #C98A6B;
  border-radius: 6px;
  font-family: var(--font-han);
}
.sponsor-boba-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.sponsor-boba-sub {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: #B07A52;
}
.sponsor-boba-line {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  color: #8C3F2B;
  line-height: 1.4;
}
.sponsor-boba-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #AD5138;
  color: #F8E0BE;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: calc(1px + var(--cf-ls, 0px));
  padding: 11px 22px;
  border: 2px solid #8C3F2B;
  border-radius: 3px;
  box-shadow: 3px 3px 0 #E3C49F;
  text-decoration: none;
  flex-shrink: 0;
  transition: background .18s, transform .18s, box-shadow .18s;
}
.sponsor-boba-btn:hover,
.sponsor-boba-btn:active {
  background: #8C3F2B;
  color: #F8E0BE;
  text-decoration: none;
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #E3C49F;
}
.sponsor-boba-btn img { width: 20px; height: 20px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .sponsor-boba-btn:hover, .sponsor-boba-btn:active { transform: none; }
}

/* 下載頁贊助（驗證後顯示於文章圖片下方） */
.dl-sponsor {
  grid-area: spon;
  margin: 0;
  padding: 14px 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}
.dl-sponsor .sponsor-boba-text { align-items: center; }
.dl-sponsor .sponsor-boba-line { font-size: .98rem; }
@media (min-width: 641px) {
  /* 三個選擇器並列是為了壓過「多顆按鈕 → cta 橫跨」規則的 :has 特異性 */
  .dl-article:has(> .dl-sponsor),
  .dl-article:has(> .dl-sponsor):has(.dl-verify-details[open]),
  .dl-article:has(> .dl-sponsor):has(.dl-cta > .dl-btn--primary + .dl-btn--primary) {
    grid-template-areas: "img body" "spon body" "cta cta";
    grid-template-rows: auto auto auto;
  }
}
@media (max-width: 640px) {
  .dl-article:has(> .dl-sponsor) {
    grid-template-areas: "img" "spon" "body" "cta";
  }
}

/* ── 外部連結安全檢查頁（/leave）── */
.leave-host-line {
  font-family: var(--font-han);
  font-size: .95rem;
  color: var(--ink-2);
  margin: 10px 0 0;
}
.leave-host-line strong { color: var(--seal-deep); font-weight: 900; }
.leave-preview {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 16px;
  background: #FAFAF8;
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  font-family: var(--font-han);
}
.leave-preview--loading { color: var(--ink-3); font-size: .9rem; }
.leave-preview-img {
  flex: 0 0 180px;
  max-width: 40%;
  border: 1px solid var(--rule-soft);
  background: var(--paper-2);
  overflow: hidden;
  border-radius: 2px;
}
.leave-preview-img img { width: 100%; height: auto; display: block; }
.leave-preview-body { min-width: 0; }
.leave-preview-title {
  font-weight: 900;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 8px;
  word-break: break-word;
}
.leave-preview-desc {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--ink-2);
  margin: 0;
  word-break: break-word;
}
@media (max-width: 560px) {
  .leave-preview { flex-direction: column; }
  .leave-preview-img { flex-basis: auto; max-width: 100%; }
}
.leave-go {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.leave-back {
  font-family: var(--font-han);
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-3);
  text-decoration: none;
}
.leave-back:hover { color: var(--seal); text-decoration: underline; }

/* 首屏 hero 圖改 eager 載入（LCP），不走 lazy 淡入 */
.post-hero-img img:not(.lazy-img) { opacity: 1; transform: none; }
