:root {
  --font-sans: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;

  /* Global transitions for premium feel */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-quick: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Forest Theme (Default): Premium Organic Dark Green & Gold */
body.theme-forest, :root {
  color-scheme: dark;
  --bg: #22271c; /* Organic deep dark olive green */
  --bg-gradient: radial-gradient(circle at 50% -20%, rgba(86, 97, 70, 0.35) 0%, rgba(34, 39, 28, 0) 80%),
                 linear-gradient(180deg, #22271c 0%, #151811 100%);
  --panel: rgba(43, 49, 36, 0.82); /* Dark olive green panel background */
  --panel-hover: rgba(51, 58, 43, 0.92);
  --panel-border: rgba(203, 163, 88, 0.16); /* Warm gold tinted border */
  --panel-border-hover: rgba(203, 163, 88, 0.35);

  --text: #f4efe6; /* Soft alabaster cream */
  --text-secondary: #beb8a9; /* Muted cream-gray */
  --muted: rgba(190, 184, 169, 0.55);
  --line: rgba(203, 163, 88, 0.08);

  --accent: #cba358; /* Warm brass gold */
  --accent-light: rgba(203, 163, 88, 0.08);
  --accent-hover: #e5bf7e; /* Lighter gold */
  --theme-glow: 0 0 20px rgba(203, 163, 88, 0.35);

  --rank-default: #828a77;
  --hot: #bd6247; /* Warm terracotta/rust */
  --warm: #cca258; /* Gold/ochre */
  --gold: #e5bf7e; /* Lighter gold */

  --card-shadow: 0 12px 36px -12px rgba(11, 14, 10, 0.8);
  --card-shadow-hover: 0 24px 48px -15px rgba(11, 14, 10, 0.95), 0 0 30px 2px rgba(203, 163, 88, 0.05);

  --scrollbar-thumb: rgba(203, 163, 88, 0.16);
  --scrollbar-thumb-hover: rgba(203, 163, 88, 0.35);
}

/* 2. Alabaster Theme: Premium Warm Cream & Forest Green */
body.theme-alabaster {
  color-scheme: light;
  --bg: #faf7f2; /* Warm alabaster/parchment paper */
  --bg-gradient: linear-gradient(180deg, #e7dec9 0%, #f4eee0 40%, #faf7f2 100%);
  --panel: rgba(255, 255, 255, 0.88);
  --panel-hover: rgba(255, 255, 255, 0.98);
  --panel-border: rgba(70, 80, 58, 0.14); /* Forest green tinted border */
  --panel-border-hover: rgba(70, 80, 58, 0.3);

  --text: #2c3324; /* Deep forest olive green */
  --text-secondary: #5a664c; /* Muted forest green */
  --muted: rgba(90, 102, 76, 0.6);
  --line: rgba(70, 80, 58, 0.08);

  --accent: #8e6d2e; /* Antique bronze/gold */
  --accent-light: rgba(142, 109, 46, 0.06);
  --accent-hover: #5d471e;
  --theme-glow: 0 0 20px rgba(142, 109, 46, 0.25);

  --rank-default: #5a664c;
  --hot: #a04f38; /* Soft terracotta */
  --warm: #b57c32; /* Soft ochre */
  --gold: #8e6d2e; /* Bronze */

  --card-shadow: 0 12px 30px -10px rgba(90, 102, 76, 0.08);
  --card-shadow-hover: 0 24px 45px -12px rgba(90, 102, 76, 0.16), 0 0 30px 2px rgba(142, 109, 46, 0.03);

  --scrollbar-thumb: rgba(70, 80, 58, 0.18);
  --scrollbar-thumb-hover: rgba(70, 80, 58, 0.35);
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: var(--transition-smooth);
}

/* Organic Grain Overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* Leaf Shadow Background Decor */
.background-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.leaf-shadow {
  position: absolute;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  background: 
    radial-gradient(ellipse at top left, rgba(23, 28, 18, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(23, 28, 18, 0.15) 0%, transparent 50%);
  opacity: 0.85;
  filter: blur(16px);
  mix-blend-mode: multiply;
  transition: opacity 0.5s ease;
}

body.theme-alabaster .leaf-shadow {
  background: 
    radial-gradient(ellipse at top left, rgba(70, 80, 58, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(70, 80, 58, 0.1) 0%, transparent 50%);
  opacity: 0.7;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 42px);
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-smooth);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-serif);
  padding: 0;
  outline: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--bg);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition-quick);
}

