.fortune-portal {
  padding-top: 70px;
  color-scheme: dark;
}

.fortune-portal .site-chrome {
  font: 16px/1.5 Inter, Arial, sans-serif;
}

.fortune-portal .skip {
  z-index: 21000;
}

.fortune-portal .reading-line {
  top: 70px;
  z-index: 101;
}

.fortune-portal .topbar {
  position: relative;
  min-height: 58px;
  height: auto;
  gap: 16px;
  padding-block: 12px;
}

.fortune-portal .topbar .brand {
  font: 500 1rem/1.3 Cinzel, Georgia, serif;
  letter-spacing: .25px;
}

.fortune-portal .topbar nav a {
  font-family: Inter, Arial, sans-serif;
}

.fortune-portal .topbar nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom: 1px solid;
}

.fortune-portal .fortune-invite {
  display: block;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
}

.fortune-invite h2 {
  margin-top: 0;
}

.fortune-portal .prose-section details {
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.fortune-portal .prose-section summary {
  color: var(--gold);
  cursor: pointer;
}

.fortune-portal .prose-section details[open] p {
  margin: 12px 0 0;
}

.fortune-sheet {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(0, 3fr);
  gap: 12px 20px;
  margin-bottom: 24px;
}

.fortune-sheet dt {
  font-weight: 700;
}

.fortune-sheet dd {
  margin: 0;
}

.fortune-portal .book-chapter a {
  overflow-wrap: anywhere;
}

@media screen {
  .fortune-portal {
    --bg: #0c0d0e;
    --panel: #141615;
    --panel2: #1a1c1a;
    --ink: #eee8dc;
    --soft: #c7c5bb;
    --gold: #d4b47a;
    --line: #403a2e;
    --muted: #aba99e;
  }

  .fortune-portal .topbar {
    background: var(--panel);
  }

  .fortune-portal .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 68px);
    min-height: 0;
    margin: 0;
    padding: clamp(32px, 5vw, 70px) 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .fortune-portal .hero::after {
    content: none;
  }

  .fortune-portal .hero-content {
    padding: 0;
    max-width: 100%;
  }

  .fortune-portal .hero h1 {
    font-size: clamp(37px, 5.1vw, 72px);
    text-shadow: none;
  }

  .fortune-portal .hero h1 span {
    display: block;
    color: var(--gold);
  }

  .fortune-portal .hero-subtitle {
    max-width: 34ch;
    color: var(--soft);
  }

  .fortune-art {
    min-width: 0;
    margin: 0;
  }

  .fortune-art-frame {
    padding: 7px;
    border: 1px solid #d4b47a45;
    border-radius: 4px;
    background: #111312;
  }

  .fortune-portal .hero img {
    position: static;
    display: block;
    height: auto;
    aspect-ratio: 3 / 2;
    opacity: 1;
    border-radius: 2px;
  }

  .fortune-portal .hero figcaption {
    margin: 10px 0 0;
    color: var(--muted);
    text-align: left;
    font: 400 .68rem/1.6 Inter, Arial, sans-serif;
  }

  .fortune-portal main .button,
  .fortune-portal main button {
    border-radius: 3px;
    font-family: Inter, Arial, sans-serif;
  }

  .fortune-portal main .button:hover {
    background: #e5c990;
  }

  .fortune-portal .chapter-card,
  .fortune-portal .study-panel,
  .fortune-portal .fortune-invite {
    border-radius: 4px;
    background: linear-gradient(140deg, #1a1c1a, #111312);
  }

  .fortune-portal .chapter-card:hover {
    background: var(--panel2);
  }

  .fortune-portal .map-axes > div {
    border-color: #8b7855;
  }

  .fortune-portal .intro {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }

  .fortune-portal .intro h2 br {
    display: initial;
  }
}

@media screen and (max-width: 760px) {
  .fortune-portal main :is(h1, h2, h3) {
    overflow-wrap: anywhere;
  }

  .fortune-portal .intro,
  .fortune-portal .hero,
  .fortune-sheet {
    grid-template-columns: minmax(0, 1fr);
  }

  .fortune-portal .hero {
    gap: 24px;
  }

  .fortune-portal .topbar nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 16px;
  }

  .fortune-portal .topbar nav a {
    min-height: 36px;
  }

  .fortune-portal .topbar .search-link {
    padding-inline-start: 0;
    border: 0;
  }
}

@media print {
  .fortune-portal {
    padding: 0;
    color-scheme: light;
  }

  .fortune-portal .site-share,
  .fortune-portal .skip,
  .fortune-portal .fortune-art {
    display: none !important;
  }

  .fortune-portal .hero {
    min-height: 0;
  }

  .fortune-portal .prose-section summary {
    color: #111;
  }
}
