/* =====================================================================
   UFOTALK 幽浮語錄 — 宇宙星光銀河主題
   色彩：深空藍黑底 ＋ 星光白、星雲紫、極光青、星塵金
   ===================================================================== */

:root {
  color-scheme: dark;

  --bg: #04050d;
  --bg-2: #080b1f;
  --surface: rgba(14, 19, 46, 0.62);
  --surface-2: rgba(22, 29, 66, 0.72);
  --surface-solid: #0b1029;
  --line: rgba(160, 174, 255, 0.14);
  --line-strong: rgba(160, 174, 255, 0.3);

  --text: #e9ecff;
  --text-2: #b3badb;
  --muted: #7f88ad;

  --cyan: #67e8f9;
  --violet: #a78bfa;
  --pink: #f0abfc;
  --gold: #fcd34d;
  --star: #fff6d6;
  --grad: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink));

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 14px 40px -16px rgba(0, 0, 0, 0.8);
  --glow: 0 0 0 1px rgba(167, 139, 250, 0.4), 0 16px 44px -14px rgba(103, 232, 249, 0.38);

  --font: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --font-display: 'Orbitron', var(--font);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

::selection {
  background: rgba(167, 139, 250, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.container {
  width: min(1240px, 100% - 32px);
  margin-inline: auto;
}

.clamp-2,
.card-title,
.slide-summary,
.title-list a,
.rank-list a,
.topic-lead h4,
.topic-lead p,
.topic-list h4,
.card-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* ---------------- 星空背景 ---------------- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.nebula {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60vw 42vw at 88% -8%, rgba(124, 58, 237, 0.3), transparent 62%),
    radial-gradient(52vw 36vw at -12% 32%, rgba(14, 165, 233, 0.17), transparent 62%),
    radial-gradient(46vw 32vw at 72% 88%, rgba(236, 72, 153, 0.12), transparent 62%),
    radial-gradient(30vw 20vw at 30% 70%, rgba(252, 211, 77, 0.05), transparent 60%),
    linear-gradient(180deg, #04050d 0%, #070a1d 50%, #04050d 100%);
}

/* ---------------- 頂部資訊列 ---------------- */
.topbar {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(3, 4, 12, 0.6);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 36px;
}

.topbar-moon b {
  color: var(--star);
  font-weight: 500;
}

.topbar-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-links > a:hover {
  color: var(--cyan);
}

.topbar-social {
  display: flex;
  gap: 4px;
}

.topbar-social .social-btn {
  width: 26px;
  height: 26px;
  border: 0;
  font-size: 13px;
}

/* ---------------- 頁首導覽 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 7, 18, 0.74);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s, background 0.3s;
}

.site-header.scrolled {
  background: rgba(5, 7, 18, 0.88);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.8);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 0 10px rgba(103, 232, 249, 0.35));
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text b {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text small {
  font-size: 12.5px;
  letter-spacing: 0.42em;
  color: var(--text-2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
  color: #fff;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--cat, var(--cyan));
  box-shadow: 0 0 10px var(--cat, var(--cyan));
  transform: scaleX(0);
  transition: transform 0.25s;
}

.main-nav a.active::after,
.main-nav a:hover::after {
  transform: scaleX(1);
}

.nav-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 18px;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.icon-btn:hover {
  color: var(--cyan);
  border-color: rgba(103, 232, 249, 0.5);
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.25);
}

.menu-btn {
  display: none;
}

/* ---------------- 快訊跑馬燈 ---------------- */
.ticker {
  background: rgba(8, 11, 30, 0.7);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 42px;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #0a0b1a;
  background: var(--grad);
}

.ticker-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0a0b1a;
  animation: blink 1.2s infinite;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.ticker-move {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  animation: ticker var(--dur, 60s) linear infinite;
}

.ticker-track:hover .ticker-move {
  animation-play-state: paused;
}

.ticker-move a {
  color: var(--text-2);
}

.ticker-move a:hover {
  color: #fff;
}

.ticker-time {
  margin-right: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--cyan);
}

.ticker-sep {
  color: var(--gold);
  font-size: 11px;
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

/* ---------------- 行動版側邊選單 ---------------- */
.drawer,
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  transition: visibility 0s 0.35s;
}

.drawer.open,
.search-modal.open {
  visibility: visible;
  transition: none;
}

.drawer-backdrop,
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 10, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s;
}

