body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 32, 64, 0.05), rgba(27, 32, 64, 0) 280px),
    var(--ends-page-bg);
}

.page-wrapper {
  min-height: calc(100vh - 56px);
}

.home-page .page-body {
  margin-top: 0;
}

.home-page .page-body .container-xl {
  padding-top: 0 !important;
}

.site-hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  min-height: 56vh;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.home-hero {
  position: relative;
  isolation: isolate;
  width: 100vw;
  min-height: min(760px, calc(100vh - 56px));
  margin-inline: calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 6rem) max(clamp(1rem, 4vw, 3rem), calc((100vw - 1320px) / 2));
  color: #fff;
  background-image:
    radial-gradient(circle at 28% 46%, rgba(8, 12, 26, 0.18) 0%, rgba(8, 12, 26, 0.28) 32%, rgba(8, 12, 26, 0.52) 100%),
    linear-gradient(90deg, rgba(8, 12, 26, 0.42) 0%, rgba(8, 12, 26, 0.28) 46%, rgba(8, 12, 26, 0.18) 100%),
    linear-gradient(180deg, rgba(8, 12, 26, 0.06), rgba(8, 12, 26, 0.58)),
    url("../images/banner.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 12, 26, 0), rgba(8, 12, 26, 0.22));
  pointer-events: none;
}

.home-hero .home-hero-content {
  max-width: 720px;
}

.home-hero .site-kicker,
.home-hero .lead,
.home-hero .text-muted {
  color: rgba(255, 255, 255, 0.82) !important;
}

.home-hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.36);
}

.home-hero .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.home-hero .btn-outline-light:hover {
  color: var(--ends-navy);
  border-color: #fff;
  background: #fff;
}

.navbar {
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.16);
}

.navbar-brand {
  min-height: 44px;
  padding-block: 0.4rem;
}

.site-brand-logo {
  display: block;
  width: min(184px, 48vw);
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

@media (min-width: 992px) {
  .site-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }
}

.site-hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 13vw, 5.8rem);
  line-height: 0.95;
}

.site-kicker {
  font-family: var(--tblr-font-sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--ends-purple);
  font-weight: 700;
}

.display-3,
.display-4,
.display-5 {
  letter-spacing: 0;
}

.page-body .btn-outline-light {
  color: var(--ends-navy);
  border-color: rgba(27, 32, 64, 0.28);
  background: rgba(255, 255, 255, 0.58);
}

.page-body .btn-outline-light:hover {
  color: #fff;
  border-color: var(--ends-navy);
  background: var(--ends-navy);
}

.hero-dice {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(6, minmax(44px, 1fr));
  max-width: 100%;
}

.hero-die {
  display: grid;
  place-items: center;
  min-height: 72px;
  border: 1px solid rgba(27, 32, 64, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.08);
}

