:root {
  --wb-hero-gradient: linear-gradient(145deg, #1a1d24 0%, #252a33 45%, #1e2229 100%);
  --wb-accent: #c9a227;
  --wb-card-border: rgba(255, 255, 255, 0.08);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bs-body-bg);
}

main {
  flex: 1;
}

.wb-hero {
  background: var(--wb-hero-gradient);
  border-bottom: 1px solid var(--wb-card-border);
}

.wb-hero h1 {
  letter-spacing: -0.02em;
}

.wb-accent {
  color: var(--wb-accent);
}

.wb-game-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--wb-card-border);
}

.wb-game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.35);
}

/* Equal-height game cards + bottom-aligned “Open builder” buttons */
.wb-game-card.h-100 {
  display: flex;
  flex-direction: column;
}

.wb-game-card.h-100 > .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wb-game-card.h-100 > .card-body > .wb-logo-box {
  flex-shrink: 0;
}

.wb-game-card.h-100 > .card-body > .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.wb-game-card.h-100 > .card-body > .card-body > .btn {
  margin-top: auto;
}

.wb-logo-box {
  min-height: 180px;
  height: 180px;
  background: rgba(0, 0, 0, 0.25);
}

.wb-logo-box img {
  max-height: 160px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

footer {
  border-top: 1px solid var(--wb-card-border);
}

/* —— ArmySmith “Sanctuary” theme (used by index + inner pages) —— */
:root {
  --d2-bg-void: #070605;
  --d2-bg-deep: #0e0b08;
  --d2-bg-panel: #16120e;
  --d2-gold: #c9aa71;
  --d2-gold-bright: #f0deb8;
  --d2-parchment: #c4b8a4;
  --d2-parchment-dim: #8a7d6c;
  --d2-ruby-glow: rgba(180, 48, 64, 0.22);
  --d2-stone: #2a241c;
  --d2-stone-light: #3d3428;
}

html.d2-sanctuary[data-bs-theme="dark"] {
  --bs-body-bg: var(--d2-bg-deep);
  --bs-body-color: var(--d2-parchment);
  --bs-secondary-color: var(--d2-parchment-dim);
  --bs-link-color: var(--d2-gold-bright);
  --bs-link-hover-color: #fff8e8;
  --bs-primary: #8b2332;
  --bs-primary-rgb: 139, 35, 50;
  --bs-focus-ring-color: rgba(201, 170, 113, 0.35);
}

/* Primary CTA — ruby gradient + gold border (not Bootstrap blue) */
html.d2-sanctuary[data-bs-theme="dark"] .btn-primary,
.d2-sanctuary-body .btn-primary {
  --bs-btn-color: var(--d2-gold-bright);
  --bs-btn-bg: #5c1824;
  --bs-btn-border-color: var(--d2-gold);
  --bs-btn-hover-color: #fff8e8;
  --bs-btn-hover-bg: #6e1e2e;
  --bs-btn-hover-border-color: var(--d2-gold-bright);
  --bs-btn-focus-shadow-rgb: 201, 170, 113;
  --bs-btn-active-color: #fff8e8;
  --bs-btn-active-bg: #4a1218;
  --bs-btn-active-border-color: var(--d2-gold);
  --bs-btn-disabled-color: rgba(240, 222, 184, 0.45);
  --bs-btn-disabled-bg: #3d1018;
  --bs-btn-disabled-border-color: rgba(201, 170, 113, 0.25);
  font-family: Cinzel, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  border-width: 1px;
  background-image: linear-gradient(180deg, #722030 0%, #541820 42%, #3a1018 100%) !important;
  background-color: transparent !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 200, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.45);
}

html.d2-sanctuary[data-bs-theme="dark"] .btn-primary:hover,
.d2-sanctuary-body .btn-primary:hover {
  background-image: linear-gradient(180deg, #86263a 0%, #651c28 42%, #45141c 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 200, 0.14),
    0 2px 14px rgba(0, 0, 0, 0.5);
}

html.d2-sanctuary[data-bs-theme="dark"] .btn-primary:active,
.d2-sanctuary-body .btn-primary:active,
html.d2-sanctuary[data-bs-theme="dark"] .btn-primary.active,
.d2-sanctuary-body .btn-primary.active {
  background-image: linear-gradient(180deg, #4a1518 0%, #380f14 100%) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

html.d2-sanctuary[data-bs-theme="dark"] .btn-primary:focus-visible,
.d2-sanctuary-body .btn-primary:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 200, 0.1),
    0 0 0 0.2rem rgba(201, 170, 113, 0.35);
}

html.d2-sanctuary[data-bs-theme="dark"] .btn-primary.btn-sm,
.d2-sanctuary-body .btn-primary.btn-sm {
  font-size: 0.68rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

/* Outline / secondary nav buttons — stone + gold trim */
html.d2-sanctuary[data-bs-theme="dark"] .btn-outline-secondary,
.d2-sanctuary-body .btn-outline-secondary {
  --bs-btn-color: var(--d2-gold-bright);
  --bs-btn-border-color: rgba(201, 170, 113, 0.4);
  --bs-btn-hover-color: #fff8e8;
  --bs-btn-hover-bg: rgba(201, 170, 113, 0.08);
  --bs-btn-hover-border-color: var(--d2-gold-bright);
  --bs-btn-active-color: #fff8e8;
  --bs-btn-active-bg: rgba(201, 170, 113, 0.12);
  --bs-btn-active-border-color: var(--d2-gold);
  font-family: Cinzel, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.d2-sanctuary-body {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.075rem;
  background-color: var(--d2-bg-void);
  background-image:
    radial-gradient(ellipse 85% 55% at 50% -8%, var(--d2-ruby-glow), transparent 55%),
    linear-gradient(180deg, #100d0a 0%, var(--d2-bg-void) 35%, var(--d2-bg-void) 100%);
  background-attachment: fixed;
}

.d2-navbar {
  background: linear-gradient(180deg, #221c16 0%, #16120e 48%, #120f0c 100%) !important;
  border-bottom: 2px solid var(--d2-stone-light);
}

.d2-navbar .navbar-brand {
  font-family: Cinzel, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--d2-gold-bright) !important;
}

.d2-site-logo-nav {
  height: 2.75rem;
  width: auto;
}

.d2-hero {
  background: linear-gradient(165deg, #1a1210 0%, #0e0b08 38%, #0a0806 100%);
  border-bottom: 1px solid rgba(201, 170, 113, 0.22);
}

.d2-site-logo-hero {
  height: clamp(4.5rem, 12vw, 7rem);
  width: auto;
}

.d2-lead {
  color: var(--d2-parchment-dim) !important;
}

.d2-blog-article img {
  display: block;
  margin: 1.5rem auto;
  max-width: 70%;
  height: auto;
}

.d2-section-title {
  font-family: Cinzel, serif;
  color: var(--d2-gold-bright);
  letter-spacing: 0.04em;
}

.d2-slate {
  background: var(--d2-bg-panel) !important;
  border: 1px solid rgba(201, 170, 113, 0.15) !important;
}

.d2-official-link {
  color: var(--d2-gold-bright);
}

.d2-footer {
  border-top: 1px solid var(--d2-stone-light);
  background: rgba(10, 8, 6, 0.95);
}

.d2-footer-official-heading {
  letter-spacing: 0.12em;
}

footer.d2-footer a {
  color: var(--d2-parchment-dim);
}

footer.d2-footer a:hover {
  color: var(--d2-gold-bright);
}

/* Frostgrave builder iframe host */
.d2-builder-host {
  min-height: 100dvh;
}

.d2-builder-host .d2-builder-host-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
}

.d2-builder-host .d2-builder-iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #04090f;
}

.d2-builder-host .d2-builder-iframe--pillage {
  background: #1a0e08;
}

.d2-builder-host .d2-builder-iframe--silver-bayonet {
  background: #060d14;
}

.d2-builder-host-footer {
  border-top: 1px solid var(--d2-stone-light);
}

/* Feedback */
.d2-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.d2-feedback-form {
  position: relative;
}

.d2-feedback-alert-success {
  background: rgba(58, 136, 80, 0.25);
  color: var(--d2-parchment);
  border: 1px solid rgba(58, 136, 80, 0.45) !important;
}

.d2-feedback-thumb {
  width: 88px;
  height: 88px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--d2-stone-light);
  background: var(--d2-bg-void);
}

.d2-feedback-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.d2-feedback-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  line-height: 1;
  padding: 0 0.35rem !important;
  min-width: 0;
  border-radius: 50%;
}

/* —— Game landing pages (/<game>/) —— */
.d2-feature-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.d2-feature-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.6rem;
  border-bottom: 1px solid rgba(201, 170, 113, 0.12);
  color: var(--d2-parchment);
}

.d2-feature-list li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.95rem;
  width: 0.5rem;
  height: 0.5rem;
  transform: rotate(45deg);
  border: 1px solid var(--d2-gold);
  background: rgba(201, 170, 113, 0.25);
}