.open .drawer-backdrop,
.open .search-backdrop {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(330px, 86vw);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1029, #060819);
  border-left: 1px solid var(--line-strong);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
}

.drawer.open .drawer-panel {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-head .logo-mark {
  width: 38px;
  height: 38px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-2);
}

.drawer-nav a small {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.drawer-nav a:hover,
.drawer-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.drawer-ico {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
  color: var(--cat, var(--gold));
  background: color-mix(in srgb, var(--cat, var(--gold)) 14%, transparent);
}

.drawer-foot {
  margin-top: auto;
  display: flex;
  gap: 8px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

/* ---------------- 搜尋視窗 ---------------- */
.search-box {
  position: relative;
  width: min(680px, 100% - 32px);
  margin: 12vh auto 0;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(160deg, #0f1536, #080b20);
  border: 1px solid var(--line-strong);
  box-shadow: var(--glow);
  transform: translateY(-16px);
  opacity: 0;
  transition: transform 0.35s, opacity 0.35s;
}

.search-modal.open .search-box {
  transform: none;
  opacity: 1;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 20px;
  color: var(--muted);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

.search-hot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13.5px;
}

.search-hot span {
  color: var(--muted);
  margin-right: 4px;
}

.search-hot a {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-2);
}

.search-hot a:hover {
  color: #fff;
  border-color: var(--violet);
}

.search-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--surface-solid);
}

/* ---------------- 按鈕 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 0;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #0a0b1a;
  background: var(--grad);
  box-shadow: 0 6px 24px -8px rgba(167, 139, 250, 0.8);
}

.btn-glow {
  color: #fff;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(9, 12, 32, 0.85), rgba(9, 12, 32, 0.85)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 22px -6px rgba(103, 232, 249, 0.55);
}

.btn-glow:hover {
  box-shadow: 0 0 30px -4px rgba(167, 139, 250, 0.75);
}

.btn .icon {
  transition: transform 0.2s;
}

.btn:hover .icon {
  transform: translateX(3px);
}

/* ---------------- 分類標籤 ---------------- */
.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cat, var(--violet));
  background: color-mix(in srgb, var(--cat, var(--violet)) 16%, rgba(5, 7, 18, 0.78));
  border: 1px solid color-mix(in srgb, var(--cat, var(--violet)) 50%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cat-badge:hover {
  color: #fff;
}

/* ---------------- Slider ---------------- */
.hero {
  margin-top: 24px;
}

.slider {
  position: relative;
  height: clamp(380px, 46vw, 560px);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-solid);
  box-shadow: 0 30px 80px -30px rgba(124, 58, 237, 0.55), 0 0 0 1px rgba(103, 232, 249, 0.06);
  touch-action: pan-y;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity 0.9s ease;
}

.slide-media,
.slide-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slide-media img {
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 7s ease-out;
  -webkit-user-drag: none;
  user-select: none;
}

.slide.is-active .slide-media img {
  transform: scale(1);
}

.slide-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 5, 13, 0.94) 0%, rgba(4, 5, 13, 0.62) 42%, rgba(4, 5, 13, 0.05) 78%),
    linear-gradient(0deg, rgba(4, 5, 13, 0.95) 0%, rgba(4, 5, 13, 0) 48%);
}

