
    :root {
      --bg: #0d0f14;
      --bg2: #141824;
      --panel: rgba(20, 24, 36, 0.92);
      --panel-2: rgba(29, 35, 52, 0.96);
      --line: rgba(255,255,255,0.08);
      --text: #f2efe7;
      --muted: #b6b1a2;
      --gold: #d8b56a;
      --gold-soft: rgba(216, 181, 106, 0.14);
      --accent: #8fb0ff;
      --accent-soft: rgba(143,176,255,0.14);
      --green: #9fd5a6;
      --green-soft: rgba(159,213,166,0.14);
      --red: #d89d9d;
      --red-soft: rgba(216,157,157,0.14);
      --purple: #c2a9ff;
      --purple-soft: rgba(194,169,255,0.14);
      --shadow: 0 12px 30px rgba(0,0,0,0.35);
      --radius: 18px;
      --max: 1200px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }

    body {
      margin: 0;
      font-family: Georgia, "Times New Roman", serif;
      color: var(--text);
      background:
        radial-gradient(circle at top, rgba(90, 70, 30, 0.18), transparent 35%),
        linear-gradient(180deg, #0b0d12 0%, #111520 45%, #0b0d12 100%);
      min-height: 100vh;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    .wrap {
      width: min(var(--max), calc(100% - 32px));
      margin: 0 auto;
    }

    .hero {
  position: relative;
  min-height: 500px;
  background-image: url("../assets/BoneOrchardBanner.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
}

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.45)),
        radial-gradient(circle at 20% 20%, rgba(216,181,106,0.12), transparent 25%),
        radial-gradient(circle at 80% 0%, rgba(143,176,255,0.1), transparent 20%);
      pointer-events: none;
    }

    .hero-inner {
      position: relative;
      z-index: 1;
    }

    h1 {
      margin: 0 0 12px;
      font-size: clamp(2rem, 4vw, 3.25rem);
      line-height: 1.05;
      letter-spacing: 0.02em;
    }

    .hero p {
      margin: 0;
      max-width: 760px;
      color: var(--muted);
      font-size: 1.02rem;
      line-height: 1.7;
    }

    .top-links {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 24px;
    }

    .top-links a {
      padding: 12px 16px;
      border-radius: 12px;
      background: var(--panel);
      border: 1px solid var(--line);
      box-shadow: var(--shadow);
      transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    }

    .top-links a:hover,
    .top-links a.active {
      transform: translateY(-1px);
      border-color: rgba(216,181,106,0.35);
      background: var(--panel-2);
    }

    .section {
      padding: 28px 0 12px;
    }

    .section-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 18px;
    }

    .section-head h2 {
      margin: 0;
      font-size: 1.9rem;
      color: var(--gold);
    }

    .section-head p {
      margin: 0;
      color: var(--muted);
      max-width: 680px;
      text-align: right;
      line-height: 1.6;
    }

    .controls-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 18px;
    }

    .control-card,
    .loading-state,
    .empty-state,
    .faction-card {
      background: linear-gradient(180deg, rgba(23,27,40,0.96), rgba(16,19,30,0.98));
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .control-card {
      padding: 16px 18px;
    }

    .control-label {
      display: block;
      margin-bottom: 8px;
      color: var(--gold);
      font-size: 0.9rem;
    }

    input, select {
      width: 100%;
      border: 1px solid rgba(255,255,255,0.10);
      background: rgba(10, 14, 24, 0.85);
      color: var(--text);
      border-radius: 12px;
      padding: 10px 14px;
      min-height: 44px;
      font: inherit;
      outline: none;
    }

    input:focus,
    select:focus {
      border-color: rgba(216,181,106,0.35);
      box-shadow: 0 0 0 2px rgba(216,181,106,0.08);
    }

    .legend-row,
    .tag-row {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    .tag {
      display: inline-flex;
      align-items: center;
      min-height: 30px;
      padding: 5px 11px;
      border-radius: 999px;
      font-size: 0.84rem;
      line-height: 1.2;
      border: 1px solid transparent;
      color: var(--muted);
      background: rgba(255,255,255,0.04);
    }

    .tag-type-guild,
    .tag-type-house,
    .tag-type-government,
    .tag-type-business {
      background: var(--accent-soft);
      color: var(--accent);
      border-color: rgba(143,176,255,0.18);
    }

    .tag-type-cult,
    .tag-rel-hostile,
    .tag-type-warband,
    .tag-type-criminal-network {
      background: var(--red-soft);
      color: var(--red);
      border-color: rgba(216,157,157,0.18);
    }

    .tag-rel-ally,
    .tag-status-active {
      background: var(--green-soft);
      color: var(--green);
      border-color: rgba(159,213,166,0.18);
    }

    .tag-status-weakened,
    .tag-status-defeated {
      background: rgba(216,181,106,0.12);
      color: var(--gold);
      border-color: rgba(216,181,106,0.20);
    }

    .tag-scope,
    .tag-session,
    .tag-rel-neutral,
    .tag-rel-uncertain,
    .tag-type-unknown {
      background: rgba(194,169,255,0.10);
      color: var(--purple);
      border-color: rgba(194,169,255,0.16);
    }

    .tag-standing-trusted,
    .tag-standing-open-to-work {
      background: var(--green-soft);
      color: var(--green);
      border-color: rgba(159,213,166,0.18);
    }

    .tag-standing-watched,
    .tag-standing-cautious {
      background: rgba(216,181,106,0.12);
      color: var(--gold);
      border-color: rgba(216,181,106,0.20);
    }

    .tag-standing-hostile {
      background: var(--red-soft);
      color: var(--red);
      border-color: rgba(216,157,157,0.18);
    }

    .tag-tension {
      background: rgba(255,255,255,0.05);
      color: var(--text);
      border-color: rgba(255,255,255,0.10);
    }


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

    .faction-card {
      padding: 22px 24px;
      transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    }

    .faction-card:hover {
      transform: translateY(-2px);
      border-color: rgba(216,181,106,0.22);
      box-shadow: 0 16px 34px rgba(0,0,0,0.4);
    }

    .faction-card-head {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      align-items: start;
      margin-bottom: 14px;
      flex-wrap: wrap;
    }

    .faction-title {
      margin: 0;
      color: var(--text);
      font-size: 1.35rem;
      line-height: 1.15;
    }

    .faction-summary,
    .muted {
      color: var(--muted);
      line-height: 1.72;
    }

    .faction-summary {
      margin: 0 0 12px;
      color: var(--text);
      font-size: 1.02rem;
    }

    .meta-grid {
      display: grid;
      grid-template-columns: 1.4fr 0.9fr;
      gap: 16px;
      margin-top: 18px;
      align-items: start;
    }

    .meta-block.compact {
      max-width: none;
    }

    .meta-block {
      padding: 14px 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,0.03);
    }

    .meta-block.compact {
      padding: 14px 16px;
    }

    .meta-block h4 {
      margin: 0 0 10px;
      color: var(--gold);
      font-size: 0.96rem;
    }

    .meta-block ul {
      margin: 0;
      padding-left: 18px;
    }

    .meta-block li {
      margin-bottom: 10px;
      line-height: 1.5;
      color: var(--text);
    }

    .meta-block li:last-child {
      margin-bottom: 0;
    }

    details.history-block {
      margin-top: 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255,255,255,0.03);
      overflow: hidden;
    }

    details.history-block summary {
      cursor: pointer;
      list-style: none;
      padding: 14px 16px;
      color: var(--gold);
      font-weight: bold;
    }

    details.history-block summary::-webkit-details-marker {
      display: none;
    }

    .history-body {
      padding: 0 16px 16px;
      color: var(--muted);
      line-height: 1.72;
    }

    .history-body ul {
      margin: 0;
      padding-left: 18px;
    }

    .history-body li {
      margin-bottom: 10px;
    }

    .loading-state,
    .empty-state {
      padding: 22px;
      margin-top: 18px;
    }

    .empty-state {
      display: none;
    }

    footer {
      padding: 28px 0 48px;
      color: var(--muted);
      text-align: center;
      font-size: 0.92rem;
    }

    @media (max-width: 1100px) {
      .controls-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

    @media (max-width: 900px) {
      .section-head {
        flex-direction: column;
        align-items: start;
      }

      .section-head p {
        text-align: left;
      }

      .meta-grid,
      .controls-grid {
        grid-template-columns: 1fr;
      }

      .faction-card-head {
        flex-direction: column;
        align-items: start;
      }
    }
  
/* Bone Orchard theme override */
:root {
  --bg: #090b0d;
  --bg2: #12171b;
  --panel: rgba(15, 20, 24, 0.90);
  --panel-2: rgba(22, 29, 35, 0.96);
  --panel-3: rgba(35, 42, 48, 0.86);
  --line: rgba(219, 210, 188, 0.12);
  --line-strong: rgba(219, 210, 188, 0.22);
  --text: #ece6d6;
  --muted: #b6b0a2;
  --gold: #ddd2b8;
  --gold-soft: rgba(221, 210, 184, 0.14);
  --accent: #9eabb0;
  --accent-soft: rgba(158, 171, 176, 0.14);
  --green: #a7b8aa;
  --green-soft: rgba(167, 184, 170, 0.14);
  --red: #b78d87;
  --red-soft: rgba(183, 141, 135, 0.14);
  --purple: #a8a0b7;
  --purple-soft: rgba(168, 160, 183, 0.14);
  --bone: #ddd2b8;
  --mist: #9eabb0;
  --grave: #6f7d82;
  --ember: #8e7762;
  --danger: #8e605f;
  --shadow: 0 18px 40px rgba(0,0,0,0.45);
  --shadow-soft: 0 10px 24px rgba(0,0,0,0.28);
}
body {
  background:
    radial-gradient(circle at top, rgba(221,210,184,0.06), transparent 32%),
    radial-gradient(circle at 80% 12%, rgba(120, 137, 145, 0.10), transparent 20%),
    linear-gradient(180deg, #060708 0%, #0d1114 38%, #11161a 65%, #090b0d 100%) !important;
}
.hero {
  position: relative;
  padding: 0 !important;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6,7,8,0.05), rgba(6,7,8,0.18) 48%, rgba(6,7,8,0.58) 100%),
    url("../assests/BoneOrchardBanner.png") center top / cover no-repeat !important;
  box-shadow: inset 0 -80px 140px rgba(0,0,0,0.48);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3,4,5,0.05) 0%, rgba(3,4,5,0.10) 30%, rgba(3,4,5,0.22) 62%, rgba(3,4,5,0.70) 100%),
    radial-gradient(circle at 82% 18%, rgba(234, 230, 217, 0.08), transparent 16%),
    radial-gradient(circle at 18% 35%, rgba(145, 160, 167, 0.08), transparent 24%) !important;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.76));
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  min-height: 500px;
  margin: 0 auto;
  padding: 0 0 26px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
}
.hero h1, h1#pageTitle, #npcName {
  margin: 0 0 10px !important;
  font-size: clamp(2.3rem, 5vw, 4.4rem) !important;
  line-height: 0.98 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  color: var(--bone) !important;
  text-shadow: 0 3px 18px rgba(0,0,0,0.55);
}
.hero p, #npcSubtitle {
  margin: 0 !important;
  max-width: 860px !important;
  color: #d1cbc0 !important;
  font-size: 1.04rem !important;
  line-height: 1.7 !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.eyebrow {
  color: var(--bone) !important;
  border-color: rgba(221,210,184,0.22) !important;
  background: rgba(221,210,184,0.08) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
}
.quick-links, .top-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px !important;
  margin-top: 0 !important;
  padding: 14px 18px;
  border: 1px solid rgba(221, 210, 184, 0.10);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(8, 11, 14, 0.42), rgba(8, 11, 14, 0.70)) !important;
  box-shadow: 0 18px 44px rgba(0,0,0,0.36);
  backdrop-filter: blur(6px);
  position: relative;
}
.quick-links::before, .top-links::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.quick-links a, .top-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px !important;
  border-radius: 14px !important;
  background: rgba(6, 9, 12, 0.74) !important;
  border: 1px solid rgba(221, 210, 184, 0.16) !important;
  box-shadow: 0 12px 26px rgba(0,0,0,0.30);
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  color: var(--bone) !important;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  min-width: 116px;
  text-align: center;
}
.quick-links a:hover, .top-links a:hover,
.quick-links a.active, .top-links a.active {
  transform: translateY(-2px);
  border-color: rgba(221, 210, 184, 0.34) !important;
  background: rgba(22, 29, 35, 0.92) !important;
  color: #f5efe0 !important;
  box-shadow: 0 18px 28px rgba(0,0,0,0.34);
}
.section-head h2, .section-header h2, .section-title, .sidebar-title, .status-card h3, .summary-card h3, .panel h2, .panel h3, .faction-title {
  color: var(--bone) !important;
}
.control-card, .loading-state, .empty-state, .faction-card, .summary-card, .status-card, .panel, .search-panel, .session-card, .control-card,
.loading, .error, .no-results, .question-row, .timeline-content, .meta-card, .list-card, .meta-block, details.history-block {
  background: linear-gradient(180deg, rgba(22, 28, 33, 0.98), rgba(12, 16, 19, 0.98)) !important;
  border-color: var(--line) !important;
  box-shadow: var(--shadow) !important;
}
.timeline-year, .timeline-month-marker, .timeline-date-badge, .tag, .badge, .session-tag, .entity-type-badge,
.session-chip, .relation-chip, .timeline-marker, .session-number {
  color: var(--bone) !important;
  border-color: rgba(221,210,184,0.20) !important;
  background: rgba(221,210,184,0.10) !important;
}
input, select, .search-input, .filter-select, .archive-tools input, .archive-tools select, .control-card input, .control-card select {
  background: rgba(5, 9, 12, 0.88) !important;
  border-color: rgba(221,210,184,0.10) !important;
  color: var(--text) !important;
}
input:focus, select:focus, .search-input:focus, .filter-select:focus, .archive-tools input:focus, .archive-tools select:focus {
  border-color: rgba(221,210,184,0.30) !important;
  box-shadow: 0 0 0 2px rgba(221,210,184,0.08) !important;
}
.btn, .clear-button {
  background: rgba(8, 11, 14, 0.74) !important;
  border-color: rgba(221,210,184,0.14) !important;
  color: var(--bone) !important;
}
.btn:hover, .clear-button:hover {
  border-color: rgba(221,210,184,0.30) !important;
  background: rgba(22, 29, 35, 0.92) !important;
}
.btn.primary {
  background: rgba(158, 171, 176, 0.14) !important;
  border-color: rgba(158, 171, 176, 0.22) !important;
  color: #d9e1e4 !important;
}
.btn.gold {
  background: rgba(221,210,184,0.12) !important;
  border-color: rgba(221,210,184,0.22) !important;
  color: var(--bone) !important;
}
footer {
  color: var(--muted) !important;
}
@media (max-width: 900px) {
  .hero, .hero-inner { min-height: 430px; }
  .quick-links, .top-links { padding: 12px 14px; }
  .quick-links a, .top-links a { min-width: 96px; padding: 11px 16px !important; }
}

