/* 中文緊湊排版：保留字級與操作區大小，移除額外字距與過大段落留白。 */
html:lang(zh) body { line-height: 1.55; }
html:lang(zh) body * {
  letter-spacing: normal !important;
  word-spacing: normal !important;
}
html:lang(zh) body :is(p, li, dt, dd, td, th, blockquote, figcaption, summary, label),
html:lang(zh) body :is([style*="line-height"], [class*="desc"], .article-body, .tt-body, .diy-steps) {
  line-height: 1.55 !important;
}
html:lang(zh) body :is(h1, h2, h3, h4, h5, h6),
html:lang(zh) body :is(h1, h2, h3, h4, h5, h6)[style] { line-height: 1.25 !important; }
html:lang(zh) body :is(main, article, .article-body) p {
  margin-block: 0 10px !important;
}
html:lang(zh) body :is(main, article, .article-body) :is(h2, h3, h4) {
  margin-block: 18px 8px !important;
}
html:lang(zh) body :is(main, article, .article-body) :is(ul, ol) {
  margin-block: 8px 12px !important;
}
/* 封面與正文之間不再保留整條空白帶。 */
.main-layout { padding-block: 16px 28px; }
.main-layout:has(> main:only-child) { grid-template-columns: minmax(0, 1fr); }
html:lang(zh) body .main-layout > main > :is(h2, h3):first-of-type { margin-top: 0 !important; }
.article-cover { margin-top: 12px; }
.article-body :is(figure, .article-cover) { margin-block: 12px; }
.oil-cover-hero { min-height: 0; }
.oil-cover-content {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: 20px;
}
.oil-cover-content h1 { font-size: clamp(28px, 4vw, 46px); margin-bottom: 6px; }
.oil-cover-cat { margin-bottom: 8px; }
.oil-cover-latin { margin-bottom: 10px; font-size: 16px; }
.oil-tags-row { margin-bottom: 0; gap: 6px; }
.oil-cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}
:is(.oil-cover-hero--petitgrain, .oil-cover-hero--photo) .oil-cover-overlay {
  background: linear-gradient(90deg, rgba(248,250,243,.96), rgba(248,250,243,.85) 42%, rgba(248,250,243,.08) 78%);
}
:is(.oil-cover-hero--petitgrain, .oil-cover-hero--photo) .oil-cover-content > :is(h1, .oil-cover-latin) {
  background: none;
  backdrop-filter: none;
  padding: 0;
  display: block;
}
:is(.oil-cover-hero--petitgrain, .oil-cover-hero--photo) .oil-cover-latin { max-width: 600px; }
@media (max-width: 640px) {
  .oil-cover-content { padding: 16px; }
  :is(.oil-cover-hero--petitgrain, .oil-cover-hero--photo) .oil-cover-overlay {
    background: linear-gradient(90deg, rgba(248,250,243,.94), rgba(248,250,243,.72));
  }
  .main-layout { padding-block: 12px 20px; gap: 20px; }
}

/* 單品資料卡直接輸出圖片，不再只依賴初始化腳本設定背景。 */
#odHero { padding: 24px; min-height: 220px; isolation: isolate; }
.od-cover-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
#odHero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(248,250,243,.95), rgba(248,250,243,.8) 45%, rgba(248,250,243,.08) 85%); }
#odHero .od-hero-emoji { display: none; }
#odHero .od-hero-text { background: none; backdrop-filter: none; box-shadow: none; border: 0; padding: 0; max-width: 680px; }
#odHero h1 { white-space: normal; overflow-wrap: anywhere; }
.article-ai-cover { position: relative; margin: 12px 0 16px; overflow: hidden; border-radius: 12px; }
.article-ai-cover > img { display: block; width: 100%; height: auto; margin: 0; }
.article-ai-cover > img:not(.article-cover) { max-height: 280px; object-fit: cover; }
@media (max-width: 640px) {
  #odHero { padding: 18px; min-height: 0; }
  #odHero::before { background: linear-gradient(90deg, rgba(248,250,243,.94), rgba(248,250,243,.7)); }
  #odHero .od-hero-text { width: 100%; }
}

/* 頁尾：保留統一聲明與關於連結，縮緊兩欄排版。 */
html:lang(zh) body footer { padding: 20px 20px 12px; }
html:lang(zh) body footer,
html:lang(zh) body footer * {
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  word-spacing: 0 !important;
}
html:lang(zh) body footer .footer-inner {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
html:lang(zh) body footer h4 { margin: 0 0 6px; }
html:lang(zh) body footer p { margin: 0; }
html:lang(zh) body footer p + p { margin-top: 6px !important; }
html:lang(zh) body footer ul { margin: 0; padding: 0; }
html:lang(zh) body footer ul li { margin: 0 0 2px; padding: 0; font-size: 13px; }
html:lang(zh) body footer .footer-bottom { padding-top: 10px; }
@media (max-width: 640px) {
  html:lang(zh) body footer .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}