.slide-body {
  position: absolute;
  left: 52px;
  bottom: 108px;
  max-width: min(640px, 100% - 104px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.slide.is-active .slide-body > * {
  animation: rise 0.8s both;
}

.slide.is-active .slide-body > :nth-child(2) { animation-delay: 0.08s; }
.slide.is-active .slide-body > :nth-child(3) { animation-delay: 0.16s; }
.slide.is-active .slide-body > :nth-child(4) { animation-delay: 0.24s; }
.slide.is-active .slide-body > :nth-child(5) { animation-delay: 0.32s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

.slide-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
}

.headline-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-shadow: 0 0 12px rgba(252, 211, 77, 0.6);
}

.headline-tag .icon {
  fill: currentColor;
}

.slide-title,
.article-head h1,
.cta-text h2 {
  text-wrap: balance;
}

.card-title,
.topic-lead h4,
.topic-list h4,
.title-list a,
.rank-list a {
  text-wrap: pretty;
}

.slide-title {
  font-size: clamp(23px, 3.1vw, 40px);
  font-weight: 900;
  line-height: 1.32;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}

.slide-title a:hover {
  color: var(--cyan);
}

.slide-summary {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.75;
}

.slider-arrow {
  position: absolute;
  top: 42%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 18, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.3s, border-color 0.2s, box-shadow 0.2s;
}

.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider:hover .slider-arrow,
.slider-arrow:focus-visible {
  opacity: 1;
}

.slider-arrow:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.4);
}

.slider-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(4, 5, 13, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slider-tab {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px 15px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  text-align: left;
  color: var(--muted);
  transition: color 0.3s, background 0.3s;
}

.slider-tab:first-child {
  border-left: 0;
}

.slider-tab:hover {
  color: var(--text-2);
}

.slider-tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.14), transparent);
}

.tab-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  opacity: 0.7;
}

.is-active .tab-num {
  opacity: 1;
  text-shadow: 0 0 10px var(--cyan);
}

.tab-title {
  font-size: 13.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.tab-progress {
  position: absolute;
  top: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--grad);
  box-shadow: 0 0 10px var(--violet);
}

.slider-tab.is-active .tab-progress {
  animation: progress 6.5s linear forwards;
}

.slider.paused .tab-progress {
  animation-play-state: paused !important;
}

.slider.no-autoplay .tab-progress {
  animation: none !important;
  width: 100%;
}

@keyframes progress {
  to {
    width: 100%;
  }
}

/* ---------------- 區塊標題 ---------------- */
.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.section-head h2::before {
  content: '';
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  background: var(--grad);
  box-shadow: 0 0 14px var(--violet), 0 0 4px var(--cyan);
}

.section-head h2 span {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.32em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------- 主欄 + 側欄 ---------------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  margin-top: 44px;
}

.panel {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  font-weight: 900;
}

.panel-title span {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.pulse {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  animation: ripple 1.8s ease-out infinite;
}

@keyframes ripple {
  to {
    transform: scale(3);
    opacity: 0;
  }
}

/* 純標題快訊（時間軸，圓點顏色＝話題分類色） */
.title-list li {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 0 8px;
  align-items: baseline;
  padding: 11px 0 11px 18px;
  border-bottom: 1px dashed var(--line);
}

.title-list li:last-child {
  border-bottom: 0;
}

.title-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat, var(--star));
  box-shadow: 0 0 9px var(--cat, var(--star));
}

.title-list li::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 31px;
  bottom: -12px;
  width: 1px;
  background: linear-gradient(var(--line-strong), transparent);
}

.title-list li:last-child::after {
  display: none;
}

.title-list time {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--cyan);
  white-space: nowrap;
}

.title-list a {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.title-list a:hover {
  color: var(--cyan);
}

/* 熱門排行 */
.rank-list li {
  display: flex;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}

.rank-list li:last-child {
  border-bottom: 0;
}

.rank {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.rank-1 { color: #1a1300; background: linear-gradient(135deg, #fde68a, #f59e0b); border: 0; box-shadow: 0 0 16px rgba(252, 211, 77, 0.5); }
.rank-2 { color: #021a1f; background: linear-gradient(135deg, #a5f3fc, #22d3ee); border: 0; box-shadow: 0 0 14px rgba(103, 232, 249, 0.4); }
.rank-3 { color: #1a0b2e; background: linear-gradient(135deg, #f0abfc, #a78bfa); border: 0; box-shadow: 0 0 14px rgba(167, 139, 250, 0.45); }

.rank-list a {
  font-size: 15px;
  line-height: 1.55;
}

.rank-list a:hover {
  color: var(--cyan);
}

.rank-list small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------- 新聞卡片 ---------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.35s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: var(--glow);
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-solid);
}

.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(4, 5, 13, 0.55), transparent 45%);
  pointer-events: none;
}

.card-media img,
.topic-lead-media img,
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card-media img,
.topic-lead:hover img,
.topic-list li:hover img {
  transform: scale(1.07);
}

.card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.55;
}