.d2-faq summary {
  cursor: pointer;
  color: var(--d2-gold-bright);
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.d2-faq summary::marker {
  color: var(--d2-gold);
}

.d2-faq[open] summary {
  margin-bottom: 0.25rem;
}

.d2-other-builders a {
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 170, 113, 0.25);
}

.d2-other-builders a:hover {
  border-bottom-color: var(--d2-gold-bright);
}

/* Home hero: collapsed "More about ArmySmith" */
.d2-hero-more summary {
  cursor: pointer;
  color: var(--d2-gold);
  font-family: Cinzel, "Times New Roman", serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  list-style: none;
}

.d2-hero-more summary::-webkit-details-marker {
  display: none;
}

.d2-hero-more summary::before {
  content: "+";
  display: inline-block;
  width: 1rem;
  color: var(--d2-gold-bright);
}

.d2-hero-more[open] summary::before {
  content: "−";
}

.d2-hero-more summary:hover {
  color: var(--d2-gold-bright);
}

/* Home hero: note from the authors */
.d2-fan-note {
  max-width: 46rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--d2-gold);
  background: rgba(201, 170, 113, 0.06);
  color: var(--d2-parchment);
  font-size: 0.98rem;
  line-height: 1.55;
}

.d2-fan-note strong {
  color: var(--d2-gold-bright);
  font-weight: 600;
}

