/* ============================================
   筆記頁 ‧ 專屬樣式
   沿用主站 CSS 變數，但聚焦於閱讀體驗
   ============================================ */

/* 筆記頁的 html 元素也要禁止水平捲動 — 手機 viewport 才能真正鎖住 */
html:has(body.page-notes),
html:has(body.page-notes-article) {
  overflow-x: hidden;
}
/* :has() 不支援的舊瀏覽器 fallback:用 max-width 強制 */
html {
  max-width: 100vw;
}

.page-notes {
  background:
    radial-gradient(ellipse at top, #0d1a40 0%, #06091e 60%, #06091e 100%);
  min-height: 100vh;
  max-width: 100vw;
  color: var(--moonlight-white);
  overflow-x: hidden;  /* 防止 drawer / 寬元件造成右邊水平捲動 */
  position: relative;  /* 給星空偽元素當定位基準 */
}

/* 文章內容元素的「絕對最大寬度」防線 */
.notes-article-body iframe,
.notes-article-body video,
.notes-article-body pre,
.notes-article-body table {
  max-width: 100%;
  box-sizing: border-box;
}
.notes-article-body pre {
  overflow-x: auto;  /* 程式碼太長就讓 pre 自己內部捲,不要撐破頁面 */
}

/* ============================================
   筆記頁專屬靜態星空（不會動畫,純背景視覺）
   - 底層 (::before)：3 個星雲漸層光暈,維持深邃感
   - 上層 (::after) ：120 顆隨機星點,SVG 平鋪
   - 兩層都 fixed 在視窗,捲動時星空不動,內容飄過
   ============================================ */
.page-notes::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* 紫雲 (左上) */
    radial-gradient(420px 420px at 15% 22%,
      rgba(122, 77, 190, 0.18) 0%,
      rgba(122, 77, 190, 0.05) 45%,
      transparent 70%),
    /* 藍雲 (右下) */
    radial-gradient(540px 540px at 88% 78%,
      rgba(77, 109, 190, 0.18) 0%,
      rgba(77, 109, 190, 0.05) 45%,
      transparent 70%),
    /* 金雲 (中) */
    radial-gradient(360px 360px at 55% 50%,
      rgba(212, 168, 80, 0.08) 0%,
      rgba(212, 168, 80, 0.025) 50%,
      transparent 70%);
}
.page-notes::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* url() 相對於 CSS 檔位置(根目錄),所以無論 notes.html 還是 notes/xxx.html 都正確解析 */
  background-image: url('images/notes-starfield.svg');
  background-size: 1600px 1600px;
  background-position: center;
  background-repeat: repeat;
  opacity: 0.7;
}

/* 簡化版 nav */
.notes-nav {
  position: sticky;
  top: 0;
  z-index: 110;  /* 必須 > body::before 的 z 100，否則手機 drawer 會被遮罩蓋住 */
  background: rgba(6, 9, 30, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid rgba(212, 168, 80, 0.15);
}
.notes-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notes-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--cool-text);
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 3px;
  transition: color .2s ease, transform .25s ease;
}
.notes-back:hover {
  color: var(--moon-gold);
  transform: translateX(-3px);
}
.notes-home {
  font-family: var(--font-serif-zh);
  font-size: 1.05rem;
  color: var(--moonlight-white);
  text-decoration: none;
  letter-spacing: 0.06em;
  border-bottom: 0.5px solid var(--moon-gold);
  padding-bottom: 2px;
}

/* ============================================
   notes-nav 完整選單版（搬自主站 nav）
   ============================================ */
.notes-nav .notes-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.notes-nav .notes-menu a {
  font-size: 13.5px;
  letter-spacing: 1.5px;
  color: var(--cool-text);
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  transition: color .2s ease;
}
.notes-nav .notes-menu a:hover { color: var(--moon-gold); }
.notes-nav .notes-menu a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--moon-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.notes-nav .notes-menu a:hover::after,
.notes-nav .notes-menu a.active::after { transform: scaleX(1); }
.notes-nav .notes-menu a.active { color: var(--moon-gold); }