.card-title a:hover {
  color: var(--cyan);
}

.card-summary {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-top: auto;
  font-size: 12.5px;
  color: var(--muted);
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.slide-body .meta {
  margin-top: 0;
  font-size: 13.5px;
  color: var(--text-2);
}

/* ---------------- 星際話題（各分類 4 則） ---------------- */
.topics {
  margin-top: 64px;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.topic {
  position: relative;
  padding: 20px 22px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}

.topic::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cat), transparent 75%);
  box-shadow: 0 0 16px var(--cat);
}

.topic::after {
  content: '';
  position: absolute;
  z-index: -1;
  top: -120px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--cat) 22%, transparent), transparent 70%);
  pointer-events: none;
}

.topic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.topic-ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 20px;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 40%, transparent);
  box-shadow: 0 0 18px -4px var(--cat);
}

.topic-head h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 21px;
  font-weight: 900;
}

.topic-head h3 a:hover {
  color: var(--cat);
}

.topic-head h3 small {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--cat);
  opacity: 0.85;
}

.topic-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}

.topic-more:hover {
  color: var(--cat);
  border-color: color-mix(in srgb, var(--cat) 60%, transparent);
}

.topic {
  container-type: inline-size;
}

.topic-body {
  display: grid;
  gap: 16px;
}

/* 話題區塊夠寬時：左邊主圖新聞、右邊 3 則清單 */
@container (min-width: 540px) {
  .topic .topic-body {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 22px;
  }

  .topic .topic-list {
    align-content: start;
    border-top: 0;
  }

  .topic .topic-list li {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .topic .topic-list li:first-child {
    padding-top: 0;
  }

  .topic .topic-list h4 {
    font-size: 14.5px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

.topic-lead-media {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-solid);
}

.topic-lead h4 {
  margin: 12px 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.topic-lead h4 a:hover,
.topic-list h4 a:hover {
  color: var(--cat);
}

.topic-lead p {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.topic-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.topic-list li {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.topic-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.thumb {
  display: block;
  aspect-ratio: 3 / 2;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-solid);
}

.topic-list h4 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.topic-list time {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------------- 目擊通報 CTA ---------------- */
.cta-band {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 64px;
  padding: 34px 40px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.38);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(103, 232, 249, 0.16), transparent 55%),
    radial-gradient(120% 140% at 100% 100%, rgba(240, 171, 252, 0.16), transparent 55%),
    var(--surface);
  box-shadow: 0 24px 60px -30px rgba(124, 58, 237, 0.7);
}

.cta-ufo {
  flex-shrink: 0;
  width: 116px;
  height: 116px;
  background: url('../images/ufo.svg') center / contain no-repeat;
  filter: drop-shadow(0 0 18px rgba(103, 232, 249, 0.45));
  animation: hover 4s ease-in-out infinite;
}

@keyframes hover {
  50% {
    transform: translateY(-8px) rotate(-3deg);
  }
}

.cta-text h2 {
  margin-bottom: 6px;
  font-size: 25px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cta-text p {
  max-width: 640px;
  color: var(--text-2);
  font-size: 15px;
}

.cta-band .btn {
  margin-left: auto;
}

/* ---------------- 頁尾 ---------------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  background: linear-gradient(180deg, rgba(8, 11, 31, 0.55), rgba(3, 4, 10, 0.96) 40%);
  border-top: 1px solid var(--line);
}

.footer-glow {
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--grad);
  box-shadow: 0 0 22px 2px rgba(167, 139, 250, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 56px;
  padding: 60px 0 44px;
}

.footer-about p {
  margin: 18px 0 20px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--text-2);
}

.footer-social,
.drawer-foot {
  display: flex;
  gap: 10px;
}

.social-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 17px;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.social-btn:hover {
  color: #fff;
  border-color: var(--violet);
  background: rgba(167, 139, 250, 0.18);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.45);
}

.social-btn.copied {
  color: #86efac;
  border-color: #86efac;
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: 900;
}

.footer-title::before {
  content: '';
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: var(--grad);
  box-shadow: 0 0 10px var(--violet);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
  color: var(--text-2);
  transition: color 0.2s, transform 0.2s;
}

.footer-links a i {
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--cat, var(--violet));
  box-shadow: 0 0 8px var(--cat, var(--violet));
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(3px);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 14.5px;
  color: var(--text);
}

.contact-list .icon {
  width: 36px;
  height: 36px;
  padding: 9px;
  border-radius: 10px;
  color: var(--cyan);
  background: rgba(103, 232, 249, 0.08);
  border: 1px solid rgba(103, 232, 249, 0.2);
}

.contact-list small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.contact-list a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px 0 22px;
}

/* ---------------- 分類頁 ---------------- */
.page-banner {
  --cat: var(--violet);
  padding: 34px 0 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 140% at 12% 0%, color-mix(in srgb, var(--cat) 24%, transparent), transparent 70%),
    rgba(5, 7, 18, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: var(--muted);
}

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

.banner-title {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner-title.skeleton {
  height: 72px;
  border-radius: 14px;
}

.banner-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  font-size: 34px;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cat) 45%, transparent);
  box-shadow: 0 0 30px -6px var(--cat);
}

.banner-title h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  line-height: 1.3;
}

.banner-title h1 small {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--cat);
}

