/* ==========================================================================
   草本故事館 — 文章頁樣式 story.css
   只在 layout: story 的頁面載入（由 _layouts/default.html 判斷）
   ========================================================================== */

/* ===== 來源：_layouts/story.html ===== */
.story {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.story-category {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.9em;
  margin-bottom: 20px;
}

.story-header {
  text-align: center;
  margin-bottom: 50px;
  padding: 50px 30px;
  background: linear-gradient(135deg, var(--accent-900, #3b564c) 0%, var(--accent-500, #4f6f62) 100%);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.story-header h1 {
  margin: 20px 0;
  font-size: 2.8em;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.formula-name {
  font-size: 1.5em;
  color: #dfe3ef;
  font-weight: bold;
  margin: 15px 0;
}

.meta {
  margin-top: 20px;
  opacity: 0.95;
  font-size: 1.1em;
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.meta .date,
.meta .reading-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meta .reading-time {
  color: #dfe3ef;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.story-content {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  line-height: 2;
  font-size: 1.15em;
  margin-bottom: 30px;
}

.story-content h2 {
  color: #3b564c;
  font-size: 1.8em;
  margin: 40px 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 3px solid #4f6f62;
}

.story-content h3 {
  color: #4f6f62;
  font-size: 1.4em;
  margin: 30px 0 15px 0;
}

.story-content p {
  margin-bottom: 1.8em;
  color: #333;
}

.story-content strong {
  color: #3b564c;
  font-weight: bold;
}

.story-content ul {
  margin: 20px 0;
  padding-left: 30px;
}

.story-content li {
  margin: 10px 0;
  line-height: 1.8;
}

/* 表格樣式 */
.story-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.story-content table th,
.story-content table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: left;
}

.story-content table th {
  background-color: #3b564c;
  color: white;
  font-weight: bold;
}

.story-content table td:first-child {
  background-color: #eaf1ec;
  color: #3b564c;
  font-weight: bold;
}

.story-content table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.story-content table tr:hover {
  background-color: #f5f5f5;
}

.ingredients, .effects {
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  padding: 40px;
  margin-top: 30px;
  border-radius: 12px;
  border-left: 6px solid #4f6f62;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.section-icon {
  font-size: 2em;
}

.section-header h2 {
  color: #3b564c;
  margin: 0;
  font-size: 1.8em;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.ingredient-item {
  background: white;
  padding: 25px;
  border-radius: 10px;
  border: 2px solid #eaf1ec;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ingredient-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(52, 67, 94, 0.15);
  border-color: #4f6f62;
}

.ingredient-image {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0eef3 0%, #ffffff 100%);
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(127, 139, 176, 0.2);
}

.ingredient-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  animation: fadeInScale 0.6s ease-out;
}

/* 圖片載入動畫 */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ingredient-name {
  font-size: 1.3em;
  font-weight: bold;
  color: #3b564c;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #7f8bb0;
}

.ingredient-desc {
  color: #555;
  line-height: 1.6;
  font-size: 1em;
}

.effects-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  border-left: 4px solid #7f8bb0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.effects-content p {
  color: #333;
  font-size: 1.15em;
  line-height: 1.8;
  margin: 0;
}

/* LINE 貼圖推廣區塊 */
.sticker-promo {
  background: linear-gradient(135deg, #eef0f6 0%, #ffffff 100%);
  padding: 40px;
  margin-top: 30px;
  border-radius: 12px;
  border: 2px solid #cfd6e6;
  box-shadow: 0 4px 12px rgba(90, 90, 150, 0.12);
}

.sticker-promo-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.sticker-promo-icon {
  font-size: 3em;
}

.sticker-promo-text h3 {
  color: #5f5896;
  font-size: 1.5em;
  margin: 0 0 10px 0;
}

.sticker-promo-text p {
  color: #555;
  font-size: 1.1em;
  line-height: 1.6;
  margin: 0;
  max-width: 500px;
}

.sticker-promo-button {
  display: inline-block;
  background: linear-gradient(135deg, #06c755 0%, #00b341 100%);
  color: white;
  padding: 15px 35px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.sticker-promo-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
  color: white;
}

/* 文章導航 */
.story-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  margin-top: 50px;
  padding: 30px 0;
  border-top: 2px solid #ddd9e6;
}

.nav-prev, .nav-next {
  display: flex;
}

.nav-prev {
  justify-content: flex-start;
}

.nav-next {
  justify-content: flex-end;
}

.nav-home {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-link {
  display: flex;
  flex-direction: column;
  padding: 20px 25px;
  background: white;
  border: 2px solid #ddd9e6;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 280px;
}

.nav-link:hover {
  border-color: #4f6f62;
  background: #f3f1f7;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(52, 67, 94, 0.15);
}

.nav-link.prev {
  text-align: left;
}

.nav-link.next {
  text-align: right;
}

.nav-label {
  font-size: 0.9em;
  color: #4f6f62;
  font-weight: 600;
  margin-bottom: 8px;
}

.nav-title {
  font-size: 1.05em;
  color: #3b564c;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  background: linear-gradient(135deg, #4f6f62 0%, #7b9b8a 100%);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(52, 67, 94, 0.3);
}

.home-link:hover {
  background: linear-gradient(135deg, #3b564c 0%, #4f6f62 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(52, 67, 94, 0.4);
}

.home-icon {
  font-size: 1.3em;
}

/* 響應式 - 平板 */
@media (max-width: 900px) {
  .story-navigation {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  
  .nav-home {
    grid-column: 1 / -1;
    order: -1;
    margin-bottom: 15px;
  }
  
  .nav-link {
    max-width: 100%;
  }
}

/* 響應式 - 手機 */
@media (max-width: 600px) {
  .story-navigation {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .nav-prev, .nav-next {
    justify-content: stretch;
  }
  
  .nav-link {
    max-width: 100%;
    text-align: center !important;
  }
  
  .nav-link.prev .nav-label::before {
    content: '';
  }
  
  .nav-link.next .nav-label::after {
    content: '';
  }
}

.story-footer {
  margin-top: 50px;
  padding: 30px;
  text-align: center;
}

.back-link {
  display: inline-block;
  padding: 15px 40px;
  background: #4f6f62;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(52, 67, 94, 0.3);
}

.back-link:hover {
  background: #3b564c;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(52, 67, 94, 0.4);
}

/* 參考資料引用區塊樣式 */
.story-content blockquote {
  background: linear-gradient(to right, #f0f8ff 0%, #ffffff 100%);
  border-left: 5px solid #4f6f62;
  padding: 20px 25px;
  margin: 30px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.story-content blockquote p {
  margin: 8px 0;
  line-height: 1.8;
}

.story-content blockquote a {
  color: #4f6f62;
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid #7f8bb0;
  transition: all 0.3s ease;
  padding-bottom: 2px;
}

.story-content blockquote a:hover {
  color: #3b564c;
  border-bottom-color: #4f6f62;
  background: rgba(127, 139, 176, 0.1);
}

/* 延伸閱讀區塊 */
.story-content h2 + h3 {
  color: #4f6f62;
  border-bottom: 2px solid #ddd9e6;
  padding-bottom: 12px;
  margin-top: 1.5rem;
  font-size: 1.3em;
}

.story-content h3 + ul {
  list-style: none;
  padding-left: 0;
}

.story-content h3 + ul li {
  padding: 12px 20px;
  margin: 10px 0;
  background: white;
  border-left: 3px solid #7f8bb0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.story-content h3 + ul li:hover {
  background: #f3f1f7;
  transform: translateX(5px);
  border-left-color: #4f6f62;
}

.story-content h3 + ul li a {
  color: #3b564c;
  text-decoration: none;
  font-weight: 500;
}

.story-content h3 + ul li a:hover {
  color: #4f6f62;
}

/* 響應式設計 - 平板 */
@media (max-width: 900px) {
  .ingredient-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .ingredient-image {
    width: 100px;
    height: 100px;
  }
  
  .ingredient-name {
    font-size: 1.2em;
  }
}

/* 響應式設計 - 手機 */
@media (max-width: 480px) {
  .ingredient-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .ingredient-image {
    width: 120px;
    height: 120px;
  }
  
  .ingredient-item {
    padding: 20px;
  }
  
  .sticker-promo {
    padding: 30px 20px;
  }
  
  .sticker-promo-text h3 {
    font-size: 1.3em;
  }
  
  .sticker-promo-text p {
    font-size: 1em;
  }
}
/* 內文角色浮動圖：連續多張右浮動圖的排版處理 */
.story-content img {
  clear: right; /* 連續右浮動圖各自往下疊，不並排、不重疊 */
  border-radius: 10px;
}

/* 響應式 - 手機：角色圖改置中區塊，避免窄螢幕擠壓內文 */
@media (max-width: 600px) {
  .story-content {
    padding: 24px 20px;
    font-size: 1.05em;
  }

  .story-content img {
    float: none !important;
    display: block;
    width: 128px !important;
    height: auto;
    margin: 10px auto 20px !important;
    clear: both;
  }
}

/* ===== 來源：_includes/post-tags.html ===== */
.post-tags-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f0eef3;
  border-radius: 12px;
  border-left: 4px solid #7b9b8a;
}

.tags-heading {
  color: #4f6f62;
  font-size: 1.2rem;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tags-icon {
  font-size: 1.3rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid #7b9b8a;
  border-radius: 20px;
  color: #3b564c;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.post-tag:hover {
  background: #7b9b8a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 67, 94, 0.2);
}

/* 單篇標籤：不連結，純文字顯示 */
.post-tag-plain,
.post-tag-plain:hover {
  background: transparent;
  border: 2px dashed #ddd9e6;
  color: #8a90a4;
  font-weight: 400;
  transform: none;
  box-shadow: none;
  cursor: default;
}

/* ===== 來源：_includes/share-buttons.html ===== */
.share-buttons {
  background: linear-gradient(135deg, #f0eef3 0%, #ffffff 100%);
  padding: 35px;
  margin: 40px 0;
  border-radius: 12px;
  border: 2px solid #e6e3ef;
  box-shadow: 0 2px 8px rgba(52,67,94,0.06);
}

.share-header {
  text-align: center;
  margin-bottom: 25px;
}

.share-header h4 {
  color: #4f6f62;
  margin: 0 0 10px 0;
  font-size: 1.5em;
  font-weight: bold;
}

.share-header p {
  color: #666;
  margin: 0;
  font-size: 1em;
}

.share-button-group {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  color: white;
}

.share-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.share-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.share-button.facebook {
  background: #1877f2;
}

.share-button.facebook:hover {
  background: #0d6efd;
}

.share-button.line {
  background: #06c755;
}

.share-button.line:hover {
  background: #00b900;
}

.share-button.twitter {
  background: #000000;
}

.share-button.twitter:hover {
  background: #333333;
}

.share-button.threads {
  background: #101010;
}

.share-button.threads:hover {
  background: #2b2b2b;
}

.share-button.copy-link {
  background: #6c757d;
}

.share-button.copy-link:hover {
  background: #5a6268;
}

.share-button.instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-button.instagram:hover {
  background: linear-gradient(45deg, #d87e2e 0%, #c85a33 25%, #b91f39 50%, #b21d5c 75%, #a01579 100%);
}

.copy-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #4f6f62;
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.copy-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 768px) {
  .share-button-group {
    flex-direction: column;
  }
  
  .share-button {
    width: 100%;
    justify-content: center;
  }
  
  .share-buttons {
    padding: 25px 20px;
  }
}

/* ===== 來源：_includes/disqus.html ===== */
.comments-section {
  max-width: 900px;
  margin: 60px auto 0;
  padding: 40px 20px 0;
  border-top: 2px solid var(--line, #ddd9e6);
}
.comments-header { margin-bottom: 26px; text-align: center; }
.comments-header h3 {
  font-family: var(--serif, serif);
  color: var(--green-700, #4f6f62);
  margin: 0 0 10px 0;
  font-size: 1.8em;
}
.comments-header p { color: var(--ink-soft, #59617a); margin: 0; font-size: 1.08em; }

.social-invite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
}
@media (max-width: 560px) { .social-invite { grid-template-columns: 1fr; } }

.social-invite-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 14px rgba(52,67,94,0.12);
}
.social-invite-btn:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(52,67,94,0.18); }
.social-invite-btn.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-invite-btn.fb { background: #1877f2; }

.social-invite-ic {
  flex-shrink: 0;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.social-invite-ic svg { width: 24px; height: 24px; fill: #fff; }
.social-invite-text { display: flex; flex-direction: column; line-height: 1.35; }
.social-invite-text strong { font-size: 1.08em; }
.social-invite-text small { font-size: 0.85em; opacity: 0.9; }

/* ===== 新增：閱讀體驗（目錄、相關文章、進度條、回頂部、手機修正） ===== */

/* 文章目錄 */
.story-toc {
  background: #fff;
  border: 2px solid var(--line, #ddd9e6);
  border-left: 5px solid var(--accent-500, #6f9083);
  border-radius: 12px;
  padding: 14px 20px;
  margin: 0 0 28px;
  box-shadow: 0 2px 8px rgba(52, 67, 94, 0.06);
}
.story-toc summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent-700, #4f6f62);
  font-size: 1.05em;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.story-toc summary::-webkit-details-marker { display: none; }
.story-toc summary::after { content: '＋'; font-size: 1.1em; color: var(--muted, #8a90a4); transition: transform 0.25s; }
.story-toc[open] summary::after { content: '－'; }
.story-toc ol {
  margin: 14px 0 4px;
  padding-left: 22px;
  columns: 2;
  column-gap: 28px;
}
.story-toc li { margin: 6px 0; line-height: 1.5; break-inside: avoid; }
.story-toc a { color: var(--ink, #333b4a); text-decoration: none; font-size: 0.98em; }
.story-toc a:hover { color: var(--accent-700, #4f6f62); text-decoration: underline; }
.story-content h2 { scroll-margin-top: 86px; }
@media (max-width: 700px) {
  .story-toc ol { columns: 1; }
}

/* 相關文章 */
.related-stories {
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  padding: 32px 40px 36px;
  margin-top: 30px;
  border-radius: 12px;
  border-left: 6px solid var(--accent-500, #4f6f62);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.related-stories .section-header { margin-bottom: 22px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #fff;
  border: 2px solid var(--line, #ddd9e6);
  border-top: 4px solid var(--green-500, #6f9083);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink, #333b4a);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.related-card.paozhi { border-top-color: var(--fire-500, #8981c2); }
.related-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(52, 67, 94, 0.14); border-color: var(--accent-400, #9db6a8); }
.related-card .series-badge { align-self: flex-start; }
.related-title { font-family: var(--serif, serif); font-size: 1.08em; line-height: 1.45; color: var(--green-700, #4f6f62); }
.related-card.paozhi .related-title { color: var(--fire-700, #5f5896); }
.related-formula { color: var(--gold, #7f8bb0); font-weight: 700; font-size: 0.95em; }
.related-effects { color: #666; font-size: 0.9em; line-height: 1.6; }
@media (max-width: 600px) {
  .related-stories { padding: 24px 20px 28px; }
}

/* 閱讀進度條（貼在導覽列下緣） */
.reading-progress {
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 199;
  pointer-events: none;
  background: transparent;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-400, #9db6a8), var(--accent-700, #4f6f62));
  transition: width 0.1s linear;
}

/* 回頂部 */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--accent-700, #4f6f62);
  color: #fff;
  font-size: 1.3em;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(52, 67, 94, 0.3);
  z-index: 150;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}
.back-to-top:hover { opacity: 1; transform: translateY(-3px); }
.back-to-top[hidden] { display: none; }

/* 手機排版修正：標題不爆版、表格可橫向捲動 */
.story-header h1 { font-size: clamp(1.7em, 5.5vw, 2.8em); overflow-wrap: anywhere; }
.story-header .formula-name { font-size: clamp(1.15em, 3.5vw, 1.5em); }
@media (max-width: 700px) {
  .story-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .story-content table th, .story-content table td { min-width: 120px; }
}
@media (max-width: 600px) {
  .story { padding: 12px; }
  .story-header { padding: 34px 18px; margin-bottom: 28px; }
  .meta { font-size: 1em; gap: 10px; }
  .story-content h2 { font-size: 1.45em; }
  .story-content h3 { font-size: 1.2em; }
  .ingredients, .effects { padding: 24px 18px; }
  .back-to-top { right: 14px; bottom: 16px; width: 42px; height: 42px; }
}

/* 使用者偏好減少動態效果 */
@media (prefers-reduced-motion: reduce) {
  .ingredient-image img { animation: none; }
  .reading-progress span { transition: none; }
}

/* 藥材名可點到圖鑑 */
.ingredient-name a { color: inherit; text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color 0.2s, color 0.2s; }
.ingredient-name a:hover { color: var(--accent-500, #6f9083); border-bottom-color: var(--accent-500, #6f9083); }

/* 本草心語抽卡入口（文章頁結尾） */
.oracle-cta-box {
  display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center;
  background: linear-gradient(135deg, #f3f1f7 0%, #e9e5f0 60%, #ded9ea 100%);
  border: 1px solid rgba(150,160,190,0.25); border-left: 6px solid #8B5E9B;
  border-radius: 12px; padding: 30px 34px; margin-top: 30px;
  box-shadow: 0 4px 12px rgba(90,100,130,0.1);
}
.oracle-cta-box.has-card { grid-template-columns: 150px 1fr; }
.oracle-cta-card { display: block; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(90,100,130,0.25); transform: rotate(-3deg); transition: transform 0.3s; background: #fff; }
.oracle-cta-card:hover { transform: rotate(0deg) translateY(-4px); }
.oracle-cta-card img { display: block; width: 100%; height: auto; border-radius: 0 !important; clear: none !important; }
.oracle-cta-badge { display: inline-block; background: linear-gradient(135deg, #8B5E9B, #A67BB5); color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 10px; }
.oracle-cta-text h3 { font-family: var(--serif, serif); color: #5f6f9e; font-size: 1.35em; margin: 0 0 8px; }
.oracle-cta-quote { font-size: 1.15em; color: #6b5a8a; font-weight: 700; margin: 0 0 8px; }
.oracle-cta-desc { color: #59617a; font-size: 0.98em; line-height: 1.75; margin: 0 0 16px; }
.oracle-cta-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.oracle-cta-btn { display: inline-block; background: linear-gradient(135deg, #5f6f9e 0%, #9aa0c0 100%); color: #fff; padding: 11px 24px; border-radius: 30px; text-decoration: none; font-weight: 600; font-size: 0.95em; transition: all 0.3s; box-shadow: 0 4px 15px rgba(90,100,130,0.25); }
.oracle-cta-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(90,100,130,0.35); }
.oracle-cta-link { color: #8a90a4; font-size: 0.9em; text-decoration: none; border-bottom: 1px dashed #b7bccd; }
.oracle-cta-link:hover { color: #5f6f9e; }
@media (max-width: 600px) {
  .oracle-cta-box, .oracle-cta-box.has-card { grid-template-columns: 1fr; padding: 24px 20px; text-align: center; }
  .oracle-cta-card { width: 140px; margin: 0 auto; }
  .oracle-cta-actions { justify-content: center; }
}

/* 朗讀列 */
.story-listen {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 2px solid var(--line, #ddd9e6); border-left: 5px solid var(--accent-500, #6f9083);
  border-radius: 12px; padding: 12px 16px; margin: 0 0 16px;
  box-shadow: 0 2px 8px rgba(52, 67, 94, 0.06);
}
.story-listen[hidden] { display: none; }
.story-listen.is-active { position: sticky; top: 74px; z-index: 120; box-shadow: 0 6px 18px rgba(52, 67, 94, 0.18); }
.listen-play {
  border: 0; cursor: pointer; font: inherit; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-700, #4f6f62), var(--accent-500, #6f9083));
  padding: 10px 20px; border-radius: 24px; transition: transform 0.2s, box-shadow 0.2s;
}
.listen-play:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(52, 67, 94, 0.25); }
.listen-btn {
  border: 2px solid var(--line, #ddd9e6); background: #fff; cursor: pointer; font: inherit; font-size: 0.9em;
  color: var(--ink-soft, #59617a); padding: 7px 14px; border-radius: 20px;
}
.listen-btn:hover { border-color: var(--accent-400, #9db6a8); }
.listen-btn[hidden] { display: none; }
.listen-status { color: var(--muted, #8a90a4); font-size: 0.88em; margin-left: auto; }
.story-content .is-reading, .story-header h1.is-reading { background: rgba(255, 236, 170, 0.55); border-radius: 6px; box-shadow: 0 0 0 4px rgba(255, 236, 170, 0.55); }
.story-header h1.is-reading { background: transparent; box-shadow: none; text-decoration: underline; text-decoration-color: rgba(255,236,170,0.8); }
.story-listen.is-active ~ .story-content p, .story-listen.is-active ~ .story-content li, .story-listen.is-active ~ .story-content h2, .story-listen.is-active ~ .story-content h3 { cursor: pointer; }
@media (max-width: 600px) {
  .story-listen { padding: 10px 12px; gap: 8px; }
  .story-listen.is-active { top: 70px; }
  .listen-play { padding: 9px 16px; }
  .listen-status { flex-basis: 100%; margin-left: 2px; }
}
