/* 雪境漫遊 · 對齊台灣滑雪參考配色與版型 */
:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --accent: #0ea5e9;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 56px;
  --max-width: 1200px;
  --max-width-author: 1100px;
  --max-width-detail: 860px;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.8;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(14, 165, 233, 0.04) 0%, transparent 40%);
}

body.nav-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

p {
  margin: 0;
  overflow-wrap: anywhere;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.wrapper {
  width: min(100% - 3rem, var(--max-width));
  margin-inline: auto;
}

.wrapper--author {
  width: min(100% - 3rem, var(--max-width-author));
}

.wrapper--detail {
  width: min(100% - 3rem, var(--max-width-detail));
}

.ad-div {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 { -webkit-line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; }

.media-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--1x1 { aspect-ratio: 1; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--16x10 { aspect-ratio: 16 / 10; }

.stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ========== 頂欄 / 導覽 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand i {
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1;
}

.brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-desktop a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--primary);
  text-decoration: none;
}

.nav-cta {
  display: none;
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff !important;
}

.nav-toggle {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 120;
  margin-right: -0.5rem;
}

.nav-toggle__bars {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--text-main);
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-main);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 行動選單：absolute 避開 sticky + backdrop-filter 裁切 */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100dvh - var(--header-height));
  z-index: 110;
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-panel--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.nav-panel a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.45rem 0;
}

.nav-panel a:hover,
.nav-panel a[aria-current="page"] {
  color: var(--primary);
}

/* ========== 按鈕 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.25);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  color: #fff;
  text-decoration: none;
}

.btn--outline {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  text-decoration: none;
}

/* ========== 首頁 Hero ========== */
.hero {
  padding: 4rem 0 3rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  border: 1px solid rgba(2, 132, 199, 0.15);
}

.hero__badge:hover {
  text-decoration: none;
}

.hero__title {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-main);
}

.hero__title a {
  color: inherit;
}

.hero__title a:hover {
  color: var(--primary);
  text-decoration: none;
}

.hero__description {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.hero__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid #ffffff;
}

.hero__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.hero__image-wrapper:hover img {
  transform: scale(1.03);
}

/* ========== 快捷分類 ========== */
.categories {
  padding: 2rem 0 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.8rem;
  border-radius: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.category-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
}

.category-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.category-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========== 區塊標題 / 文章網格 ========== */
.section {
  padding: 3rem 0;
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.section__more {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
  white-space: nowrap;
}

.section__more:hover {
  gap: 0.6rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.article-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  color: inherit;
  min-width: 0;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}

.article-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.article-card:hover .article-card__img-wrap img {
  transform: scale(1.05);
}

.article-card__content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex-grow: 1;
}

.article-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-card__tag {
  position: relative;
  z-index: 2;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
}

.article-card__tag:hover {
  text-decoration: none;
}

.article-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

.article-card:hover .article-card__title {
  color: var(--primary);
}

.article-card__desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========== 作者橫幅 ========== */
.author-teaser {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  border: 1px solid #bae6fd;
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  margin: 2rem 0 4rem;
  box-shadow: var(--shadow-sm);
}

.author-teaser__avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  aspect-ratio: 1;
}

.author-teaser__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-teaser__content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-width: 0;
}

.author-teaser__name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.author-teaser__desc {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.8;
}

/* ========== 作者頁 ========== */
.author-page {
  padding: 2.5rem 0 4rem;
}

.author-hero {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.author-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.author-hero__avatar-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border: 3px solid #ffffff;
}

.author-hero__avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.author-hero__avatar-wrapper:hover img {
  transform: scale(1.04);
}

.author-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-width: 0;
}

.author-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  border: 1px solid rgba(2, 132, 199, 0.15);
}

.author-hero__name {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.author-hero__title {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
}

.author-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0.5rem 0;
  padding: 1.2rem 0;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.author-stats__item {
  display: flex;
  flex-direction: column;
}

.author-stats__value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.author-stats__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.author-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.content-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.content-card__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-main);
}

.content-card__title i {
  color: var(--primary);
}

.bio-text {
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.8;
}