.brand:hover .brand-mark {
  transform: rotate(6deg) scale(1.05);
}

.brand-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  background: var(--accent-light);
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  scrollbar-width: none;
  transition: var(--transition-smooth);
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 8px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
  transition: var(--transition-quick);
}

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

.category-tab.is-active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--panel-border);
}

/* Theme Picker */
.theme-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.theme-btn {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s, border-color 0.3s;
  outline: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.theme-btn:hover {
  transform: scale(1.15) translateY(-2px);
}

.theme-btn::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px dashed var(--accent);
  opacity: 0;
  transform: scale(0.9);
  transition: var(--transition-quick);
}

.theme-btn:hover::after {
  opacity: 0.4;
  transform: scale(1);
}

.theme-btn-alabaster {
  background: linear-gradient(135deg, #eae1cd 0%, #fdfbf7 100%);
  border: 1px solid rgba(0,0,0,0.1);
}

.theme-btn-forest {
  background: linear-gradient(135deg, #2b3122 0%, #566146 100%);
  border: 1px solid rgba(255,255,255,0.1);
}

body.theme-alabaster #theme-alabaster {
  border-color: var(--accent);
  box-shadow: var(--theme-glow);
  transform: scale(1.08);
}

body.theme-forest #theme-forest {
  border-color: var(--accent);
  box-shadow: var(--theme-glow);
  transform: scale(1.08);
}

/* Page Shell */
.page-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 42px) 60px;
}

/* Hero Banner split layout */
.hero-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: var(--card-shadow);
  margin-bottom: 40px;
  position: relative;
}

.hero-left {
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--panel-border);
}