/* 右側工具列：語言切換 */
.notes-nav .notes-nav-utils {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.notes-nav .lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0.5px solid rgba(212, 168, 80, 0.3);
  color: var(--cool-text);
  padding: 5px 10px;
  border-radius: 14px;
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color .25s ease, color .25s ease;
}
.notes-nav .lang-toggle:hover { border-color: var(--moon-gold); }
.notes-nav .lang-toggle .lang-zh,
.notes-nav .lang-toggle .lang-en {
  opacity: 0.55;
  transition: opacity .25s ease, color .25s ease;
}
.notes-nav .lang-toggle .lang-zh.active,
.notes-nav .lang-toggle .lang-en.active {
  opacity: 1;
  color: var(--moon-gold);
}
.notes-nav .lang-toggle .lang-sep { opacity: 0.4; }

/* 手機選單觸發按鈕（複用主站 .menu-toggle 樣式） */
.notes-nav .menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  position: relative;
}
.notes-nav .menu-toggle span {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--moon-gold);
  transition: transform .3s ease, opacity .3s ease;
}
.notes-nav .menu-toggle span:nth-child(1) { top: 4px; }
.notes-nav .menu-toggle span:nth-child(2) { top: 10px; }
.notes-nav .menu-toggle span:nth-child(3) { top: 16px; }

/* ===== 手機版 ===== */
@media (max-width: 900px) {
  .notes-nav .notes-menu { gap: 1.25rem; }
  .notes-nav .notes-menu a { font-size: 12.5px; letter-spacing: 1px; }
}
@media (max-width: 768px) {
  .notes-nav .menu-toggle { display: block; z-index: 102; }
  body.menu-open .notes-nav .menu-toggle { transform: rotate(180deg); }
  body.menu-open .notes-nav .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  body.menu-open .notes-nav .menu-toggle span:nth-child(2) {
    opacity: 0; transform: translateX(20px);
  }
  body.menu-open .notes-nav .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
  /* 抽屜選單 */
  .notes-nav .notes-menu {
    position: fixed;
    top: 0; right: 0;
    width: 82%; max-width: 340px;
    height: 100vh; height: 100dvh;
    background: linear-gradient(135deg, rgba(13, 26, 64, 0.98), rgba(6, 9, 30, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 5rem 2.5rem 2rem;
    transform: translateX(100%);
    transition: transform .42s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-left: 0.5px solid rgba(212, 168, 80, 0.25);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 101;
  }
  body.menu-open .notes-nav .notes-menu { transform: translateX(0); }
  .notes-nav .notes-menu a {
    font-family: var(--font-serif-zh);
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.08em;
    padding: 0.7rem 0;
    width: 100%;
    border-bottom: 0.5px solid rgba(212, 168, 80, 0.12);
  }
  /* 把語言切換縮到旁邊（行動裝置仍可見） */
  .notes-nav .notes-nav-utils { margin-right: 0.5rem; }
  .notes-nav-inner { gap: 0.5rem; }
}

/* Hero */
.notes-hero {
  padding: 5rem 2rem 3rem;
  text-align: center;
  position: relative;
}
.notes-hero::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  width: 600px; height: 400px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(212, 168, 80, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.notes-eyebrow {
  display: block;
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--moon-gold);
  opacity: 0.85;
  margin-bottom: 1rem;
}
.notes-title {
  font-family: var(--font-serif-zh);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin: 0 0 0.6rem;
  color: var(--moonlight-white);
}
.notes-sub {
  font-family: var(--font-serif-en);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--moon-gold);
  letter-spacing: 0.04em;
  margin: 0 0 1.5rem;
  opacity: 0.85;
}
.notes-desc {
  font-family: var(--font-serif-zh);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--cool-text);
  margin: 0 auto;
  max-width: 540px;
  letter-spacing: 0.04em;
}