.home-hero .hero-die {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.hero-die .dice {
  width: 2.2rem;
  height: 2.2rem;
}

@media (min-width: 768px) {
  .hero-dice {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    max-width: 480px;
    margin-left: auto;
  }

  .hero-die {
    min-height: 108px;
  }

  .hero-die .dice {
    width: 3.2rem;
    height: 3.2rem;
  }
}

.feature-grid,
.universe-grid,
.sourcebook-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .universe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sourcebook-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .universe-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.feature-card,
.universe-card,
.sourcebook-card,
.legal-panel {
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
}

.feature-card p:last-child,
.legal-panel p:last-child {
  margin-bottom: 0;
}

.dice-sheet-card {
  border-color: rgba(27, 32, 64, 0.12);
}

.sheet-download-card {
  border-color: rgba(27, 32, 64, 0.12);
}

.sheet-download-list {
  display: grid;
  gap: 0.9rem;
}

.sheet-download-row {
  display: grid;
  gap: 0.75rem;
}

.sheet-download-row h4 {
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.sheet-download-row p {
  margin-bottom: 0;
  color: var(--tblr-muted);
}

.sheet-download-buttons {
  justify-content: flex-start;
}

.sheet-download-buttons .btn {
  white-space: nowrap;
}

.sheet-download-note {
  color: var(--tblr-muted) !important;
  font-size: 85%;
  margin-top: 0.8rem !important;
  font-style: italic;
}

.dice-sheet-download-controls {
  max-width: 34rem;
  flex-wrap: nowrap;
}

.dice-sheet-download-controls .form-select {
  min-width: 0;
}

.dice-sheet-download-controls .btn {
  white-space: nowrap;
}

.dice-sheet-download-note {
  color: var(--tblr-muted) !important;
  font-size: 85%;
  max-width: 34rem;
  margin-top: 0.4rem !important;
  font-style: italic;
}

.community-head {
  margin-bottom: 1.25rem;
}

.community-head h1 {
  margin-bottom: 0.35rem;
  font-size: clamp(2.15rem, 6vw, 3.8rem);
  line-height: 1;
}

.community-grid {
  display: grid;
  gap: 1.5rem;
}

.community-panel {
  padding: 1.5rem;
}

.community-panel h2 {
  margin-bottom: 0.75rem;
}

.community-panel p + p {
  margin-top: 0.85rem;
}

.community-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .community-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.beta-page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.beta-page-head h1 {
  max-width: 20ch;
  margin-bottom: 0.35rem;
  font-size: clamp(2.15rem, 6vw, 3.8rem);
  line-height: 1;
}

.beta-form-grid {
  display: grid;
  gap: 1rem;
}

.beta-check-grid,
.beta-product-list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .beta-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beta-form-grid .span-2 {
    grid-column: span 2;
  }

  .beta-check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.feature-card {
  padding: 1.25rem;
}

.feature-card h2,
.feature-card h3 {
  font-size: 1.1rem;
}

.home-intro {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.5rem, 4vw, 2.75rem) 0;
}

.home-intro h2 {
  max-width: 760px;
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.home-intro > div:first-child p {
  max-width: 860px;
  font-size: 1.05rem;
}

.home-pillars {
  display: grid;
  gap: 1rem;
}

.home-pillars > div {
  padding-top: 1rem;
  border-top: 3px solid rgba(26, 127, 255, 0.28);
}

.home-pillars h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.home-pillars p {
  margin-bottom: 0;
}

.start-hero {
  max-width: 920px;
  padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.start-hero h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 12vw, 5.6rem);
  line-height: 0.96;
}

.start-hero .lead {
  max-width: 820px;
}

.start-actions,
.start-choice-grid,
.start-compare {
  display: grid;
  gap: 1rem;
}

.start-actions {
  grid-template-columns: repeat(auto-fit, minmax(180px, max-content));
  margin-top: 1.25rem;
}

.start-choice-grid {
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.start-choice,
.start-note {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
}

.start-choice h2,
.start-note h2 {
  font-size: 1.2rem;
}

.start-choice p,
.start-note p {
  color: var(--tblr-muted);
}

.start-choice p:last-child,
.start-note p:last-child {
  margin-bottom: 0;
}

.start-band {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  color: #fff;
  background: var(--ends-navy);
  border-radius: 8px;
}

.start-band .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.start-compare > div {
  padding-top: 1rem;
  border-top: 3px solid rgba(255, 255, 255, 0.28);
}

.start-compare h3 {
  margin-bottom: 0.6rem;
}

.start-compare ul,
.start-steps ol {
  margin-bottom: 0;
}

.start-steps {
  display: grid;
  gap: 1rem;
  align-items: start;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.start-steps ol {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.25rem;
}

@media (min-width: 768px) {
  .home-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .start-choice-grid,
  .start-compare {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .start-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-steps {
    grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  }
}

.universe-card {
  position: relative;
  overflow: hidden;
}

.universe-card-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  min-height: 230px;
  color: #fff;
  text-decoration: none;
  background: var(--ends-navy);
}

.universe-card-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 12, 26, 0.04) 0%, rgba(8, 12, 26, 0.18) 42%, rgba(8, 12, 26, 0.84) 100%),
    linear-gradient(90deg, rgba(8, 12, 26, 0.24), rgba(8, 12, 26, 0.04));
  pointer-events: none;
}