.banner-title p {
  max-width: 720px;
  margin-top: 6px;
  color: var(--text-2);
}

.inline-search {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.inline-search input {
  width: min(420px, 100%);
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  outline: 0;
}

.inline-search input:focus {
  border-color: var(--cyan);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a,
.pagination span {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 14px;
}

.pagination a:hover {
  border-color: var(--violet);
  color: #fff;
}

.pagination .current {
  border: 0;
  color: #0a0b1a;
  font-weight: 700;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.5);
}

.cat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
}

.cat-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--text-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.cat-list a .icon {
  color: var(--cat);
}

.cat-list a small {
  display: none;
}

.cat-list a:hover,
.cat-list a.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--cat) 60%, transparent);
  background: color-mix(in srgb, var(--cat) 12%, transparent);
}

/* ---------------- 內文頁 ---------------- */
.article {
  padding: 32px 36px 28px;
}

.article-head h1 {
  margin: 14px 0 16px;
  font-size: clamp(25px, 3.3vw, 36px);
  font-weight: 900;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: var(--muted);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-cover {
  margin: 26px 0 0;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.article-cover figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.article-lead {
  margin: 28px 0 8px;
  padding: 16px 20px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.08), rgba(167, 139, 250, 0.04));
  font-size: 17px;
  line-height: 1.9;
  font-weight: 500;
}

.article-content {
  margin-top: 24px;
  font-size: 17px;
  line-height: 2;
  color: #d5daf3;
}

.article-content p {
  margin: 0 0 1.3em;
}

.article-content h2,
.article-content h3 {
  margin: 1.6em 0 0.7em;
  font-size: 21px;
  font-weight: 900;
  color: var(--text);
}

.article-content h2::before,
.article-content h3::before {
  content: '✦ ';
  color: var(--gold);
}

.article-content blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 3px solid var(--violet);
  border-radius: 0 12px 12px 0;
  background: rgba(167, 139, 250, 0.08);
  color: var(--text);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content img {
  height: auto;
  margin: 1.4em auto;
  border-radius: 12px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 1.3em;
  padding-left: 1.4em;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  color: var(--muted);
}

.article-tags a {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13.5px;
  color: var(--text-2);
}