.bio-text p {
  margin-bottom: 1.2rem;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.article-item {
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  padding: 1.2rem;
  border-radius: 14px;
  transition: var(--transition);
  display: block;
  color: inherit;
}

.article-item:hover {
  background: #ffffff;
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
}

.article-item__date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.article-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.article-item:hover .article-item__title {
  color: var(--primary);
}

/* ========== 詳情頁 ========== */
.detail {
  padding: 2.5rem 0 4rem;
}

.post-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.post-meta-top {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-category {
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(2, 132, 199, 0.15);
}

.post-category:hover {
  text-decoration: none;
}

.post-title {
  font-size: clamp(1.35rem, 1.1rem + 1.5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.post-author-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1.2rem 0.5rem 0.5rem;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: var(--transition);
  color: inherit;
}

.post-author-bar:hover {
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-info {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.post-author-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg);
  border: 3px solid #ffffff;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.post-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.post-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.post-content p {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.9;
  margin-bottom: 15px;
}

.post-content p + p {
  margin-top: 0;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.8;
  list-style: revert;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  background: rgba(2, 132, 199, 0.04);
  border-left: 4px solid var(--primary);
  padding: 1.2rem 1.5rem;
  border-radius: 0 12px 12px 0;
  margin: 2rem 0;
  font-style: italic;
  color: #475569;
}

.post-content img {
  border-radius: 12px;
  margin: 1.25rem 0;
}

.share-container {
  margin: 0 0 1.5rem;
}

.author-card-box {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  border: 1px solid #bae6fd;
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
}

.author-card-box__avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #ffffff;
  flex-shrink: 0;
  aspect-ratio: 1;
}

.author-card-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card-box__content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.author-card-box__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.author-card-box__name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.author-card-box__name a {
  color: inherit;
}

.author-card-box__name a:hover {
  color: var(--primary);
  text-decoration: none;
}

.author-card-box__desc {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
}

.author-card-box__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  transition: var(--transition);
}

.author-card-box__link:hover {
  gap: 0.6rem;
}

.related-section__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.related-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.2rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.related-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: inherit;
}

.related-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.related-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.related-card:hover .related-card__title {
  color: var(--primary);
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.post-nav__link {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: var(--transition);
  color: inherit;
  text-decoration: none;
}

.post-nav__link:hover {
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}

.post-nav__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.post-nav__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.comment-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 1rem;
  box-shadow: var(--shadow-sm);
}

.comment-box__title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.comment-box__form {
  display: grid;
  gap: 1rem;
}

.comment-box__field {
  display: grid;
  gap: 0.35rem;
}

.comment-box__field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-box__field input,
.comment-box__field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-color);
  font: inherit;
  color: var(--text-main);
}