.universe-card-link:hover,
.universe-card-link:focus {
  color: #fff;
  text-decoration: none;
}

.universe-card-link:focus-visible {
  outline: 3px solid var(--ends-blue);
  outline-offset: 3px;
}

.sourcebook-card {
  display: grid;
  overflow: hidden;
}

@media (min-width: 768px) {
  .sourcebook-card {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  }
}

.universe-cover {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 180ms ease;
}

.universe-cover-empty {
  background:
    linear-gradient(135deg, rgba(85, 0, 170, 0.42), rgba(26, 127, 255, 0.28)),
    var(--ends-navy);
}

.universe-card-link:hover .universe-cover,
.universe-card-link:focus-visible .universe-cover {
  transform: scale(1.035);
}

.sourcebook-cover {
  min-height: 240px;
  background-size: cover;
  background-position: center;
}

@media (min-width: 768px) {
  .sourcebook-cover {
    min-height: 100%;
  }
}

.universe-overlay {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
}

.universe-overlay h2,
.universe-overlay p {
  margin-bottom: 0;
}

.universe-overlay h2 {
  color: #fff;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
  line-height: 1.05;
}

.universe-overlay p {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.95rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.universe-overlay .status-pill {
  margin-bottom: 0.15rem;
  text-shadow: none;
  box-shadow: 0 8px 22px rgba(8, 12, 26, 0.26);
}

.universe-detail-hero {
  position: relative;
  width: 100vw;
  min-height: min(680px, calc(100vh - 56px));
  margin-inline: calc(50% - 50vw);
  margin-top: -1.25rem;
  margin-bottom: 0;
  padding: clamp(4rem, 8vw, 7rem) max(clamp(1rem, 4vw, 3rem), calc((100vw - 1320px) / 2));
  color: #fff;
  background-color: var(--ends-navy);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: end;
}

.universe-detail-hero-content {
  max-width: 760px;
}

.universe-detail-hero h1 {
  margin: 1rem 0 0.6rem;
  color: #fff;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.95;
}

.universe-detail-hero .lead {
  color: rgba(255, 255, 255, 0.84);
}

.universe-detail-subtitle {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
}

.universe-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.universe-marketing-html {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

.universe-marketing-html > * {
  max-width: 1320px;
  margin-inline: auto;
}

.universe-marketing-html > .full-bleed,
.universe-marketing-html > [data-full-bleed="true"] {
  max-width: none;
}

.universe-marketing-html > .marketing-section {
  padding: clamp(2rem, 5vw, 4rem) max(clamp(1rem, 4vw, 3rem), calc((100vw - 1320px) / 2));
}

.universe-marketing-html h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.universe-marketing-html h3 {
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.universe-marketing-html .marketing-grid,
.universe-marketing-html .feature-grid,
.universe-marketing-html .resource-grid {
  display: grid;
  gap: 1rem;
}

.universe-marketing-html .marketing-card,
.universe-marketing-html .feature-card,
.universe-marketing-html .callout {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(27, 32, 64, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(27, 32, 64, 0.08);
}

.universe-marketing-html .dark-band {
  max-width: none;
  color: #fff;
  background: var(--ends-navy);
}

.universe-marketing-html .dark-band .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.universe-marketing-html-only {
  margin-bottom: 0;
}

.universe-detail-layout {
  display: grid;
  gap: clamp(1.25rem, 4vw, 2rem);
  align-items: start;
  margin-top: clamp(2rem, 5vw, 4rem);
}

.universe-main {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.universe-section {
  max-width: 880px;
}

.universe-section h2 {
  margin: 0.35rem 0 0.8rem;
  font-size: clamp(2rem, 5vw, 3rem);
}

.universe-copy {
  font-size: 1.05rem;
}

.universe-copy h3 {
  margin-top: 1.25rem;
}

.universe-copy ul,
.universe-copy ol {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.25rem;
}

.universe-copy p:last-child,
.universe-copy ul:last-child,
.universe-copy ol:last-child {
  margin-bottom: 0;
}

.universe-info-grid {
  display: grid;
  gap: 1rem;
}

.universe-info-panel,
.universe-resource-panel {
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
}

.universe-info-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.universe-info-panel h2 {
  font-size: 1.25rem;
}

.universe-info-panel p:last-child,
.universe-resource-panel p:last-child {
  margin-bottom: 0;
}

.universe-resource-panel {
  position: sticky;
  top: 5rem;
  padding: 1.25rem;
}

.universe-resource-head h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: 2rem;
}

.universe-resource-head p {
  color: var(--tblr-muted);
}

.universe-resource-group {
  display: grid;
  gap: 0.6rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(27, 32, 64, 0.12);
}

.universe-resource-group h3 {
  margin-bottom: 0;
  font-size: 1rem;
}

.universe-resource-list {
  display: grid;
  gap: 0.5rem;
}

.universe-resource-cta {
  position: relative;
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem;
  color: var(--ends-navy);
  text-decoration: none;
  border: 1px solid rgba(27, 32, 64, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 252, 0.96));
  box-shadow: 0 10px 24px rgba(27, 32, 64, 0.06);
}

.universe-resource-cta::after {
  content: "View";
  justify-self: start;
  margin-top: 0.35rem;
  padding: 0.25rem 0.65rem;
  color: #fff;
  border-radius: 999px;
  background: var(--ends-purple);
  font-size: 0.78rem;
  font-weight: 700;
}

.universe-resource-download::after {
  content: "Download";
}

.universe-resource-open::after {
  content: "Open";
}

.universe-resource-cta-primary {
  margin-top: 1rem;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(27, 32, 64, 0.96), rgba(64, 46, 115, 0.96));
  box-shadow: 0 18px 38px rgba(27, 32, 64, 0.18);
}

.universe-resource-cta:hover {
  color: #fff;
  background: var(--ends-navy);
  transform: translateY(-1px);
}

.universe-resource-cta span {
  color: var(--ends-purple);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.universe-resource-cta strong {
  font-size: 1rem;
  line-height: 1.2;
}

.universe-resource-cta small {
  color: var(--tblr-muted);
}

.universe-resource-cta-primary span,
.universe-resource-cta-primary small,
.universe-resource-cta:hover span,
.universe-resource-cta:hover small {
  color: rgba(255, 255, 255, 0.72);
}

.universe-resource-cta-primary::after,
.universe-resource-cta:hover::after {
  color: var(--ends-navy);
  background: #fff;
}

.universe-resources-bottom {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4rem) max(clamp(1rem, 4vw, 3rem), calc((100vw - 1320px) / 2));
  background:
    linear-gradient(180deg, rgba(27, 32, 64, 0.03), rgba(27, 32, 64, 0.08));
}

.universe-resources-marketing-mode {
  margin-top: 0;
}

.universe-resources-inner {
  max-width: 1320px;
  margin-inline: auto;
}

.universe-resources-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.universe-resources-header h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
}

.universe-resource-button-groups {
  display: grid;
  gap: 1rem;
}

.universe-resource-button-group {
  display: grid;
  gap: 0.65rem;
}

.universe-resource-button-group h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ends-navy);
}