/* Eve 角色 ‧ 筆記頁 (半身放大,桌機在標題左側) */
.notes-hero-inner {
  position: relative;
  display: flex;
  flex-direction: row-reverse;  /* 角色在左、文字在右 */
  align-items: center;
  justify-content: center;
  gap: 3rem;
}
.notes-hero-text {
  flex: 1;
  text-align: center;
  max-width: 640px;
}
.notes-hero-avatar {
  flex-shrink: 0;
  pointer-events: none;
  animation: notesAvatarFloat 5.5s ease-in-out infinite;
}
.notes-hero-avatar img {
  width: auto;
  height: clamp(280px, 40vh, 420px);
  display: block;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45))
          drop-shadow(0 0 28px rgba(212, 168, 80, 0.1));
  /* 底部漸變隱沒 — 跟夜霧融合 */
  -webkit-mask-image: linear-gradient(to bottom,
                        #000 0%, #000 70%,
                        rgba(0,0,0,0.7) 85%,
                        transparent 100%);
          mask-image: linear-gradient(to bottom,
                        #000 0%, #000 70%,
                        rgba(0,0,0,0.7) 85%,
                        transparent 100%);
}
@keyframes notesAvatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 900px) {
  .notes-hero-inner { flex-direction: column; gap: 1.5rem; }
  .notes-hero-avatar img { height: clamp(220px, 32vh, 280px); }
}
@media (max-width: 600px) {
  .notes-hero-avatar img { height: clamp(180px, 26vh, 220px); }
}
@media (prefers-reduced-motion: reduce) {
  .notes-hero-avatar { animation: none; }
}

/* Toolbar (標籤 + 搜尋) */
.notes-toolbar {
  padding: 1rem 2rem 2rem;
}
.notes-toolbar .container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.notes-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.note-tag {
  background: rgba(13, 26, 64, 0.5);
  border: 0.5px solid rgba(212, 168, 80, 0.25);
  color: var(--cool-text);
  font-family: var(--font-serif-zh);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.note-tag:hover {
  border-color: var(--moon-gold);
  color: var(--moon-gold);
}
.note-tag.active {
  background: var(--moon-gold);
  color: #0a1230;
  border-color: var(--moon-gold);
  font-weight: 500;
}
.notes-search {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.notes-search svg {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--soft-text);
  pointer-events: none;
}
.notes-search input {
  width: 100%;
  background: rgba(6, 12, 36, 0.5);
  border: 0.5px solid rgba(212, 168, 80, 0.2);
  border-radius: 999px;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  color: var(--moonlight-white);
  font-family: var(--font-serif-zh);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}
.notes-search input:focus {
  outline: none;
  border-color: var(--moon-gold);
  background: rgba(13, 26, 64, 0.6);
}
.notes-search input::placeholder {
  color: var(--soft-text);
  opacity: 0.6;
}

/* 文章網格 */
.notes-grid-section {
  padding: 2rem 2rem 6rem;
}
.notes-grid-section .container {
  max-width: 1400px;
  margin: 0 auto;
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
@media (max-width: 1024px) {
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .notes-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* 文章卡片 */
.note-card {
  display: flex;
  flex-direction: column;
  background: rgba(13, 26, 64, 0.45);
  border: 0.5px solid rgba(212, 168, 80, 0.15);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  position: relative;
}
.note-card:hover {
  transform: translateY(-4px);
  border-color: var(--moon-gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(212, 168, 80, 0.2);
}
.note-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--deep-night);
  overflow: hidden;
  position: relative;
}
.note-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.note-card:hover .note-card-cover img { transform: scale(1.05); }
.note-card-cover-placeholder {
  background:
    radial-gradient(circle at 30% 30%, rgba(212, 168, 80, 0.18), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(122, 158, 224, 0.15), transparent 60%),
    linear-gradient(135deg, #0d1a40, #06091e);
  display: flex;
  align-items: center;
  justify-content: center;
}
.note-cover-mark {
  font-family: var(--font-serif-zh);
  font-size: 2.2rem;
  color: var(--moon-gold);
  opacity: 0.4;
  letter-spacing: 0.05em;
}
.note-card-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.note-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-sans-en);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--moon-gold);
  text-transform: uppercase;
  opacity: 0.75;
}
.note-card-read::before {
  content: '·';
  margin-right: 0.5em;
  opacity: 0.5;
}
.note-card-pin {
  color: var(--stardust-gold);
  font-weight: 500;
}
.note-card-title {
  font-family: var(--font-serif-zh);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--moonlight-white);
  margin: 0;
  letter-spacing: 0.04em;
  line-height: 1.45;
}
.note-card-excerpt {
  font-family: var(--font-serif-zh);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--cool-text);
  margin: 0;
  letter-spacing: 0.02em;
  /* 限制 3 行 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.note-card-tag {
  font-family: var(--font-sans-en);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--soft-text);
  padding: 0.2rem 0.55rem;
  border: 0.5px solid rgba(168, 165, 184, 0.3);
  border-radius: 3px;
}
.note-card-more {
  margin-top: auto;
  padding-top: 0.7rem;
  font-family: var(--font-sans-en);
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--moon-gold);
  text-transform: uppercase;
  transition: transform .25s ease;
}
.note-card:hover .note-card-more {
  transform: translateX(3px);
}

/* 空狀態 */
.notes-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--soft-text);
}
.notes-empty svg {
  color: var(--moon-gold);
  opacity: 0.5;
  margin-bottom: 1rem;
}
.notes-empty p {
  font-family: var(--font-serif-zh);
  letter-spacing: 0.05em;
}

