/* 健康百科（/recipes）內頁：主站頂列仍用 site-nav，這裡只管百科內容 */
.enc-page {
  --enc-primary: #33450d;
  --enc-olive: #3b4d1b;
  --enc-surface: #fbf9f2;
  --enc-card: #ffffff;
  --enc-muted: #6f7a62;
  --enc-border: #e5e1d5;
  --enc-container: #f0eee7;
  --enc-container-low: #f6f4ed;
  --enc-secondary: #4f6533;
  --enc-sec-box: #cfe9aa;
  --enc-tertiary: #67300e;
  --enc-on: #ffffff;
  background: var(--enc-surface);
  color: #2d3421;
}
.enc-page .material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}
.enc-wrap {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}
.enc-wrap-nav { padding-top: 0; padding-bottom: 0; }
.enc-subnav {
  position: sticky;
  top: 4.75rem;
  z-index: 40;
  background: rgba(251, 249, 242, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--enc-border);
  margin: 0 0 0.85rem;
  padding: 0.35rem 0;
}
@media (min-width: 768px) {
  .enc-subnav { top: 5.5rem; }
}
.enc-subnav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.enc-subnav-row::-webkit-scrollbar { display: none; }
.enc-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--enc-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.enc-pill:hover {
  color: var(--enc-primary);
  background: var(--enc-container);
}
.enc-pill.is-on {
  color: var(--enc-primary);
  background: var(--enc-container);
  font-weight: 700;
}
.enc-pill .material-symbols-outlined { font-size: 18px; }
.enc-panel[hidden] { display: none !important; }
.enc-pagehead {
  margin: 0 0 1rem;
}
.enc-kicker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--enc-primary);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.2rem;
}
.enc-pagehead h1 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--enc-primary);
  letter-spacing: -0.02em;
  margin: 0;
}
.enc-lead {
  color: var(--enc-muted);
  line-height: 1.55;
  margin: 0 0 0.5rem;
  max-width: 42rem;
  font-size: 0.875rem;
}
.enc-search-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
@media (min-width: 640px) {
  .enc-search-row { flex-direction: row; align-items: stretch; }
}
.enc-search {
  position: relative;
  flex: 1;
}
.enc-search .material-symbols-outlined {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--enc-muted);
  font-size: 22px;
  pointer-events: none;
}
.enc-search input {
  width: 100%;
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  padding: 0.9rem 1rem 0.9rem 3rem;
  font-size: 0.875rem;
  color: #2d3421;
}
.enc-search input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 69, 13, 0.18);
}
.enc-search-btn {
  background: var(--enc-primary);
  color: var(--enc-on);
  border: 0;
  border-radius: 1rem;
  padding: 0.9rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.enc-search-btn:hover { background: var(--enc-olive); }
.enc-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  font-size: 0.75rem;
}
.enc-chips a,
.enc-chip {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  color: var(--enc-primary);
  text-decoration: none;
  cursor: pointer;
}
.enc-chips a:hover,
.enc-chip:hover { background: rgba(207, 233, 170, 0.4); }
.enc-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 860px) {
  .enc-board { grid-template-columns: 1fr 1fr; }
}
.enc-lead-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.enc-lead-card .enc-media {
  height: 9rem;
  min-height: 9rem;
}
@media (min-width: 860px) {
  .enc-lead-card {
    display: grid;
    grid-template-columns: minmax(12rem, 38%) 1fr;
    align-items: stretch;
  }
  .enc-lead-card .enc-media {
    height: auto;
    min-height: 100%;
  }
}
.enc-lead-body {
  padding: 0.8rem 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.enc-lead-body .enc-btn { margin-top: auto; align-self: flex-start; }
.enc-lead-card h3 {
  font-family: "Noto Serif TC", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}
.enc-lead-card p {
  color: var(--enc-muted);
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.enc-main { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.enc-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}
.enc-sec-head h2 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.enc-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--enc-muted);
  background: var(--enc-container);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.enc-card {
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 14px -2px rgba(59, 77, 27, 0.08);
}
.enc-media {
  position: relative;
  min-height: 10.5rem;
  background: var(--enc-container);
  overflow: hidden;
}
.enc-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 860px) {
  .enc-lead-card .enc-media img {
    position: absolute;
    inset: 0;
  }
}
.enc-feature-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.enc-meta {
  font-size: 0.75rem;
  color: var(--enc-olive);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.enc-card h3 {
  font-family: "Noto Serif TC", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}
.enc-card p { color: var(--enc-muted); font-size: 0.8rem; line-height: 1.55; margin: 0; }
.enc-callout {
  background: var(--enc-container-low);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  padding: 0.85rem;
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
}
.enc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--enc-primary);
  color: var(--enc-on);
  border: 0;
  border-radius: 0.6rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.enc-btn:hover { background: var(--enc-olive); color: var(--enc-on); }