.universe-resource-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.universe-resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--resource-bg, var(--ends-navy));
  box-shadow: 0 12px 26px var(--resource-shadow, rgba(27, 32, 64, 0.16));
  font-weight: 800;
  line-height: 1.1;
}

.universe-resource-button:hover {
  color: #fff;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.resource-type-sourcebook {
  --resource-bg: #243b73;
  --resource-shadow: rgba(36, 59, 115, 0.22);
}

.resource-type-character_sheet {
  --resource-bg: #7a2f72;
  --resource-shadow: rgba(122, 47, 114, 0.22);
}

.resource-type-vehicle_sheet {
  --resource-bg: #9b4b22;
  --resource-shadow: rgba(155, 75, 34, 0.22);
}

.resource-type-quick_reference {
  --resource-bg: #28675f;
  --resource-shadow: rgba(40, 103, 95, 0.22);
}

.resource-type-map {
  --resource-bg: #59612a;
  --resource-shadow: rgba(89, 97, 42, 0.22);
}

.resource-type-pregen {
  --resource-bg: #8a2f3d;
  --resource-shadow: rgba(138, 47, 61, 0.22);
}

.resource-type-beta {
  --resource-bg: #4b4a90;
  --resource-shadow: rgba(75, 74, 144, 0.22);
}