/* ============================================
   分頁（經典 ← 上一頁 / 1 2 3 / 下一頁 →）
   ============================================ */
.notes-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 3rem 0 1rem;
  padding: 0 1rem;
}
.notes-pagination .page-btn {
  background: rgba(13, 26, 64, 0.5);
  border: 0.5px solid rgba(212, 168, 80, 0.25);
  color: var(--cool-text);
  font-family: var(--font-serif-zh);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 38px;
}
.notes-pagination .page-btn:hover:not(:disabled):not(.active) {
  background: rgba(13, 26, 64, 0.85);
  border-color: rgba(212, 168, 80, 0.55);
  color: var(--moon-gold);
}
.notes-pagination .page-btn.active {
  background: rgba(212, 168, 80, 0.18);
  border-color: var(--moon-gold);
  color: var(--moon-gold);
  font-weight: 500;
  cursor: default;
}
.notes-pagination .page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.notes-pagination .page-prev,
.notes-pagination .page-next {
  font-family: var(--font-sans-en);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.notes-pagination .page-ellipsis {
  color: var(--cool-text);
  opacity: 0.5;
  padding: 0 0.35rem;
  user-select: none;
}
@media (max-width: 600px) {
  .notes-pagination .page-btn { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
  .notes-pagination .page-prev,
  .notes-pagination .page-next { font-size: 0.8rem; }
}

/* Footer */
.notes-footer {
  border-top: 0.5px solid rgba(212, 168, 80, 0.15);
  padding: 2rem;
  text-align: center;
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--soft-text);
}
.notes-footer a {
  color: var(--moon-gold);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: inline-block;
}
.notes-footer a:hover { text-decoration: underline; }
.notes-copy { margin: 0.5rem 0 0; opacity: 0.6; }

/* ============ 文章內頁 ============ */
.notes-article {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  line-height: 1.85;
}
.notes-article-header {
  margin-bottom: 3rem;
  text-align: center;
  border-bottom: 0.5px dashed rgba(212, 168, 80, 0.2);
  padding-bottom: 2rem;
}
.notes-article-meta {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-family: var(--font-sans-en);
  font-size: 10.5px;
  letter-spacing: 2px;
  color: var(--moon-gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
  opacity: 0.85;
}
.notes-article-title {
  font-family: var(--font-serif-zh);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--moonlight-white);
  margin: 0 0 0.8rem;
  line-height: 1.35;
}
.notes-article-subtitle {
  font-family: var(--font-serif-en);
  font-style: italic;
  color: var(--moon-gold);
  font-size: 1.05rem;
  margin: 0;
  opacity: 0.85;
}
.notes-article-body {
  font-family: var(--font-serif-zh);
  font-size: 1.02rem;
  color: var(--moonlight-white);
  letter-spacing: 0.04em;
}
.notes-article-body h2 {
  font-family: var(--font-serif-zh);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--moonlight-white);
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.05em;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid rgba(212, 168, 80, 0.2);
}
.notes-article-body h3 {
  font-family: var(--font-serif-zh);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--moon-gold);
  margin: 2rem 0 0.8rem;
  letter-spacing: 0.04em;
}
.notes-article-body p {
  margin: 0 0 1.3rem;
  line-height: 1.95;
}
.notes-article-body ul, .notes-article-body ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}
.notes-article-body li {
  margin-bottom: 0.6rem;
  line-height: 1.85;
}
.notes-article-body strong {
  color: var(--stardust-gold);
  font-weight: 500;
}
.notes-article-body em {
  font-style: italic;
  color: var(--cool-text);
}
.notes-article-body blockquote {
  border-left: 2px solid var(--moon-gold);
  margin: 1.5rem 0;
  padding: 0.5rem 1.2rem;
  color: var(--cool-text);
  font-style: italic;
  background: rgba(212, 168, 80, 0.04);
}
.notes-article-body a {
  color: var(--moon-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(212, 168, 80, 0.4);
  transition: text-decoration-color .2s ease;
}
.notes-article-body a:hover {
  text-decoration-color: var(--moon-gold);
}
.notes-article-body img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
  border: 0.5px solid rgba(212, 168, 80, 0.15);
}
.notes-article-body figure {
  margin: 1.5rem 0;
}
.notes-article-body figcaption {
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--soft-text);
  text-align: center;
  margin-top: 0.6rem;
  opacity: 0.75;
}
.notes-article-body code {
  background: rgba(212, 168, 80, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-family: 'Inter', monospace;
  font-size: 0.9em;
  color: var(--stardust-gold);
}
.notes-article-body hr {
  border: 0;
  border-top: 0.5px dashed rgba(212, 168, 80, 0.3);
  margin: 2.5rem 0;
}

/* 文章底部標籤與導覽 */
.notes-article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 0.5px solid rgba(212, 168, 80, 0.15);
}
.notes-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}
.notes-article-nav {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
}
.notes-article-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cool-text);
  font-family: var(--font-sans-en);
  font-size: 11px;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, transform .25s ease;
}
.notes-article-nav a:hover {
  color: var(--moon-gold);
}
.notes-article-nav a.back-to-notes:hover { transform: translateX(-3px); }
.notes-article-nav a.back-to-home:hover { transform: translateX(3px); }