.article-tags a:hover {
  color: #fff;
  border-color: var(--cyan);
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.article-share > span {
  margin-right: 6px;
  font-size: 14px;
  color: var(--muted);
}

#related {
  margin-top: 40px;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 18px;
}

.related-grid .card-title {
  font-size: 15px;
}

/* ---------------- 回到頂端 ---------------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(9, 12, 32, 0.9), rgba(9, 12, 32, 0.9)) padding-box,
    var(--grad) border-box;
  font-size: 22px;
  box-shadow: 0 0 22px -4px rgba(167, 139, 250, 0.6);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.to-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------------- 載入骨架與錯誤 ---------------- */
.skeleton .sk-media,
.skeleton .sk-line,
.sk-media,
.sk-line,
.slider.skeleton,
.banner-title.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.sk-media {
  aspect-ratio: 16 / 10;
}

.sk-line {
  height: 14px;
  margin: 14px 16px;
  border-radius: 6px;
}

.sk-line.short {
  width: 45%;
}

.article .sk-media {
  margin-top: 20px;
  border-radius: 14px;
  aspect-ratio: 16 / 9;
}

.article .sk-line {
  margin: 14px 0;
}

.title-list li.skeleton::before,
.title-list li.skeleton::after {
  display: none;
}

.title-list li.skeleton .sk-line {
  grid-column: 1 / -1;
  margin: 4px 0;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.error-box {
  grid-column: 1 / -1;
  padding: 56px 20px;
  text-align: center;
  color: var(--text-2);
}

.error-box .icon {
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  color: var(--cyan);
  filter: drop-shadow(0 0 14px var(--cyan));
  animation: hover 4s ease-in-out infinite;
}

/* =====================================================================
   響應式
   ===================================================================== */
@media (max-width: 1180px) {
  .main-nav a {
    padding: 8px 9px;
    font-size: 14.5px;
  }

  .navbar {
    gap: 18px;
  }
}

@media (max-width: 1080px) {
  .main-nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: start;
  }
}

@media (max-width: 960px) {
  .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .topbar-links {
    display: none;
  }

  .navbar {
    height: 64px;
  }

  .logo-mark {
    width: 40px;
    height: 40px;
  }

  .logo-text b {
    font-size: 18px;
  }

  .logo-text small {
    font-size: 11.5px;
  }

  .hero {
    margin-top: 16px;
  }

  .slider {
    height: clamp(420px, 118vw, 520px);
    border-radius: 18px;
  }

  .slide-shade {
    background: linear-gradient(0deg, rgba(4, 5, 13, 0.97) 0%, rgba(4, 5, 13, 0.75) 45%, rgba(4, 5, 13, 0.1) 80%);
  }

  .slide-body {
    left: 20px;
    right: 20px;
    bottom: 48px;
    max-width: none;
    gap: 10px;
  }

  .slide-summary {
    font-size: 14.5px;
  }

  .slide-body .btn {
    display: none;
  }

  .slider-arrow {
    display: none;
  }

  .slider-tabs {
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    border: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .slider-tab {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: width 0.3s, background 0.3s;
  }

  .slider-tab.is-active {
    width: 30px;
    background: rgba(255, 255, 255, 0.22);
  }

  .tab-num,
  .tab-title {
    display: none;
  }

  .tab-progress {
    top: 0;
    height: 100%;
  }

  .layout {
    margin-top: 32px;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .section-head p {
    margin-left: 0;
    flex-basis: 100%;
  }

  .topics {
    margin-top: 48px;
  }

  .topic {
    padding: 18px 16px 16px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 26px 22px;
  }

  .cta-ufo {
    width: 84px;
    height: 84px;
  }

  .cta-band .btn {
    margin-left: 0;
  }

  .article {
    padding: 22px 18px 20px;
  }

  .article-content {
    font-size: 16.5px;
  }

  .banner-ico {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 16px;
  }
}

@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .featured-grid .card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .featured-grid .card-media {
    aspect-ratio: auto;
    height: 100%;
    min-height: 96px;
  }

  .featured-grid .card-cat {
    top: 8px;
    left: 8px;
    padding: 1px 8px;
    font-size: 11px;
  }

  .featured-grid .card-body {
    padding: 10px 12px;
    gap: 6px;
  }

  .featured-grid .card-title {
    font-size: 15px;
  }

  .featured-grid .card.skeleton {
    display: block;
  }

  .side-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 48px;
  }

  .footer-bottom-inner {
    flex-direction: column;
  }

  .topbar-moon {
    margin-left: auto;
  }

  .search-box {
    padding: 20px 16px;
  }

  .search-form .btn {
    padding: 10px 16px;
  }

  .inline-search {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 420px) {
  .topic-list li {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
  }

  .topbar-date {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .ticker-move {
    animation: none !important;
  }
}

/* =====================================================================
   新聞站擴充：關鍵字、YouTube、來源區塊、圖片集
   ===================================================================== */
.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
}

.keyword-cloud a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13.5px;
  color: var(--text-2);
}