.resource-type-external {
  --resource-bg: #315f8f;
  --resource-shadow: rgba(49, 95, 143, 0.22);
}

.resource-type-resource {
  --resource-bg: #4a5568;
  --resource-shadow: rgba(74, 85, 104, 0.22);
}

@media (min-width: 992px) {
  .universe-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  }

  .universe-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .universe-marketing-html .marketing-grid,
  .universe-marketing-html .feature-grid,
  .universe-marketing-html .resource-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sourcebook-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.25rem;
}

.sourcebook-body h2,
.sourcebook-body p {
  margin-bottom: 0;
}

.sourcebook-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: var(--tblr-font-sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--status-text, var(--ends-navy));
  background: var(--status-bg, rgba(26, 127, 255, 0.12));
  border: 1px solid var(--status-border, rgba(26, 127, 255, 0.26));
}

.legal-panel {
  max-width: 880px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.community-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.about-band {
  background: var(--ends-navy);
  color: #fff;
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.about-band .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* ---------------------------------------------------------------------------
   Universe content pages: lore, pregens, rule changes, glossary, gallery.
   Populated by `spark universes:content-import` from the book manuscripts.
   --------------------------------------------------------------------------- */

/* Self-contained surface on purpose. Marketing HTML is pasted in per universe
   and can restyle `body` (Ink & Mayhem sets it to near-black), so the nav must
   carry its own background rather than inherit whatever is behind it. */
.universe-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: clamp(1rem, 3vw, 1.75rem);
  padding: 0.4rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(27, 32, 64, 0.08);
}

.universe-subnav-link {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  color: var(--ends-navy);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.universe-subnav-link:hover,
.universe-subnav-link:focus-visible {
  background: rgba(27, 32, 64, 0.07);
  color: var(--ends-navy);
}

.universe-subnav-link.is-active {
  background: var(--ends-navy);
  color: #fff;
}

.universe-section-hero {
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.75rem, 5vw, 3rem);
  border-radius: 12px;
  background-color: var(--ends-navy);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.universe-section-hero-content {
  max-width: 760px;
}

.universe-section-hero h1 {
  color: #fff;
  margin: 0.35rem 0 0.5rem;
}

.universe-section-hero .site-kicker,
.universe-section-hero .site-kicker a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.universe-section-hero .site-kicker a:hover {
  color: #fff;
  text-decoration: underline;
}

.universe-section-hero .lead {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 0;
}

/* At-a-glance facts */

.universe-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}

.universe-fact {
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
}

.universe-fact dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ends-purple);
  font-weight: 700;
}

.universe-fact dd {
  margin: 0.35rem 0 0;
}

/* Voice sample */

.universe-voice-sample blockquote {
  margin: 0 0 0.85rem;
  padding-left: 1rem;
  border-left: 3px solid var(--ends-purple);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.5;
  font-style: italic;
  color: var(--ends-navy);
}

.universe-voice-sample blockquote:last-child {
  margin-bottom: 0;
}

/* Core conceits */