.comment-box__submit {
  justify-self: start;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  opacity: 0.6;
  cursor: not-allowed;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* ========== 獨立頁 / 線索表單 ========== */
.standalone {
  padding: 2.5rem 0 1rem;
}

.standalone__top h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.standalone__body {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  color: #334155;
  line-height: 1.8;
}

.standalone__body p {
  margin-bottom: 1rem;
}

.stay-touch {
  margin: 2rem 0 4rem;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.stay-touch h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.stay-touch__lead {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.stay-touch__form {
  display: grid;
  gap: 1rem;
}

.stay-touch__field {
  display: grid;
  gap: 0.35rem;
}

.stay-touch__label {
  font-weight: 600;
  font-size: 0.9rem;
}

.stay-touch__form input,
.stay-touch__form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--bg-color);
  font: inherit;
  color: var(--text-main);
}

.stay-touch__form textarea {
  min-height: 6rem;
  resize: vertical;
}

.stay-touch__submit {
  justify-self: start;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.stay-touch__submit:hover {
  background: var(--primary-dark);
}

.stay-touch__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.stay-touch__msg,
.js-stay-touch-msg {
  margin: 0;
  font-size: 0.9rem;
  color: var(--primary);
}

.stay-touch__msg.is-ok,
.js-stay-touch-msg.is-ok {
  color: #15803d;
}

.stay-touch__msg.is-error,
.js-stay-touch-msg.is-error {
  color: #b91c1c;
}

/* ========== 分頁 / 頁尾 ========== */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
  align-items: center;
}

.pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.pager__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.pager__btn--curr {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.pager__btn--off {
  opacity: 0.45;
  pointer-events: none;
}

.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 3rem 0;
  margin-top: 2rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer__inner a {
  color: var(--text-muted);
}

.site-footer__inner a:hover {
  color: var(--primary);
}

/* ========== 分類 / 更多文章頁沿用網格（未點名改造，僅保留可用樣式） ========== */
.page-list {
  padding: 2.5rem 0 4rem;
}

.page-list__title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

/* ========== RWD ========== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2.5rem;
  }

  .hero__content {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__image-wrapper {
    max-width: 600px;
    margin: 0 auto;
  }

  .categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .author-layout {
    grid-template-columns: 1fr;
  }

  .author-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }

  .author-hero__avatar-wrapper {
    width: 180px;
    margin: 0 auto;
  }

  .author-hero__badge {
    margin: 0 auto;
  }

  .author-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  /* PC 導覽：高度 / 字號 / 顏色 / 排版對齊參考 */
  .site-header {
    height: auto;
    padding: 1rem 0;
  }

  .site-header__inner {
    height: auto;
    min-height: 0;
    gap: 2rem;
  }

  .brand {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: none;
  }

  .nav-panel {
    position: static;
    display: none;
    height: auto;
    max-height: none;
    top: auto;
    right: auto;
    left: auto;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .nav-desktop {
    display: flex;
    gap: 2rem;
  }

  .nav-desktop a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
  }

  .nav-desktop a:hover,
  .nav-desktop a[aria-current="page"] {
    color: var(--primary);
  }

  .nav-cta {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
  }

  .post-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .wrapper,
  .wrapper--author,
  .wrapper--detail {
    width: min(100% - 2rem, var(--max-width));
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .categories {
    grid-template-columns: 1fr;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .author-teaser {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .author-teaser__avatar {
    width: 120px;
    height: 120px;
  }

  .author-stats {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-content {
    padding: 1.5rem;
  }

  .post-content p {
    font-size: 1.125rem; /* 18px */
    margin-bottom: 15px;
  }

  .author-card-box {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .section__title {
    font-size: 1.5rem;
  }

  .content-card {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .article-card:hover,
  .category-card:hover,
  .hero__image-wrapper:hover img,
  .article-card:hover .article-card__img-wrap img {
    transform: none;
  }
}

/* ========== 未點名頁面兼容（分類 / 更多 / 全部 / 側欄） ========== */
.page-head { margin: 0 0 1.5rem; }
.page-head__title { font-size: 2rem; font-weight: 800; }
.page-head__desc { margin-top: 0.75rem; color: var(--text-muted); }

.layout {
  display: grid;
  gap: 2rem;
  padding: 0 0 3rem;
}
.layout__main { min-width: 0; }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar__block {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.side-list { display: grid; gap: 1rem; }
.cat-list { display: grid; gap: 0.5rem; }
.cat-list a { color: var(--text-main); font-weight: 600; }
.cat-list a:hover { color: var(--primary); text-decoration: none; }
.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--text-main);
}
.author-head { display: flex; gap: 0.85rem; align-items: flex-start; }
.author-head__avatar {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; aspect-ratio: 1;
}
.author-head__avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-head__name { font-weight: 700; margin: 0 0 0.25rem; }
.author-head__name a { color: var(--text-main); }
.author-head__bio { font-size: 0.9rem; color: var(--text-muted); }

.bento-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card__kicker {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  background: rgba(2, 132, 199, 0.08);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}
.card__kicker:hover { text-decoration: none; }
.card__head { display: flex; gap: 0.75rem; align-items: flex-start; }
.card__title { font-size: 1.1rem; font-weight: 700; flex: 1; }
.card__title a { color: var(--text-main); }
.card__title a:hover { color: var(--primary); text-decoration: none; }
.card__arrow {
  width: 2rem; height: 2rem; flex-shrink: 0;
  display: grid; place-items: center; color: var(--primary);
}
.card__arrow svg { width: 1rem; height: 1rem; }
.card__excerpt { color: var(--text-muted); font-size: 0.95rem; }
.card__meta { color: var(--text-muted); font-size: 0.85rem; }
.row-card { flex-direction: column; }
.row-card .card__media { aspect-ratio: 16 / 10; }

.log { padding: 0 0 3rem; }
.log__era {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--primary);
}
.log__row {
  display: block;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--card-border);
  color: var(--text-main);
  font-weight: 600;
}
.log__row:hover { color: var(--primary); text-decoration: none; }

.reveal { opacity: 1; transform: none; }

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  .layout--sidebar-left {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .layout--sidebar-left .sidebar { order: -1; }
  .bento-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-card {
    flex-direction: row;
    align-items: stretch;
  }
  .row-card .card__media {
    width: 42%;
    max-width: 280px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
  }
}