/* Language toggle + support link in the navbar */
.d2-lang-toggle {
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--d2-parchment-dim);
  text-decoration: none;
  border: 1px solid rgba(201, 170, 113, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}

.d2-lang-toggle:hover {
  color: var(--d2-gold-bright);
  border-color: var(--d2-gold-bright);
}

/* Newsletter block */
.d2-newsletter {
  background: var(--d2-bg-panel);
  border: 1px solid rgba(201, 170, 113, 0.18);
  padding: 1.25rem 1.5rem;
}

.d2-newsletter h2 {
  font-family: Cinzel, serif;
  color: var(--d2-gold-bright);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.d2-newsletter .form-check-label {
  font-size: 0.85rem;
  color: var(--d2-parchment-dim);
}

/* Home hero: latest blog post + newsletter banner */
.d2-announce {
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--d2-gold);
  border-radius: 0.5rem;
  background:
    radial-gradient(ellipse 70% 120% at 0% 50%, rgba(201, 170, 113, 0.14), transparent 60%),
    linear-gradient(135deg, #1c1510 0%, var(--d2-bg-panel) 60%, #120e0a 100%);
  box-shadow: 0 0 0 1px rgba(201, 170, 113, 0.12), 0 0 28px rgba(201, 170, 113, 0.14);
}

.d2-announce-kicker {
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--d2-gold);
}

.d2-announce-kicker::before {
  content: "\2726";
  margin-right: 0.45rem;
  color: var(--d2-gold-bright);
}

.d2-announce-title {
  font-family: Cinzel, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.2;
  font-weight: 700;
}

.d2-announce-title a {
  color: var(--d2-gold-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(240, 222, 184, 0.35);
}

.d2-announce-title a:hover,
.d2-announce-title a:focus {
  color: #fff;
  border-bottom-color: var(--d2-gold-bright);
}

.d2-announce-excerpt {
  color: var(--d2-parchment);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 40rem;
}

.d2-announce .d2-newsletter {
  background: rgba(7, 6, 5, 0.55);
  border-color: rgba(201, 170, 113, 0.3);
}

@media (max-width: 991.98px) {
  .d2-announce {
    padding: 1.1rem 1.15rem;
  }
}

/* Support page */
.d2-support-list {
  list-style: none;
  padding-left: 0;
}

.d2-support-list li {
  padding: 0.6rem 0 0.6rem 1.6rem;
  position: relative;
  border-bottom: 1px solid rgba(201, 170, 113, 0.12);
}

.d2-support-list li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 1.1rem;
  width: 0.5rem;
  height: 0.5rem;
  transform: rotate(45deg);
  border: 1px solid var(--d2-gold);
  background: rgba(201, 170, 113, 0.25);
}

.d2-pix-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  background: var(--d2-bg-void);
  border: 1px solid rgba(201, 170, 113, 0.3);
  padding: 0.5rem 0.75rem;
  color: var(--d2-gold-bright);
  word-break: break-all;
}

/* Fan note: more breathing room */
.d2-fan-note {
  max-width: 54rem;
  padding: 1.5rem 1.75rem;
  font-size: 1.04rem;
  line-height: 1.75;
}

.d2-fan-note p {
  margin-bottom: 1.1rem !important;
}

.d2-fan-note p:last-child {
  margin-bottom: 0 !important;
}

.d2-fan-note a.d2-official-link {
  display: inline-block;
  margin-top: 0.3rem;
}