.universe-conceit-list {
  counter-reset: conceit;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.universe-conceit {
  counter-increment: conceit;
  position: relative;
  padding: 1.1rem 1.25rem 1.1rem 3.4rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
}

.universe-conceit::before {
  content: counter(conceit);
  position: absolute;
  top: 1.1rem;
  left: 1.1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ends-purple);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.universe-conceit h3 {
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.universe-conceit p {
  margin: 0;
}

/* Touchstones */

.universe-touchstone-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.universe-touchstone {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
}

.universe-touchstone-name {
  font-weight: 800;
  color: var(--ends-navy);
}

.universe-touchstone-tag {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(27, 32, 64, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.universe-touchstone-note {
  flex: 1 1 16rem;
  color: rgba(27, 32, 64, 0.72);
  font-size: 0.95rem;
}

/* Pregens */

.universe-pregen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

.universe-pregen-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(27, 32, 64, 0.06);
  overflow: hidden;
}

.universe-pregen-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.universe-pregen-body {
  padding: clamp(1rem, 3vw, 1.35rem);
}

.universe-pregen-body h2 {
  font-size: 1.3rem;
  margin: 0 0 0.25rem;
}

.universe-pregen-tagline {
  color: var(--ends-purple);
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.universe-pregen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.universe-pregen-chip {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(27, 32, 64, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
}

.universe-pregen-quote {
  margin: 0 0 0.75rem;
  padding-left: 0.85rem;
  border-left: 3px solid rgba(27, 32, 64, 0.18);
  font-style: italic;
}

/* Rule changes */

.universe-rule-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.universe-rule {
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-left: 4px solid var(--ends-purple);
  border-radius: 8px;
}

.universe-rule h3 {
  font-size: 1.08rem;
  margin: 0 0 0.4rem;
}

.universe-rule p {
  margin: 0;
}

.universe-rule-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}

.universe-rule-meta dt {
  display: inline;
  color: var(--ends-purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
}

.universe-rule-meta dd {
  display: inline;
  margin: 0 0 0 0.35rem;
  color: rgba(27, 32, 64, 0.75);
}

/* Glossary */

.universe-glossary-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  position: sticky;
  top: 4rem;
  z-index: 2;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
}

.universe-glossary-index a {
  min-width: 1.85rem;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  text-align: center;
  font-weight: 800;
  text-decoration: none;
  color: var(--ends-navy);
}

.universe-glossary-index a:hover {
  background: var(--ends-navy);
  color: #fff;
}

.universe-glossary-letter {
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--ends-purple);
  font-size: 1.5rem;
}

.universe-glossary-list {
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.universe-glossary-entry dt {
  font-weight: 800;
  color: var(--ends-navy);
}

.universe-glossary-entry dd {
  margin: 0.15rem 0 0;
}

.universe-glossary-ref {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: rgba(27, 32, 64, 0.6);
}

/* Gallery */

.universe-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
  /* Cards size to their own content. Without this, a captioned image stretches
     every uncaptioned card in its row and leaves a block of empty white. */
  align-items: start;
}

.universe-gallery-item {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(27, 32, 64, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.universe-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.universe-gallery-item figcaption {
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: rgba(27, 32, 64, 0.75);
}

/* The section pages are content-first: keep them readable on wide screens. */
.universe-glossary-block,
.universe-gallery-grid {
  max-width: 100%;
}

/* ---------------------------------------------------------------------------
   Marketing HTML guardrails.

   `universes.marketing_html` is authored per universe and pasted into admin.
   It brings its own <style>, which is scoped to nothing and can restyle the
   page. These rules constrain the parts that affect layout, without touching
   the look each universe is going for.
   --------------------------------------------------------------------------- */

/* Hero call-to-action buttons are loose inline-block anchors separated by
   &nbsp;, so they wrap on text flow and end up different widths on different
   rows. Equal widths and real margins make the wrap read as a deliberate row.
   Specificity beats the blob's own `.hero-cta`. */
.universe-marketing-html .hero-cta {
  min-width: min(100%, 17rem);
  margin: 0.4rem 0.45rem;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .universe-marketing-html .hero-cta {
    display: block;
    width: 100%;
    margin-inline: 0;
  }
}