.hero-brand {
  position: absolute;
  top: 30px;
  left: 40px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.hero-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.hero-words span {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(10px);
  animation: hero-word-fade 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero-words span:nth-child(1) { animation-delay: 0.1s; }
.hero-words span:nth-child(2) { animation-delay: 0.2s; }
.hero-words span:nth-child(3) { animation-delay: 0.3s; }
.hero-words span:nth-child(4) { animation-delay: 0.4s; }
.hero-words span:nth-child(5) { animation-delay: 0.5s; }
.hero-words span:nth-child(6) { animation-delay: 0.6s; }

@keyframes hero-word-fade {
  to {
    opacity: 0.95;
    transform: translateY(0);
  }
}

.hero-right {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.hero-leaf-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M-10,-10 C20,15 15,45 45,35 C65,25 75,55 95,45 C105,35 115,65 125,55' stroke='none' fill='rgba(23,28,18,0.38)' filter='blur(3px)'/%3E%3Cpath d='M-20,40 Q10,50 25,25 T65,35 T95,5' fill='rgba(23,28,18,0.28)' filter='blur(2.5px)'/%3E%3C/svg%3E");
  background-size: cover;
  mix-blend-mode: multiply;
  z-index: 3;
}

body.theme-alabaster .hero-leaf-overlay {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M-10,-10 C20,15 15,45 45,35 C65,25 75,55 95,45 C105,35 115,65 125,55' stroke='none' fill='rgba(70,80,58,0.22)' filter='blur(3px)'/%3E%3Cpath d='M-20,40 Q10,50 25,25 T65,35 T95,5' fill='rgba(70,80,58,0.15)' filter='blur(2.5px)'/%3E%3C/svg%3E");
}

/* Finance Widget styling */
.hero-finance {
  width: 100%;
  max-width: 440px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-finance h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.finance-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-light);
  border: 1px solid rgba(203, 163, 88, 0.04);
  transition: var(--transition-quick);
}

.finance-item:hover {
  transform: translateY(-2px);
  background: rgba(203, 163, 88, 0.12);
}

.fin-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.fin-value {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.fin-time {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}


/* Floating Wax Seal Button */
.floating-wax-seal {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -4px 6px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s, background-color 0.4s;
}

.floating-wax-seal:hover {
  transform: scale(1.08) rotate(12deg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -4px 6px rgba(0, 0, 0, 0.2);
  background: var(--accent-hover);
  color: #151811;
}

.floating-wax-seal:active {
  transform: scale(0.92) rotate(-6deg);
}

.seal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1;
}

.seal-text {
  font-size: 10px;
  letter-spacing: 0.15em;
  margin-bottom: 2px;
}

.seal-arrow {
  font-size: 18px;
}

body.theme-alabaster .floating-wax-seal {
  background: var(--accent);
  color: #faf7f2;
  box-shadow: 0 8px 24px rgba(70, 80, 58, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.3), inset 0 -4px 6px rgba(0, 0, 0, 0.15);
}

body.theme-alabaster .floating-wax-seal:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toolbar h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.toolbar p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

.ghost-button {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 20px;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: var(--transition-quick);
}

.ghost-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body.theme-alabaster .ghost-button:hover {
  color: #fff;
}

.ghost-button:active {
  transform: translateY(0);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 28px;
  align-items: start;
}

/* News Card */
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: min(840px, calc(100vh - 180px));
  min-height: 600px;
  border: 1px solid var(--panel-border);
  border-top: 4px solid rgb(var(--tone-rgb, 203 163 88) / 0.85);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.news-card:hover {
  transform: translateY(-5px);
  background: var(--panel-hover);
  border-color: var(--panel-border-hover);
  box-shadow: var(--card-shadow-hover);
}

.news-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.97);
}

.news-card.is-drag-over {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

/* Organic Custom Accent Colors for Cards */
.news-card[data-tone="red"] {
  --tone-rgb: 189 98 71; /* Terracotta */
}
.news-card[data-tone="blue"] {
  --tone-rgb: 86 117 137; /* Mineral Blue */
}
.news-card[data-tone="orange"] {
  --tone-rgb: 203 135 68; /* Copper */
}
.news-card[data-tone="emerald"] {
  --tone-rgb: 86 97 70; /* Olive */
}
.news-card[data-tone="green"] {
  --tone-rgb: 110 125 91; /* Sage */
}
.news-card[data-tone="slate"] {
  --tone-rgb: 80 87 75; /* Charcoal */
}
.news-card[data-tone="gray"] {
  --tone-rgb: 140 133 116; /* Pebble Sand */
}

/* Card Header */
.card-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.card-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  transition: var(--transition-quick);
}

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

.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-light);
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  transition: var(--transition-quick);
}

.card-title:hover .card-icon {
  transform: scale(1.08);
}

.card-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.card-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-time {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  background: var(--accent-light);
  padding: 3px 8px;
  border-radius: 10px;
}

.card-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.card-refresh {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-secondary);
  min-height: 28px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-quick);
}

.card-refresh:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.news-card.is-loading .card-refresh {
  opacity: 0.55;
  pointer-events: none;
}

/* Icon Buttons & SVG icons */
.icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-quick);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.card-refresh.icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.btn-icon-sm {
  width: 14px;
  height: 14px;
}

/* Hot List */
.hot-list {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  padding: 16px 22px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.hot-list::-webkit-scrollbar {
  width: 4px;
}

.hot-list::-webkit-scrollbar-track {
  background: transparent;
}

.hot-list::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 4px;
}

