/* 深色红金皮肤：黑色底 + 金色描边 + 红色号球，与另外两套皮肤明显区分。 */

body[data-theme="dark"] {
  margin: 0;
  color: #e8e2d4;
  background: #0b0b0d;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

body[data-theme="dark"] .d-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid #2a2419;
  background: linear-gradient(180deg, #17130d, #0e0c09);
}
body[data-theme="dark"] .d-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}
body[data-theme="dark"] .d-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
body[data-theme="dark"] .d-brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #6b5526;
  border-radius: 9px;
  color: #0b0b0d;
  background: linear-gradient(160deg, #f4d47a, #c9a227);
  font-size: 20px;
  font-weight: 900;
}
body[data-theme="dark"] .d-brand-text strong { display: block; color: #f4d47a; font-size: 17px; letter-spacing: .05em; }
body[data-theme="dark"] .d-brand-text small { display: block; margin-top: 2px; color: #8d8571; font-size: 11px; }
body[data-theme="dark"] .d-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-left: auto; }
body[data-theme="dark"] .d-nav a {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  color: #b8b0a0;
  font-size: 13px;
  text-decoration: none;
}
body[data-theme="dark"] .d-nav a:hover,
body[data-theme="dark"] .d-nav a.active { color: #f4d47a; border-bottom-color: #c9a227; }

body[data-theme="dark"] .d-shell { width: min(1100px, calc(100% - 32px)); margin: 22px auto 40px; }

body[data-theme="dark"] .d-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 22px;
  border: 1px solid #2f2718;
  border-radius: 16px;
  background: radial-gradient(circle at 12% 0%, rgba(201, 162, 39, .16), transparent 55%), #12100c;
}
body[data-theme="dark"] .d-hero-glow {
  position: absolute;
  top: -60%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(211, 30, 39, .22), transparent 65%);
  pointer-events: none;
}
body[data-theme="dark"] .d-hero-meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: #9d9583;
  font-size: 13px;
}
body[data-theme="dark"] .d-kicker {
  padding: 3px 10px;
  border: 1px solid #6b5526;
  border-radius: 999px;
  color: #f4d47a;
  font-weight: 700;
}
body[data-theme="dark"] .d-origin { margin-left: auto; color: #7d7566; font-size: 11px; }

body[data-theme="dark"] .d-balls {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 20px 0 6px;
}
body[data-theme="dark"] .d-ball-slot { display: grid; gap: 6px; justify-items: center; min-width: 0; }
body[data-theme="dark"] .d-ball {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, .35), 0 0 0 2px rgba(255, 255, 255, .06);
}
body[data-theme="dark"] .d-ball-red { background: radial-gradient(circle at 34% 28%, #ff5b56, #b90d13); }
body[data-theme="dark"] .d-ball-blue { background: radial-gradient(circle at 34% 28%, #5b9dfa, #0f3f8f); }
body[data-theme="dark"] .d-ball-green { background: radial-gradient(circle at 34% 28%, #4ecb6d, #08641f); }
body[data-theme="dark"] .d-ball-unknown { background: radial-gradient(circle at 34% 28%, #8b9490, #4a544e); }
body[data-theme="dark"] .d-ball-meta { color: #a89f8b; font-size: 12px; white-space: nowrap; }
body[data-theme="dark"] .d-plus { display: grid; place-items: center; align-self: center; color: #f4d47a; font-size: 26px; font-weight: 900; }
body[data-theme="dark"] .d-hero-note { position: relative; margin: 14px 0 0; color: #877f6d; font-size: 12px; }
body[data-theme="dark"] .d-hero-note a { color: #c9a227; }

body[data-theme="dark"] .d-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
body[data-theme="dark"] .d-stat {
  padding: 14px;
  border: 1px solid #262019;
  border-radius: 12px;
  background: #121110;
  text-align: center;
}
body[data-theme="dark"] .d-stat strong { display: block; color: #f4d47a; font-size: 20px; }
body[data-theme="dark"] .d-stat span { display: block; margin-top: 5px; color: #8d8571; font-size: 11px; }

body[data-theme="dark"] .d-daily {
  padding: 18px;
  border: 1px dashed #4a3f22;
  border-radius: 14px;
  background: #100e0b;
}
body[data-theme="dark"] .d-daily h2 { margin: 0 0 12px; color: #f4d47a; font-size: 15px; }
body[data-theme="dark"] .d-daily-balls { display: flex; flex-wrap: wrap; gap: 8px; }
body[data-theme="dark"] .d-daily-balls .d-ball { width: 42px; font-size: 16px; }
body[data-theme="dark"] .d-note { margin: 12px 0 0; color: #877f6d; font-size: 12px; }
body[data-theme="dark"] .d-note strong { color: #d34a4a; }

body[data-theme="dark"] .d-section-head {
  margin: 26px 0 12px;
  padding-left: 11px;
  border-left: 3px solid #c9a227;
  color: #f4d47a;
  font-size: 16px;
}
body[data-theme="dark"] .d-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
  gap: 8px;
}
body[data-theme="dark"] .d-material {
  padding: 11px 8px;
  border: 1px solid #2a241a;
  border-radius: 9px;
  color: #d8cfba;
  background: linear-gradient(180deg, #191612, #121010);
  font-size: 12px;
  text-align: center;
  text-decoration: none;
}
body[data-theme="dark"] .d-material:hover { border-color: #c9a227; color: #f4d47a; }

body[data-theme="dark"] .d-article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
body[data-theme="dark"] .d-article {
  padding: 15px;
  border: 1px solid #262019;
  border-radius: 12px;
  background: #121110;
}
body[data-theme="dark"] .d-article-meta { display: flex; justify-content: space-between; color: #7d7566; font-size: 11px; }
body[data-theme="dark"] .d-article h3 { margin: 8px 0 6px; color: #e8e2d4; font-size: 14px; }
body[data-theme="dark"] .d-article p { margin: 0; color: #9d9583; font-size: 12px; line-height: 1.75; }

body[data-theme="dark"] .d-empty { color: #7d7566; font-size: 13px; }
body[data-theme="dark"] .d-disclaimer {
  margin: 26px 0 0;
  padding: 14px 16px;
  border: 1px solid #262019;
  border-radius: 10px;
  color: #7d7566;
  font-size: 12px;
  line-height: 1.8;
}
body[data-theme="dark"] .d-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid #221d15;
  color: #6b6455;
  font-size: 12px;
}

/* 深色皮肤下的内页 */
body[data-theme="dark"] { background: #0b0b0d; }
body[data-theme="dark"] .site-header { border-bottom: 1px solid #241f17; background: #100e0b; }
body[data-theme="dark"] .site-header .brand strong { color: #f4d47a; }
body[data-theme="dark"] .site-header .brand small { color: #8d8571; }
body[data-theme="dark"] .brand-mark { color: #0b0b0d; background: linear-gradient(160deg, #f4d47a, #c9a227); }
body[data-theme="dark"] .main-nav a { color: #b8b0a0; }
body[data-theme="dark"] .main-nav a.active,
body[data-theme="dark"] .main-nav a:hover { color: #f4d47a; border-color: #c9a227; }
body[data-theme="dark"] .content-panel,
body[data-theme="dark"] .material-card,
body[data-theme="dark"] .draw-feature,
body[data-theme="dark"] .history-controls,
body[data-theme="dark"] .history-draw-row {
  border-color: #262019;
  background: #121110;
  color: #d8cfba;
}
body[data-theme="dark"] .panel-heading h2,
body[data-theme="dark"] .welcome-row h1,
body[data-theme="dark"] .material-intro h1 { color: #f4d47a; }
body[data-theme="dark"] .welcome-copy,
body[data-theme="dark"] .material-intro p,
body[data-theme="dark"] .subtle-label,
body[data-theme="dark"] .section-kicker { color: #9d9583; }
body[data-theme="dark"] .site-footer { border-top: 1px solid #221d15; color: #6b6455; }
body[data-theme="dark"] .site-footer span { color: #6b6455; }
body[data-theme="dark"] table { color: #d8cfba; }
body[data-theme="dark"] th,
body[data-theme="dark"] td { border-color: #262019; }
body[data-theme="dark"] th { background: #17140f; color: #c9a227; }
body[data-theme="dark"] .history-year-button,
body[data-theme="dark"] .history-filter-button { border-color: #2a241a; color: #b8b0a0; background: #17140f; }
body[data-theme="dark"] .history-year-button.active,
body[data-theme="dark"] .history-filter-button.active { color: #0b0b0d; background: #c9a227; border-color: #c9a227; }

@media (max-width: 720px) {
  body[data-theme="dark"] .d-balls { gap: 5px; grid-template-columns: repeat(6, minmax(0, 1fr)) 18px minmax(0, 1fr); }
  body[data-theme="dark"] .d-ball { font-size: 15px; }
  body[data-theme="dark"] .d-ball-meta { font-size: 10px; }
  body[data-theme="dark"] .d-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-theme="dark"] .d-nav { width: 100%; margin-left: 0; }
}