.keyword-cloud a small {
  font-family: var(--font-display);
  font-size: 10.5px;
  color: var(--muted);
}

.keyword-cloud a:hover {
  color: #fff;
  border-color: var(--cyan);
}

.banner-keywords {
  margin-top: 18px;
}

.video-embed {
  position: relative;
  margin: 24px 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.article-gallery figure {
  margin: 0;
}

.article-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.article-gallery figcaption {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.source-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 14px;
  border: 1px solid rgba(103, 232, 249, 0.3);
  background: linear-gradient(120deg, rgba(103, 232, 249, 0.08), rgba(167, 139, 250, 0.06));
}

.source-box > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.source-box small {
  font-size: 12px;
  color: var(--muted);
}

.source-box b {
  font-size: 18px;
}

.source-box span {
  font-size: 13.5px;
  color: var(--text-2);
}

.source-box .btn {
  margin-left: auto;
}

.source-box p {
  flex-basis: 100%;
  font-size: 12.5px;
  color: var(--muted);
}

.pagination .gap {
  border: 0;
  background: none;
  min-width: 20px;
}

/* ---------- 專家論述 ---------- */
.expert-box,
.quote-box,
.framework-box {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}

.expert-box {
  border-color: rgba(252, 211, 77, 0.4);
  background: linear-gradient(135deg, rgba(252, 211, 77, 0.08), rgba(167, 139, 250, 0.06));
}

.expert-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.expert-head > div {
  display: flex;
  flex-direction: column;
}

.expert-head small {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.expert-head b {
  font-size: 18px;
}

.expert-head span {
  font-size: 13px;
  color: var(--muted);
}

.expert-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(252, 211, 77, 0.6);
  box-shadow: 0 0 18px rgba(252, 211, 77, 0.3);
}

.expert-initial {
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  color: #1a1300;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.expert-body {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--text);
}

.quote-box h3,
.framework-box h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 900;
}

.quote-box h3 small,
.framework-box h3 small {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

.quote-box blockquote {
  margin: 0 0 12px;
  padding: 10px 16px;
  border-left: 3px solid var(--cyan);
  background: rgba(103, 232, 249, 0.05);
  border-radius: 0 10px 10px 0;
}

.quote-box blockquote p {
  margin: 0;
  line-height: 1.85;
}

.quote-box cite {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: normal;
  color: var(--text-2);
}

.framework-box ol {
  margin: 0;
  padding-left: 1.3em;
  line-height: 1.9;
  color: var(--text-2);
}

.framework-box li {
  margin-bottom: 6px;
}

.framework-box li b {
  margin-right: 8px;
  color: var(--violet);
}

.expert-head a { color: inherit; }
.expert-head b a:hover { color: var(--gold); }
.expert-more { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gold) !important; white-space: nowrap; }
.expert-intro { margin: 0 0 10px; color: var(--text-2); line-height: 1.85; }
.expert-method { margin: 0; padding-left: 1.3em; line-height: 1.9; color: var(--text-2); }
.expert-method li { margin-bottom: 6px; }
.expert-method li b { margin-right: 8px; color: var(--gold); }