.enc-btn-ghost {
  background: transparent;
  color: var(--enc-primary);
  border: 0;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.enc-recipe-band {
  background: linear-gradient(135deg, rgba(207, 233, 170, 0.4), var(--enc-container-low), rgba(207, 233, 170, 0.2));
  border: 1px solid rgba(79, 101, 51, 0.2);
  border-radius: 1.5rem;
  padding: 1.25rem;
}
.enc-recipe-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  padding: 1rem;
}
@media (min-width: 768px) {
  .enc-recipe-preview { grid-template-columns: 5fr 7fr; }
}
.enc-articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 860px) {
  .enc-articles { grid-template-columns: 1fr 1fr; }
}
.enc-article {
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 14px -2px rgba(59, 77, 27, 0.08);
}
.enc-article .enc-media {
  height: 9rem;
  min-height: 9rem;
}
.enc-article-body {
  padding: 0.8rem 0.95rem 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.enc-article-body h3 { font-size: 1rem; }
.enc-article-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.5;
}
.enc-article-foot {
  padding: 0.35rem 0.95rem 0.9rem;
  border-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.7rem;
  margin-top: auto;
}
@media (min-width: 860px) {
  .enc-article {
    display: grid;
    grid-template-columns: minmax(12rem, 38%) 1fr;
    grid-template-rows: 1fr auto;
    align-items: stretch;
    min-height: 11.5rem;
  }
  .enc-article .enc-media {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
    min-height: 100%;
  }
  .enc-article .enc-media img {
    position: absolute;
    inset: 0;
  }
  .enc-article-body { grid-column: 2; grid-row: 1; }
  .enc-article-foot { grid-column: 2; grid-row: 2; }
}
.enc-article-foot a {
  color: var(--enc-primary);
  font-weight: 700;
  text-decoration: none;
}
.enc-article-foot a:hover { color: var(--enc-olive); }
.enc-article[data-enc-goto] { cursor: pointer; }
.enc-tag {
  background: rgba(207, 233, 170, 0.6);
  color: var(--enc-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
}
.enc-side-box {
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1.5rem;
  padding: 1.35rem;
}
.enc-side-box.enc-side-soft { background: rgba(240, 238, 231, 0.7); }
.enc-matrix { display: flex; flex-direction: column; gap: 0.65rem; }
.enc-matrix-item {
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  padding: 0.85rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.enc-ico {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(59, 77, 27, 0.1);
  color: var(--enc-olive);
}
.enc-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.enc-tags a {
  padding: 0.4rem 0.75rem;
  border-radius: 0.75rem;
  background: var(--enc-container);
  color: var(--enc-primary);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}
.enc-tags a:hover { background: var(--enc-sec-box); }
.enc-rank { display: flex; flex-direction: column; gap: 0.75rem; }
.enc-rank a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.enc-rank-n {
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  width: 1.25rem;
  text-align: center;
  color: var(--enc-primary);
}
.enc-nl {
  background: var(--enc-primary);
  color: var(--enc-on);
  border-radius: 1.5rem;
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
}
.enc-nl h3 { font-family: "Noto Serif TC", serif; margin: 0.25rem 0 0.5rem; }
.enc-nl p { font-size: 0.75rem; opacity: 0.85; margin: 0 0 0.75rem; }
.enc-nl input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.75rem;
  margin-bottom: 0.45rem;
}
.enc-nl input::placeholder { color: rgba(255, 255, 255, 0.6); }
.enc-nl button {
  width: 100%;
  background: #d4eca2;
  color: #141f00;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.6rem;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
}
.enc-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--enc-card);
  border: 1px dashed var(--enc-border);
  border-radius: 1.5rem;
  color: var(--enc-muted);
}
.enc-empty h2 {
  font-family: "Noto Serif TC", serif;
  color: var(--enc-primary);
  margin: 0 0 0.5rem;
}
.enc-recipes-head { margin-bottom: 1rem; }
.enc-recipes-head h1 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.45rem;
  color: var(--enc-primary);
  margin: 0 0 0.3rem;
}
.enc-note {
  font-size: 0.7rem;
  color: var(--enc-muted);
  margin-top: 1.25rem;
  line-height: 1.6;
}
.enc-float {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--enc-olive);
}
.enc-is-hidden { display: none !important; }
.enc-flash {
  box-shadow: 0 0 0 3px rgba(51, 69, 13, 0.35), 0 8px 24px rgba(59, 77, 27, 0.12);
  transition: box-shadow 0.3s ease;
}
body.enc-modal-open { overflow: hidden; }
.enc-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.enc-modal[hidden] { display: none !important; }
.enc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 52, 33, 0.46);
}
.enc-modal-sheet {
  position: relative;
  width: min(34rem, 100%);
  max-height: min(88vh, 42rem);
  background: var(--enc-card);
  border: 1px solid var(--enc-border);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(59, 77, 27, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.enc-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--enc-border);
  background: var(--enc-container-low);
}
.enc-modal-back {
  border: 0;
  background: transparent;
  color: var(--enc-primary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0;
}
.enc-modal-x {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--enc-card);
  color: var(--enc-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.enc-modal-x:hover { color: var(--enc-primary); }
.enc-modal-scroll {
  overflow: auto;
  padding: 1rem 1.15rem 1.25rem;
}
.enc-modal-img {
  width: 100%;
  height: 10.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  display: block;
  margin-bottom: 0.75rem;
  background: var(--enc-container);
}
.enc-modal-scroll h2 {
  font-family: "Noto Serif TC", serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--enc-primary);
  margin: 0.35rem 0 0.7rem;
}
.enc-modal-prose p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #2d3421;
}
.enc-modal-done { margin-top: 1rem; }
.enc-modal-prose h3 {
  margin: 0.9rem 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--enc-primary);
}
.enc-modal-prose ul,
.enc-modal-prose ol {
  margin: 0;
  padding-left: 1.2rem;
}
.enc-modal-prose li {
  margin: 0.28rem 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #2d3421;
}
[data-recipe-card][data-recipe-open] { cursor: pointer; }