.hot-list::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

.hot-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(var(--tone-rgb, 203 163 88) / 0.05);
}

.hot-list li:last-child {
  border-bottom: none;
}

.rank {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--rank-default);
  width: 24px;
  flex-shrink: 0;
  text-align: right;
  padding-top: 0px;
  transition: var(--transition-quick);
}

.hot-list li:nth-child(1) .rank { color: var(--hot); font-weight: 800; font-size: 21px; font-style: italic; }
.hot-list li:nth-child(2) .rank { color: var(--warm); font-weight: 800; font-size: 21px; font-style: italic; }
.hot-list li:nth-child(3) .rank { color: var(--gold); font-weight: 800; font-size: 21px; font-style: italic; }

.news-link {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  transition: var(--transition-quick);
  flex: 1;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.news-link:hover {
  color: var(--accent);
}

.news-meta {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 8px;
  font-family: var(--font-sans);
  border: 1px solid rgba(203, 163, 88, 0.1);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Source Editor modal overlay */
.source-editor {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 18, 12, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.source-editor[hidden] {
  display: none;
}

.source-editor-panel {
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--card-shadow-hover);
}

.source-editor-header,
.source-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.source-editor-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.source-editor-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
}

.source-editor-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: var(--transition-quick);
}

.source-editor-close:hover {
  background: var(--accent);
  color: var(--bg);
}

.source-editor-body {
  overflow-y: auto;
  padding: 18px 22px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.source-editor-body section + section {
  margin-top: 20px;
}

.source-editor-body h3 {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.source-editor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.source-editor-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition-quick);
}

.source-editor-list label:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

/* Responsive Styles */
@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 20px;
  }
  
  .brand {
    align-self: center;
  }
  
  .theme-picker {
    justify-content: center;
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 10px;
    width: 100%;
  }

  .category-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .hero-banner {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .hero-left {
    padding: 60px 20px 40px;
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
  }
  
  .hero-right {
    padding: 24px 20px;
  }
  
  .finance-items {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    gap: 12px;
  }
  
  .finance-item {
    flex: 1;
    min-width: 150px;
  }
}

@media (max-width: 600px) {
  .brand-text {
    font-size: 22px;
  }
  
  .category-tab {
    font-size: 14px;
    padding: 8px 16px;
  }
  
  .card-title {
    font-size: 18px;
  }
  
  .news-link {
    font-size: 14px;
  }
  
  .rank {
    font-size: 15px;
  }
  
  .hot-list li:nth-child(1) .rank,
  .hot-list li:nth-child(2) .rank,
  .hot-list li:nth-child(3) .rank {
    font-size: 18px;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .ghost-button {
    width: 100%;
    text-align: center;
  }
  
  .news-card {
    height: min(720px, calc(100vh - 200px));
    min-height: 500px;
  }
  
  .floating-wax-seal {
    right: 20px;
    bottom: 20px;
    width: 66px;
    height: 66px;
  }
  
  .seal-text {
    font-size: 8px;
  }
  
  .seal-arrow {
    font-size: 16px;
  }
}

/* News Section Grouping on Home */
.news-section {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 4px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  opacity: 0.8;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, rgba(203, 163, 88, 0.15) 100%);
}

body.theme-alabaster .section-line {
  background: linear-gradient(90deg, var(--line) 0%, rgba(70, 80, 58, 0.15) 100%);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 28px;
  align-items: start;
}

@media (max-width: 600px) {
  .section-divider {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .section-line {
    width: 100%;
    height: 1px;
    flex: none;
  }
}

/* Region Select for X Trends */
.region-select {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-secondary);
  height: 28px;
  padding: 0 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: var(--transition-quick);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cba358' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 10px;
  padding-right: 24px;
}

body.theme-alabaster .region-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e6d2e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.region-select:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.region-select option {
  background: var(--bg);
  color: var(--text);
}