/* 首頁專家專欄（整條橫幅） */
.expert-column { margin-top: 64px; }
.expert-column-inner {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(252, 211, 77, 0.35);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(252, 211, 77, 0.12), transparent 60%),
    radial-gradient(80% 120% at 100% 100%, rgba(167, 139, 250, 0.12), transparent 60%),
    var(--surface);
  box-shadow: 0 24px 60px -30px rgba(252, 211, 77, 0.35);
}
.expert-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.expert-card small { font-size: 12.5px; letter-spacing: 0.3em; color: var(--gold); }
.expert-card h2 { font-size: 28px; font-weight: 900; }
.expert-card h2 a:hover { color: var(--gold); }
.expert-col-name { color: var(--violet); font-weight: 700; }
.expert-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.85; }
.expert-card .btn { margin-top: 6px; }
.expert-photo {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(252, 211, 77, 0.7);
  box-shadow: 0 0 30px rgba(252, 211, 77, 0.35);
}
.expert-photo.expert-initial { display: grid; place-items: center; font-size: 48px; font-weight: 900; color: #1a1300; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.expert-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pick { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: rgba(5, 7, 18, 0.45); border: 1px solid var(--line); transition: border-color .3s, transform .3s; }
.pick:hover { border-color: rgba(252, 211, 77, 0.5); transform: translateY(-3px); }
.pick-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.pick-media img { width: 100%; height: 100%; object-fit: cover; }
.pick > div { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; align-items: flex-start; }
.pick h3 { font-size: 15px; font-weight: 700; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pick h3 a:hover { color: var(--gold); }
.pick-tag { margin-left: 6px; font-size: 12px; color: var(--gold); }

/* 專家介紹頁 */
.expert-hero { padding: 40px 0 34px; border-bottom: 1px solid var(--line); background: radial-gradient(60% 140% at 10% 0%, rgba(252, 211, 77, 0.14), transparent 70%), rgba(5, 7, 18, 0.35); }
.expert-hero-inner { display: flex; align-items: center; gap: 32px; }
.expert-hero-photo { width: 200px; height: 200px; flex-shrink: 0; border-radius: 50%; object-fit: cover; border: 4px solid rgba(252, 211, 77, 0.7); box-shadow: 0 0 40px rgba(252, 211, 77, 0.35); }
.expert-hero-photo.expert-initial { display: grid; place-items: center; font-size: 72px; font-weight: 900; color: #1a1300; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.expert-role { color: var(--gold); letter-spacing: 0.2em; font-size: 13px; }
.expert-hero h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 900; margin: 4px 0 6px; }
.expert-tagline { color: var(--violet); font-weight: 500; }
.expert-bio { margin-top: 12px; max-width: 760px; color: var(--text-2); line-height: 1.9; }
.expert-section { margin-bottom: 24px; }
.expert-section p { color: var(--text-2); line-height: 1.9; margin-top: 10px; }
.expert-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.expert-steps li { display: flex; gap: 14px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.expert-steps li > span { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; font-family: var(--font-display); font-weight: 700; color: #1a1300; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.expert-steps b { font-size: 16px; }
.expert-steps p { margin: 4px 0 0; }
.expert-bullets { margin: 12px 0 0; padding-left: 1.2em; list-style: disc; color: var(--text-2); line-height: 1.9; }
.expert-admired li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; flex-direction: column; }
.expert-admired li:last-child { border-bottom: 0; }
.expert-admired span { font-size: 13px; color: var(--muted); }
.expert-list { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.expert-list-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; width: 240px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.expert-list-card span { font-size: 13px; color: var(--muted); }

@media (max-width: 1080px) {
  .expert-column-inner { grid-template-columns: minmax(0, 1fr); }
  .expert-card { align-items: center; text-align: center; }
}
@media (max-width: 768px) {
  .expert-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .expert-hero-inner { flex-direction: column; text-align: center; gap: 18px; }
  .expert-hero-photo { width: 150px; height: 150px; }
  .expert-column-inner { padding: 20px 16px; }
}
@media (max-width: 480px) {
  .expert-picks { grid-template-columns: minmax(0, 1fr); }
}