/* 新版動態上下篇按鈕 ‧ 顯示鄰近文章標題 */
.notes-article-nav .article-nav-prev,
.notes-article-nav .article-nav-next {
  flex: 1 1 240px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(13, 26, 64, 0.4);
  border: 0.5px solid rgba(212, 168, 80, 0.2);
  border-radius: 6px;
  text-transform: none;
  letter-spacing: 0.04em;
  transition: border-color .2s ease, background .2s ease;
}
.notes-article-nav .article-nav-next {
  justify-content: flex-end;
  text-align: right;
}
.notes-article-nav .article-nav-prev:hover,
.notes-article-nav .article-nav-next:hover {
  background: rgba(13, 26, 64, 0.7);
  border-color: rgba(212, 168, 80, 0.55);
  transform: none;
}
.notes-article-nav .article-nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.notes-article-nav .article-nav-next .article-nav-text {
  align-items: flex-end;
}
.notes-article-nav .article-nav-label {
  font-family: var(--font-sans-en);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--soft-text);
  text-transform: uppercase;
}
.notes-article-nav .article-nav-title {
  font-family: var(--font-serif-zh);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--moonlight-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.notes-article-nav .article-nav-prev:hover .article-nav-title,
.notes-article-nav .article-nav-next:hover .article-nav-title {
  color: var(--moon-gold);
}
.notes-article-nav .article-nav-home {
  flex: 0 0 auto;
  padding: 0.85rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* 手機調整 */
@media (max-width: 600px) {
  .notes-hero { padding: 3rem 1.5rem 2rem; }
  .notes-toolbar { padding: 0.5rem 1.5rem 1.5rem; }
  .notes-grid-section { padding: 1rem 1.5rem 4rem; }
  .notes-article { padding: 2rem 1.5rem 3rem; }
  .notes-article-meta { gap: 0.7rem; font-size: 10px; }
  .notes-article-nav { flex-direction: column; }
  .notes-article-nav .article-nav-prev,
  .notes-article-nav .article-nav-next { flex: 1 1 100%; }
}
