/* 晨訊 · Global Pulse — 共用樣式
   視覺規格來源：design-export/DESIGN_LOG.md（從 claude.ai/design 原型拆解重寫，
   非 DC 樣板格式，純 CSS，可直接部署）。 */

@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aurora1 { 0% { transform: translate(-20%, -10%) rotate(-8deg) scaleY(1); opacity: 0.55; } 50% { transform: translate(15%, 5%) rotate(6deg) scaleY(1.3); opacity: 0.85; } 100% { transform: translate(-20%, -10%) rotate(-8deg) scaleY(1); opacity: 0.55; } }
@keyframes aurora2 { 0% { transform: translate(20%, 10%) rotate(10deg) scaleY(1.1); opacity: 0.5; } 50% { transform: translate(-15%, -8%) rotate(-6deg) scaleY(1.4); opacity: 0.8; } 100% { transform: translate(20%, 10%) rotate(10deg) scaleY(1.1); opacity: 0.5; } }
@keyframes aurora3 { 0% { transform: translate(-10%, 15%) rotate(4deg) scaleY(1); opacity: 0.45; } 50% { transform: translate(12%, -10%) rotate(-10deg) scaleY(1.25); opacity: 0.75; } 100% { transform: translate(-10%, 15%) rotate(4deg) scaleY(1); opacity: 0.45; } }
@keyframes breathe { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes card-pop { 0% { opacity: 0; transform: translateY(18px) scale(0.8); } 60% { opacity: 1; transform: translateY(-3px) scale(1.04); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: oklch(0.16 0.018 255); font-family: 'Inter', 'Noto Sans TC', sans-serif; }
a { color: oklch(0.78 0.13 200); }
a:hover { color: oklch(0.85 0.14 200); }
::selection { background: oklch(0.55 0.15 200 / 0.4); }

.app-bg {
  width: 100%; height: 100vh; position: relative; display: flex; flex-direction: column;
  background: linear-gradient(135deg, #B598D6 12.5%, #6B4A9E 37.5%, #2C2456 62.5%, #0D0A1F 87.5%);
  color: oklch(0.95 0.008 255); overflow: hidden;
}
.bg-overlay {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(160deg, #0D0A1F 0%, #080614 100%); opacity: 0.75;
}
.aurora-wrap { position: absolute; inset: -25%; z-index: 0; overflow: hidden; pointer-events: none; filter: blur(60px); }
.aurora { position: absolute; border-radius: 50%; transform-origin: center; }
.aurora-1 { top: -15%; left: 5%; width: 70%; height: 90%; background: linear-gradient(180deg, #E8D5F5, #C9A8E8 40%, transparent 70%); animation: aurora1 13s ease-in-out infinite, breathe 6s ease-in-out infinite; }
.aurora-2 { top: -10%; right: 0%; width: 60%; height: 100%; background: linear-gradient(190deg, #C9A8E8, #8A64C4 45%, transparent 65%); animation: aurora2 15s ease-in-out infinite, breathe 8s ease-in-out infinite 1s; }
.aurora-3 { bottom: -20%; left: 20%; width: 65%; height: 85%; background: linear-gradient(170deg, #8A64C4, #4A3D80 45%, transparent 70%); animation: aurora3 17s ease-in-out infinite, breathe 7s ease-in-out infinite 2s; }
.aurora-4 { top: 20%; left: -10%; width: 50%; height: 70%; background: linear-gradient(200deg, #E8D5F5, #C9A8E8 40%, transparent 60%); animation: aurora2 11s ease-in-out infinite reverse, breathe 9s ease-in-out infinite 0.5s; }

.app-layer { position: relative; z-index: 1; display: contents; }

.app-header {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid oklch(0.4 0.02 255 / 0.25);
  background: oklch(0.17 0.02 255 / 0.6); backdrop-filter: blur(12px);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.logo {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, oklch(0.7 0.16 200), oklch(0.55 0.18 250));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: oklch(0.15 0.01 255);
}
.brand-title { font-size: 18px; font-weight: 700; letter-spacing: 0.3px; }
.brand-sub { font-size: 11.5px; color: oklch(0.7 0.02 255); letter-spacing: 0.5px; }
.page-nav { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-pill {
  font-size: 12px; font-weight: 600; padding: 5px 14px; border-radius: 20px;
  background: oklch(0.3 0.02 255 / 0.3); color: oklch(0.85 0.02 255);
  border: 1px solid oklch(0.9 0.005 255 / 0.5); text-decoration: none;
}
.nav-pill--active { background: oklch(0.32 0.06 195 / 0.45); color: oklch(0.95 0.1 195); }
.header-right { display: flex; align-items: center; gap: 22px; }
.push-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; color: oklch(0.78 0.03 255); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.78 0.17 145); animation: pulse-dot 2s infinite ease-in-out; display: inline-block; }
.clock { font-size: 13px; font-family: 'Inter', monospace; color: oklch(0.85 0.03 255); letter-spacing: 0.5px; }

.layout-grid { flex: 1; min-height: 0; display: grid; gap: 1px; background: oklch(0.4 0.02 255 / 0.15); }
.layout-grid--news { grid-template-columns: 27.5fr 27.5fr 45fr; }
.layout-grid--deepdive { grid-template-columns: 40fr 60fr; }

.news-col { min-height: 0; display: flex; flex-direction: column; background: oklch(0.18 0.02 210 / 0.35); backdrop-filter: blur(6px); }
.news-col--intl { background: oklch(0.17 0.02 195 / 0.3); }
.col-head { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 16px 22px 12px; }
.col-accent { width: 6px; height: 18px; border-radius: 3px; background: oklch(0.75 0.15 200); flex-shrink: 0; }
.col-accent--intl { background: oklch(0.7 0.16 250); }
.col-head h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.5px; white-space: nowrap; }
.badge { font-size: 10.5px; color: oklch(0.65 0.02 255); background: oklch(0.3 0.02 255 / 0.5); padding: 2px 7px; border-radius: 20px; white-space: nowrap; }
.badge--muted { background: none; color: oklch(0.75 0.13 200); padding: 0; }
.col-scroll { flex: 1; overflow-y: auto; padding: 4px 22px 18px; scrollbar-width: thin; scrollbar-color: oklch(0.5 0.05 200 / 0.4) transparent; }

.source-group { margin-top: 14px; }
.source-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; opacity: 0.9; }
.source-logo { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: oklch(0.15 0.01 255); flex-shrink: 0; }
.source-name { font-size: 14px; font-weight: 600; color: oklch(0.98 0.003 255); }

.card {
  padding: 14px 16px; border-radius: 16px; margin-bottom: 12px; cursor: pointer;
  transition: transform 0.3s ease-out, background 0.15s ease;
  backdrop-filter: blur(18px) saturate(140%);
  animation: card-pop 0.35s cubic-bezier(.22, 1, .36, 1) both;
  border: 1px solid oklch(0.85 0.005 255 / 0.5);
  background: linear-gradient(155deg, oklch(0.24 0.03 210 / 0.35), oklch(0.15 0.02 230 / 0.3));
  box-shadow: inset 0 1.5px 0 oklch(0.95 0.002 255 / 0.6), inset 0 0 0 1px oklch(0.8 0.005 255 / 0.28), 0 6px 18px oklch(0 0 0 / 0.4);
}
.card:hover { transform: scale(1.05); }
.card.is-selected {
  border-color: oklch(0.9 0.005 255 / 0.8);
  background: linear-gradient(155deg, oklch(0.32 0.06 195 / 0.4), oklch(0.2 0.04 230 / 0.35));
  box-shadow: inset 0 1.5px 0 oklch(0.98 0.002 255 / 0.9), inset 0 0 0 1px oklch(0.9 0.005 255 / 0.5),
    0 10px 28px oklch(0 0 0 / 0.5), 0 0 8px oklch(0.85 0.13 200 / 0.6), 0 0 34px oklch(0.75 0.15 200 / 0.55), 0 0 60px oklch(0.7 0.14 200 / 0.3);
}
.card--deepdive { padding: 16px 18px; }
.card-top-row { display: flex; align-items: center; gap: 8px; }
.card-time { font-size: 11px; color: oklch(0.85 0.15 200); }
.card-translated-badge { font-size: 10px; color: oklch(0.6 0.02 255); border: 1px solid oklch(0.5 0.02 255 / 0.4); padding: 1px 6px; border-radius: 10px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.5; margin-top: 4px; }
.card-original-title { font-size: 11px; color: oklch(0.82 0.005 255); margin-top: 2px; }
.card-summary {
  font-size: 12.5px; color: oklch(0.85 0.015 255); line-height: 1.5; margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card--deepdive .card-summary { -webkit-line-clamp: 3; }
.card-tags { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.card-meta-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.card-meta { font-size: 11px; color: oklch(0.65 0.02 255); }
.card-source-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-source-name { font-size: 12.5px; font-weight: 600; color: oklch(0.98 0.003 255); }
.card-time--right { font-size: 11px; color: oklch(0.85 0.15 200); margin-left: auto; }

.detail-pane { min-height: 0; display: flex; flex-direction: column; background: oklch(0.16 0.02 220 / 0.32); backdrop-filter: blur(6px); }
.detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: oklch(0.55 0.02 255); }
.empty-icon { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid oklch(0.5 0.02 255 / 0.4); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.empty-label { font-size: 13.5px; }

.detail-body { flex: 1; overflow-y: auto; padding: 26px 30px 40px; scrollbar-width: thin; scrollbar-color: oklch(0.5 0.05 200 / 0.4) transparent; animation: fade-in 0.3s ease; }
.detail-body--deepdive { padding: 26px 34px 40px; }
.detail-source-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.detail-source-logo { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: oklch(0.15 0.01 255); flex-shrink: 0; }
.detail-source-name { font-size: 13px; font-weight: 600; color: oklch(0.85 0.02 255); }
.detail-title { font-size: 23px; line-height: 1.4; margin: 0 0 8px; font-weight: 800; }
.detail-title--deepdive { font-size: 24px; }
.detail-original-title { font-size: 12.5px; color: oklch(0.82 0.005 255); margin-bottom: 16px; }
.detail-meta-row { margin-bottom: 22px; display: flex; align-items: center; gap: 14px; }
.detail-time { font-size: 13px; font-weight: 700; color: oklch(0.85 0.16 95); }
.detail-author { font-size: 13px; color: oklch(0.98 0.003 255); }
.detail-link { font-size: 13px; font-weight: 700; color: oklch(0.78 0.13 200); text-decoration: underline; display: inline-flex; align-items: center; gap: 6px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }
.detail-section { margin-bottom: 20px; }
.detail-section h3 { font-size: 18.5px; font-weight: 700; color: oklch(0.88 0.15 200); margin: 0 0 8px; letter-spacing: 0.3px; }
.detail-section p { font-size: 16px; line-height: 1.85; color: oklch(0.98 0.003 255); margin: 0; text-wrap: pretty; }
.original-block { margin-top: 8px; padding-top: 20px; position: relative; }
.original-block::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, oklch(0.75 0.15 200), oklch(0.7 0.16 280), oklch(0.75 0.18 30), transparent);
}
.original-block h3 { font-size: 14px; font-weight: 700; color: oklch(0.85 0.16 95); margin: 0 0 10px; letter-spacing: 0.5px; }
.original-title { font-size: 17px; font-weight: 700; color: oklch(0.95 0.005 255); line-height: 1.6; margin: 0 0 10px; }
.original-text { font-size: 15px; color: oklch(0.98 0.003 255); line-height: 1.9; margin: 0; white-space: pre-line; }
.original-placeholder { font-size: 13px; color: oklch(0.55 0.015 255); line-height: 1.8; margin: 0; font-family: ui-monospace, monospace; }
