/* A viewport is a guide for each chapter, never a clipping boundary. */
.portal-home-slide {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  display: flex;
  align-items: center;
  scroll-margin-block-start: 76px;
}

.portal-home-hero-slide {
  min-block-size: calc(100vh - 84px);
  min-block-size: calc(100svh - 84px);
  background: radial-gradient(circle at 72% 42%, #17302a75, transparent 44%), #0a1918;
  scroll-margin-block-start: 84px;
}
.portal-home-hero-slide .portal-hero {
  min-block-size: 0;
  padding-block: clamp(40px, 6vh, 74px);
}

.portal-stat-band,
.portal-paths-band,
.portal-about-band { padding-block: clamp(44px, 6vh, 90px); }

.portal-stat-band {
  color: #19352e;
  background: linear-gradient(115deg, #eadcc0, #dbc396 59%, #ead8b5);
  border-block: 1px solid #8f6a3455;
}
.portal-stat-band .portal-stat-strip { padding-block: 0; border: 0; }
.portal-stat-band .portal-kicker,
.portal-stat-band .portal-text-link { color: #70441f; }
.portal-stat-band h2 { color: #19352e; }
.portal-stat-band h2 em { color: #865126; }
.portal-stat-band .portal-stat-copy > p:not(.portal-kicker),
.portal-stat-band .portal-stat-grid small { color: #41574e; }
.portal-stat-band .portal-stat-grid { border-color: #29463c50; }
.portal-stat-band .portal-stat-grid > div { border-color: #29463c50; }
.portal-stat-band .portal-stat-grid dt { color: #5c6454; }
.portal-stat-band .portal-stat-grid dd { color: #19352e; }
.portal-stat-band .portal-stat-copy h2 {
  max-inline-size: 520px;
  font-size: clamp(38px, 3.4vw, 56px);
  line-height: 1.1;
}
.portal-stat-band .portal-stat-copy > p:not(.portal-kicker) {
  font-size: clamp(15px, 1.05vw, 18px);
}
.portal-stat-band .portal-stat-grid > div { padding-block: 36px; }
.portal-stat-band .portal-stat-grid dd { font-size: clamp(30px, 2.7vw, 49px); }
.portal-stat-band .portal-stat-grid > div:nth-child(4n + 1) { border-left: 0; }
.portal-stat-band .portal-stat-grid > div:nth-child(n + 5) { border-top: 1px solid #29463c50; }

.portal-paths-band {
  background: radial-gradient(circle at 17% 76%, #203c3280, transparent 45%), #0c1e1b;
  border-bottom: 1px solid #b9945933;
}
.portal-paths-band .portal-paths { padding-block: 0; border: 0; }
.portal-paths-band .portal-path { color: #f6f1e5; }

.portal-home-slide.portal-media-band { margin-top: 0; }

.portal-about-band {
  color: #19352e;
  background: linear-gradient(120deg, #eadcc0, #d8bd8c 58%, #ebd8b3);
  border-top: 1px solid #8f6a3455;
}
.portal-about-band .portal-about-strip { padding-block: 0; border: 0; }
.portal-about-band .portal-kicker,
.portal-about-band .portal-text-link { color: #70441f; }
.portal-about-band h2,
.portal-about-band .portal-about-strip p:not(.portal-kicker) { color: #19352e; }
.portal-about-band .portal-seal { color: #70441f; border-color: #70441f55; }
.portal-about-band .portal-about-strip {
  width: min(1080px, calc(100% - 96px));
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.portal-about-band .portal-seal { width: 110px; height: 110px; font-size: 76px; }
.portal-about-band .portal-about-strip h2 {
  max-inline-size: 800px;
  font-size: clamp(46px, 4vw, 68px);
  line-height: 1.1;
}
.portal-about-band .portal-about-strip p:not(.portal-kicker) {
  max-inline-size: 660px;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.75;
}
.portal-about-band .portal-text-link { grid-column: 2; justify-self: start; font-size: 14px; }

/* Institutional intros share the same full-bleed first chapter. */
.public-portal main > .portal-page-intro {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 84px);
  min-block-size: calc(100svh - 84px);
  margin-inline: 0;
  padding: clamp(52px, 7vh, 100px) max(48px, calc((100% - var(--portal-width)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at 78% 32%, #20403855, transparent 40%), #0a1918;
  border-bottom: 1px solid var(--line);
}
.public-portal main > .portal-about-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(340px, 1fr);
  align-items: center;
}

/* The book opens with its own small constellation of published cards. */
.public-portal main > .portal-book-intro,
.public-portal main > .portal-universe-intro,
.public-portal main > .portal-timeline-intro,
.public-portal main > .portal-brand-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, .72fr);
  gap: clamp(42px, 7vw, 112px);
  align-items: center;
}
.portal-book-intro-copy,
.portal-universe-intro-copy,
.portal-timeline-intro-copy,
.portal-brand-intro-copy { position: relative; z-index: 1; }
.portal-book-intro .portal-lead,
.portal-universe-intro .portal-lead,
.portal-timeline-intro .portal-lead,
.portal-brand-intro .portal-lead { max-inline-size: 620px; }
.portal-book-card-art {
  position: relative;
  isolation: isolate;
  inline-size: min(100%, 390px);
  block-size: 430px;
  margin: 0 0 0 auto;
}
.portal-book-card-orbit {
  position: absolute;
  z-index: -1;
  inset: 26px 0 58px;
  border: 1px solid #d4ad6250;
  border-radius: 50%;
  box-shadow: 0 0 0 34px #d4ad6208, 0 0 0 68px #d4ad6205;
}
.portal-book-card-fan { position: relative; inline-size: 100%; block-size: 350px; }
.portal-book-card {
  position: absolute;
  inset-block-start: 24px;
  inset-inline-start: calc(50% - 82px);
  inline-size: 164px;
  block-size: 248px;
  overflow: hidden;
  border: 1px solid #d5b06a99;
  border-radius: 8px;
  background: #0a1917;
  box-shadow: 0 20px 34px #0008;
}
.portal-book-card:nth-child(1) { transform: translateX(-116px) rotate(-12deg); }
.portal-book-card:nth-child(2) { z-index: 2; transform: translateY(-12px); }
.portal-book-card:nth-child(3) { transform: translateX(116px) rotate(12deg); }
.portal-book-card:only-child { z-index: 2; transform: translateY(-12px); }
.portal-book-card img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.portal-book-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 34px 8px 10px;
  background: linear-gradient(transparent, #081611e8 70%);
  color: #f1e7d2;
  font: 500 15px/1.1 'Playfair Display', serif;
  text-align: center;
}
.portal-book-card-art figcaption {
  position: absolute;
  inset: auto 0 0;
  color: #bca979;
  font: 600 9px/1.65 'Manrope', sans-serif;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}
.portal-chapter-all { color: #e5c77f; }

/* The home caption has reserved space below the cards at every compact width. */
.portal-home-hero-slide .portal-art-caption {
  position: relative;
  z-index: 3;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  line-height: 1.55;
}
.portal-home-hero-slide .portal-art-caption > i {
  display: block;
  flex: 1 1 28px;
  max-inline-size: 48px;
  border-top: 1px solid #d6ac6340;
}
.portal-home-hero-slide .portal-art-caption > span { inline-size: auto; min-inline-size: 132px; width: auto; border: 0; flex: 0 0 auto; }

/* Keep the hero art beside its copy while there is room; never push it below. */
@container public-page (max-width: 1120px) {
  .portal-home-hero-slide .portal-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: clamp(18px, 3cqw, 32px);
  }
  .portal-home-hero-slide .portal-art { block-size: clamp(370px, 42cqw, 440px); }
  .portal-home-hero-slide .portal-orbit { inline-size: min(92%, 350px); }
  .portal-home-hero-slide .portal-card-fan { block-size: clamp(290px, 31cqw, 330px); max-inline-size: 340px; }
  .portal-home-hero-slide .portal-card { inline-size: 174px; block-size: 270px; left: calc(50% - 87px); top: 14px; }
  .portal-home-hero-slide .portal-card:nth-child(1) { transform: translateX(-88px) rotate(-12deg); }
  .portal-home-hero-slide .portal-card:nth-child(2) { transform: translateY(-10px); }
  .portal-home-hero-slide .portal-card:nth-child(3) { transform: translateX(88px) rotate(12deg); }
  .portal-home-hero-slide .portal-art-caption { margin-top: 24px; }
  .public-portal main > .portal-book-intro,
  .public-portal main > .portal-universe-intro,
  .public-portal main > .portal-timeline-intro,
  .public-portal main > .portal-brand-intro { grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr); gap: 32px; }
  .portal-book-card-art { transform: scale(.9); transform-origin: center right; }
  .public-portal main > .portal-chapters-intro { grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); gap: 32px; }
  .portal-chapters-card-art { transform: scale(.9); transform-origin: center right; }
  .public-portal main > .portal-character-grid { min-block-size: auto; align-content: start; }
}
/* Card art never drops below the copy: when the page (not only the window, e.g. with Chat open) narrows, it disappears. */
@container public-page (max-width: 960px) {
  .portal-home-hero-slide .portal-hero { grid-template-columns: 1fr; }
  [data-portal-card-stage],
  .portal-art,
  .portal-book-card-art,
  .portal-chapters-card-art { display: none !important; }
  .public-portal main > .portal-book-intro,
  .public-portal main > .portal-universe-intro,
  .public-portal main > .portal-timeline-intro,
  .public-portal main > .portal-brand-intro { grid-template-columns: 1fr; }
  .portal-book-card-art { display: none; }
  .public-portal main > .portal-chapters-intro { grid-template-columns: 1fr; }
  .portal-chapters-card-art { display: none; }
}

@media (max-width: 960px), (orientation: portrait) {
  .portal-home-hero-slide .portal-hero,
  .portal-card-intro-shell,
  .public-portal main > .portal-page-intro {
    grid-template-columns: 1fr !important;
  }
  [data-portal-card-stage],
  .portal-art,
  .portal-book-card-art,
  .portal-chapters-card-art,
  .portal-book-cover {
    display: none !important;
  }
  /* Without the decorative cover, the reading copy takes the whole section. */
  .public-portal main > .portal-book-layout { grid-template-columns: 1fr; }
  .portal-stat-band .portal-stat-grid > div:nth-child(n + 7),
  .portal-paths-band .portal-path p,
  .portal-paths-band .portal-path-meta,
  .portal-paths-band .portal-path h3 > span,
  .portal-media-band .portal-media-grid > div:nth-child(n + 7),
  .portal-game-band .portal-game-stat-grid {
    display: none !important;
  }
}

.portal-home-hero-slide .portal-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
}
.portal-home-hero-slide .portal-actions .button {
  min-width: 130px;
  min-height: 44px;
  height: 44px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  justify-content: center;
  text-align: center;
  gap: 8px;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .portal-home-hero-slide .portal-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
  }
  .portal-home-hero-slide .portal-actions .button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    padding: 0 12px;
    font-size: 12px;
    gap: 6px;
  }
}

/* Seven steps become a single illustrated route rather than seven heavy cards. */
.portal-game-band .portal-game-dashboard { gap: 18px; }
.portal-game-band .portal-journey-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  max-inline-size: none;
  padding: 18px 10px 14px;
  overflow: hidden;
  border: 1px solid #d6b35e59;
  border-radius: 7px;
  background: linear-gradient(125deg, #0f2b24e8, #071914e8);
}
.portal-game-band .portal-journey-steps::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 54px 7.6% auto;
  block-size: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, #d7b7689e 8%, #d7b7689e 92%, transparent);
  transform: none;
}
.portal-game-band .portal-journey-steps li,
.portal-game-band .portal-journey-steps li:first-child {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 13px 35px auto auto;
  justify-items: center;
  align-items: center;
  min-block-size: 118px;
  padding: 0 5px;
  container-type: inline-size;
  gap: 7px;
  grid-column: auto;
  border: 0;
  background: transparent;
}
.portal-game-band .portal-journey-steps span { color: #bba475; font-size: 8px; }
.portal-game-band .portal-journey-steps svg {
  box-sizing: content-box;
  inline-size: 28px;
  block-size: 28px;
  padding: 3px;
  border: 1px solid #d6b35e77;
  border-radius: 50%;
  background: #0b211c;
  color: #f0cb7e;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  box-shadow: 0 0 0 4px #112b238c;
}
.portal-game-band .portal-journey-steps i[data-lucide] {
  box-sizing: content-box;
  inline-size: 28px;
  block-size: 28px;
  padding: 3px;
  border: 1px solid #d6b35e77;
  border-radius: 50%;
  color: #dec782;
  stroke-width: 1.65;
  box-shadow: 0 0 0 4px #112b238c;
}
.portal-game-band .portal-journey-steps strong,
.portal-game-band .portal-journey-steps li:first-child strong {
  color: #e7dfce;
  font: 600 clamp(10px, .88vw, 13px)/1.15 'DM Sans', sans-serif;
  text-align: center;
}
.portal-game-band .portal-journey-steps small {
  display: -webkit-box;
  block-size: calc(1.4em * 5);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  /* Type scales with the column, so every description wraps into the same five lines at any width. */
  /* Capped at 12px: past that the box stops widening too, keeping the same five lines. */
  inline-size: min(100%, 7.7em);
  color: #a9bbb0;
  font: 400 min(100cqi / 7.7, 12px)/1.4 'DM Sans', sans-serif;
  text-align: center;
}
.portal-game-band .portal-journey-steps li:first-child svg,
.portal-game-band .portal-journey-steps li:first-child i[data-lucide] { border-color: #efcb7e; color: #f3d88f; background: #254832; }

/* The public chapter index is another full page chapter, with no fixed-height clipping. */
.public-portal main > .portal-chapters-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  gap: clamp(42px, 7vw, 112px);
  align-items: center;
  background: radial-gradient(circle at 78% 31%, #29463b6b, transparent 42%), #0a1918;
}
.portal-chapters-intro-copy { position: relative; z-index: 1; }
.portal-chapters-intro .portal-lead { max-inline-size: 620px; }
.portal-chapters-card-art {
  position: relative;
  isolation: isolate;
  inline-size: min(100%, 390px);
  block-size: 430px;
  margin: 0 0 0 auto;
}
.portal-chapters-card-art::before,
.portal-chapters-card-art::after {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 31px 12px 59px;
  border: 1px solid #d6ac6340;
  border-radius: 50%;
}
.portal-chapters-card-art::after {
  inset: 67px 52px 95px;
  border-style: dashed;
  box-shadow: 0 0 0 30px #d6ac6306, 0 0 0 64px #d6ac6304;
}
.portal-chapters-card-fan { position: relative; inline-size: 100%; block-size: 350px; }
.portal-chapters-card {
  position: absolute;
  inset-block-start: 24px;
  inset-inline-start: calc(50% - 82px);
  inline-size: 164px;
  block-size: 248px;
  overflow: hidden;
  border: 1px solid #d5b06a99;
  border-radius: 8px;
  background: #0a1917;
  box-shadow: 0 20px 34px #0008;
}
.portal-chapters-card:nth-child(1) { transform: translateX(-116px) rotate(-12deg); }
.portal-chapters-card:nth-child(2) { z-index: 2; transform: translateY(-12px); }
.portal-chapters-card:nth-child(3) { transform: translateX(116px) rotate(12deg); }
.portal-chapters-card:only-child { z-index: 2; transform: translateY(-12px); }
.portal-chapters-card img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.portal-chapters-card > span {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 7px 9px;
  background: linear-gradient(transparent, #071510e9 70%);
  color: #f1e7d2;
  font: 500 15px/1.1 'Playfair Display', serif;
  text-align: center;
}
.portal-chapters-card-empty { display: grid; place-items: center; color: #e7b95f; font-size: 48px; }
.portal-chapters-card-empty > span { position: static; padding: 0; background: transparent; color: inherit; font: inherit; }
.portal-chapters-card-art figcaption {
  position: absolute;
  inset: auto 0 0;
  color: #bca979;
  font: 600 9px/1.65 'Manrope', sans-serif;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}
.public-portal main > .portal-character-grid {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  margin: 0;
  padding: clamp(54px, 7vh, 92px) max(48px, calc((100% - var(--portal-width)) / 2));
  align-content: center;
  background: radial-gradient(circle at 19% 31%, #18372f54, transparent 37%), #0a1918;
  border-block: 1px solid var(--line);
  scroll-margin-block-start: 76px;
}
.public-portal main > .portal-about-strip {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  margin: 0;
  padding: clamp(54px, 7vh, 92px) max(48px, calc((100% - var(--portal-width)) / 2));
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-content: center;
  background: radial-gradient(circle at 78% 42%, #29463b45, transparent 38%), #091916;
  border-block: 1px solid var(--line);
  scroll-margin-block-start: 76px;
}
.public-portal main > .portal-about-strip .portal-seal { inline-size: 86px; block-size: 86px; font-size: 62px; }
.public-portal main > .portal-about-strip h2 { font-size: clamp(34px, 3vw, 48px); }
.public-portal main > .portal-about-strip p:not(.portal-kicker) { max-inline-size: 720px; font-size: clamp(14px, 1.05vw, 17px); }

/* The final brand invitation is a complete chapter before the footer begins. */
.public-portal main > .portal-brand-next {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  margin: 0;
  padding: clamp(54px, 7vh, 92px) max(48px, calc((100% - var(--portal-width)) / 2));
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at 77% 44%, #19362d54, transparent 41%), #0a1918;
  border-block: 1px solid var(--line);
  scroll-margin-block-start: 76px;
}
.public-portal main > .portal-brand-next h2 { font-size: clamp(36px, 3.2vw, 52px); }
.public-portal main > .portal-brand-next p:not(.portal-kicker) { max-inline-size: 680px; }

/* Up to three milestones share a stage with equal free space around each card. */
.public-portal main > .portal-timeline-page {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  display: flex;
  align-items: center;
  padding: clamp(54px, 7vh, 92px) max(48px, calc((100% - var(--portal-width)) / 2));
  background: radial-gradient(circle at 76% 44%, #19362d54, transparent 41%), #0a1918;
  border-block: 1px solid var(--line);
  scroll-margin-block-start: 76px;
}
.portal-timeline-page .portal-timeline {
  position: relative;
  inline-size: min(1120px, 100%);
  block-size: min(760px, calc(100svh - 184px));
  min-block-size: 620px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  transform: translateY(clamp(-36px, -3vh, -20px));
}
.portal-timeline-page .portal-timeline::before { inset: 0 auto 0 50%; }
.portal-timeline-page:has(.portal-timeline-entry:nth-child(2):last-child) .portal-timeline {
  transform: translateY(clamp(-72px, -7vh, -52px));
}
.portal-timeline-page .portal-timeline-entry {
  min-block-size: 0;
  padding: 0;
  align-items: center;
}
.portal-timeline-page .portal-timeline-card {
  align-self: center;
  box-sizing: border-box;
  block-size: 204px;
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
}
.portal-timeline-page .portal-timeline-entry time { margin-bottom: 10px; font-size: 17px; }
.portal-timeline-page .portal-timeline-card h2 { margin: 9px 0 8px; font-size: clamp(23px, 1.8vw, 28px); }
.portal-timeline-page .portal-timeline-card p {
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.portal-timeline-page .portal-path-number { font-size: 8px; }
.portal-timeline-page .portal-timeline-marker {
  inline-size: 22px;
  block-size: 22px;
  margin: 0;
  border-width: 5px;
  align-self: center;
  box-shadow: 0 0 0 1px #d6ac6388, 0 0 0 10px #d6ac6318;
}
.portal-chapters-catalog {
  box-sizing: border-box;
  inline-size: 100%;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  display: flex;
  align-items: center;
  padding-block: clamp(54px, 7vh, 92px);
  color: #19352e;
  background: linear-gradient(115deg, #eadcc0, #dbc396 59%, #ead8b5);
  border-block: 1px solid #8f6a3455;
  scroll-margin-block-start: 76px;
}
.portal-chapters-catalog-inner { inline-size: min(var(--portal-width), calc(100% - 96px)); margin-inline: auto; }
.portal-chapters-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.portal-chapters-heading .portal-kicker { color: #70441f; }
.portal-chapters-heading h2 { color: #19352e; font-size: clamp(37px, 4vw, 58px); }
.portal-chapters-heading h2 em { color: #855126; font-weight: 500; }
.portal-chapters-catalog .chapters-grid { margin-top: 36px; }

@container public-page (max-width: 820px) {
  .portal-stat-band .portal-stat-grid > div:nth-child(odd) { border-left: 0; }
  .portal-stat-band .portal-stat-grid > div:nth-child(n + 3) { border-top: 1px solid #29463c50; }
  /* Eight half-columns: every step spans two, so the last three steps sit centred under the first four. */
  .portal-game-band .portal-journey-steps { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 13px 0; padding-inline: 8px; }
  .portal-game-band .portal-journey-steps li:nth-child(n) { grid-column: span 2; }
  .portal-game-band .portal-journey-steps li:nth-child(5) { grid-column: 2 / span 2; }
  .portal-game-band .portal-journey-steps::before { display: none; }
  .portal-chapters-catalog-inner { inline-size: calc(100% - 40px); }
}

@media (max-width: 680px) {
  .public-portal main > .portal-brand-next { min-block-size: calc(100svh - 76px); padding: 48px 20px; }
  .public-portal main > .portal-timeline-page { min-block-size: auto; padding: 40px 20px; }
  .portal-timeline-page .portal-timeline {
    inline-size: calc(100% - 34px);
    block-size: auto;
    min-block-size: 0;
    margin-inline: 34px 0;
    display: grid;
    grid-template-rows: none;
    gap: 40px;
    transform: none;
  }
  .portal-timeline-page .portal-timeline::before { inset: 0 auto 0 8px; }
  .portal-timeline-page .portal-timeline-entry { display: block; padding: 0; }
  .portal-timeline-page .portal-timeline-card,
  .portal-timeline-page .portal-timeline-entry:nth-child(even) .portal-timeline-card {
    block-size: 250px;
    padding: 23px 22px;
  }
  .portal-timeline-page .portal-timeline-marker {
    position: absolute;
    inset: 29px auto auto -34px;
    inline-size: 19px;
    block-size: 19px;
    margin: 0;
    border-width: 4px;
  }
}

.portal-section-pager {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 46px auto 46px;
  align-items: center;
  justify-items: center;
  min-height: 48px;
  padding: 3px;
  border: 1px solid #b9945977;
  border-radius: 26px;
  background: #142a24;
  box-shadow: 0 8px 24px #0006;
}
.portal-section-pager[hidden] { display: none !important; }
.portal-section-arrow-hint {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: 84px;
  margin: 0;
  padding: 0;
  color: #f1dfbb;
  font: 700 10px/1.2 'Manrope', sans-serif;
  white-space: nowrap;
  letter-spacing: .15em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  /* Centred with `translate`, so `scale` grows from the middle and `transform` only moves it vertically. */
  translate: -50% 0;
  transform-origin: center;
  animation: portal-arrow-hint-float 1.8s ease-in-out infinite;
}
.portal-section-arrow-hint[hidden],
.portal-section-arrow-hint.is-over-footer { display: none !important; }
.portal-section-arrow-hint.is-on-light { color: #173a31; }
.portal-section-arrow-hint span { display: block; }
@media (pointer: coarse), (hover: none), (max-width: 1024px) {
  .portal-section-arrow-hint .portal-section-arrow-hint-keyboard {
    display: none !important;
  }
}
/* First use of the arrows: the hint says thanks with a small pop, then fades away. */
.portal-section-arrow-hint.is-thanking {
  animation: portal-arrow-hint-thanks 1.3s ease-out forwards;
}
@keyframes portal-arrow-hint-thanks {
  /* Only grows while it fades: never shrinks back. */
  0% { opacity: 1; scale: 1; }
  35% { opacity: 1; scale: 1.2; }
  100% { opacity: 0; scale: 1.5; }
}
/* Scrolling nudges the hint (grow, then settle) to suggest the arrows instead. */
.portal-section-arrow-hint.is-nudging {
  animation: portal-arrow-hint-float 1.8s ease-in-out infinite, portal-arrow-hint-nudge .6s ease-in-out;
}
@keyframes portal-arrow-hint-nudge {
  0%, 100% { scale: 1; }
  45% { scale: 1.12; }
}
@keyframes portal-arrow-hint-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.portal-section-control {
  display: grid;
  place-items: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #e7d2ac;
  cursor: pointer;
}
.portal-section-control:hover:not(:disabled) { background: #204036; color: #f5d99a; }
.portal-section-control:disabled { color: #70847b; cursor: default; }
.portal-section-control:focus-visible,
.portal-section-dot:focus-visible { outline: 2px solid #efbd7b; outline-offset: 3px; }
.portal-section-control svg { inline-size: 19px; block-size: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portal-section-dots { display: flex; align-items: center; justify-content: center; gap: 7px; min-inline-size: 68px; padding-inline: 8px; }
.portal-section-dot { inline-size: 7px; block-size: 7px; padding: 0; border: 1px solid #dab97588; border-radius: 50%; background: transparent; cursor: pointer; transition: inline-size .18s ease, background .18s ease, border-color .18s ease; }
.portal-section-dot:hover { border-color: #f1cd85; background: #f1cd8555; }
.portal-section-dot.is-current { inline-size: 20px; border-radius: 8px; border-color: #edc477; background: #edc477; }
.public-portal .public-guide-launcher { right: 12px; }
html.public-guide-open .portal-section-pager { visibility: hidden; pointer-events: none; }
html.public-guide-open .portal-section-arrow-hint { visibility: hidden; }
body:has(.listen-bar:not([hidden])) .portal-section-pager { bottom: 88px; }
body:has(.listen-bar:not([hidden])) .portal-section-arrow-hint { bottom: 148px; }

@media (max-width: 1000px) {
  .public-portal main > .portal-about-intro { grid-template-columns: 1fr; }
  .portal-home-hero-slide .portal-hero { padding-block: 55px; }
}
@media (max-width: 680px) {
  .portal-home-slide {
    min-block-size: calc(100svh - 76px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-block: 0;
  }
  .public-portal main > .portal-home-hero-slide,
  .portal-home-hero-slide {
    min-block-size: calc(100svh - 84px);
    align-items: flex-start;
    justify-content: flex-start;
    padding-block: 0;
  }
  .portal-home-hero-slide > .portal-hero {
    align-self: flex-start;
  }
  .portal-home-slide > .portal-hero,
  .portal-home-slide > .portal-stat-strip,
  .portal-home-slide > .portal-paths,
  .portal-home-slide > .portal-media-inner,
  .portal-home-slide > .portal-game-invite,
  .portal-home-slide > .portal-about-strip {
    margin-top: 24px;
    padding-top: 0;
  }
  .portal-stat-band,
  .portal-paths-band,
  .portal-media-band,
  .portal-game-band,
  .portal-about-band {
    padding-block: 0;
  }
  .public-portal main > .portal-page-intro { padding: 46px 20px; }
  .portal-home-hero-slide .portal-hero {
    padding-block: 0 34px;
  }
  .portal-home-hero-slide .portal-art { block-size: 280px; margin-top: 0; }
  .portal-home-hero-slide .portal-orbit { inline-size: min(82%, 300px); }
  .portal-home-hero-slide .portal-card-fan { block-size: 225px; max-inline-size: 330px; }
  .portal-home-hero-slide .portal-card { inline-size: 136px; block-size: 210px; left: calc(50% - 68px); top: 12px; }
  .portal-home-hero-slide .portal-card:nth-child(1) { transform: translateX(-68px) rotate(-12deg); }
  .portal-home-hero-slide .portal-card:nth-child(2) { transform: translateY(-6px); }
  .portal-home-hero-slide .portal-card:nth-child(3) { transform: translateX(68px) rotate(12deg); }
  .portal-home-hero-slide .portal-art-caption { margin-top: 10px; }
  .portal-stat-band .portal-stat-copy h2 { font-size: 32px; margin-bottom: 6px; }
  .portal-stat-band .portal-stat-copy > p:not(.portal-kicker) {
    font-size: 13.5px;
    line-height: 1.55;
    margin: 6px 0 10px;
  }
  .portal-stat-band .portal-stat-copy .portal-text-link {
    display: inline-block;
    font-size: 13px;
    margin-bottom: 14px;
  }
  .portal-stat-band .portal-stat-grid > div { padding-block: 13px; }
  .portal-stat-band .portal-stat-grid > div:nth-child(5),
  .portal-stat-band .portal-stat-grid > div:nth-child(6) { border-bottom: 0; }
  .portal-stat-band .portal-stat-grid dd { font-size: 29px; }
  .portal-paths-band .portal-path { padding: 16px 18px; }
  .portal-paths-band .portal-path h3 {
    font-size: clamp(20px, 5.8vw, 23px);
    margin-top: 8px;
    margin-bottom: 6px;
  }
  .portal-media-band .portal-media-copy h2 { font-size: 32px; margin-bottom: 6px; }
  .portal-media-band .portal-media-copy > p:not(.portal-kicker) {
    font-size: 13.5px;
    line-height: 1.55;
    margin: 6px 0 10px;
  }
  .portal-media-band .portal-media-copy .portal-text-link {
    display: inline-block;
    font-size: 13px;
    margin-bottom: 14px;
  }
  .portal-media-band .portal-media-grid > div {
    min-height: 0;
    padding-block: 13px;
  }
  .portal-media-band .portal-media-grid > div:nth-child(5),
  .portal-media-band .portal-media-grid > div:nth-child(6) { border-bottom: 0; }
  .portal-media-band .portal-media-grid dd { font-size: 29px; }
  .portal-game-band .portal-game-invite {
    gap: 18px;
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
  }
  .portal-game-band .portal-game-invite-copy h2 {
    font-size: clamp(34px, 9vw, 42px);
    line-height: 1.1;
    margin-bottom: 10px;
  }
  .portal-game-band .portal-game-invite-copy > p:not(.portal-kicker):not(.portal-note) {
    font-size: 14.5px;
    line-height: 1.65;
    margin: 10px 0 16px;
    max-width: none;
  }
  .portal-game-band .portal-game-invite-copy .portal-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    width: 100%;
    margin-top: 2px;
    margin-bottom: 0;
  }
  .portal-game-band .portal-game-invite-copy .portal-actions .button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    justify-content: center;
    text-align: center;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .portal-game-band .portal-game-invite-copy .portal-note { display: none; }
  .portal-game-band .portal-game-dashboard {
    width: 100%;
    min-width: 0;
  }
  .portal-game-band .portal-journey-steps {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    max-inline-size: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .portal-game-band .portal-journey-steps::before { display: none; }
  .portal-game-band .portal-journey-steps li,
  .portal-game-band .portal-journey-steps li:first-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    min-block-size: 0;
    min-height: 0;
    padding: 16px 4px;
    border: 0;
    border-right: 1px solid #d6b35e45;
    border-bottom: 1px solid #d6b35e45;
    background: transparent;
    grid-template-rows: none;
  }
  /* Each step draws its own frame, so only the four and the centred three are outlined. */
  .portal-game-band .portal-journey-steps li:nth-child(-n+4) { border-top: 1px solid #d6b35e45; }
  .portal-game-band .portal-journey-steps li:nth-child(1),
  .portal-game-band .portal-journey-steps li:nth-child(5) { border-left: 1px solid #d6b35e45; }
  .portal-game-band .portal-journey-steps span {
    font-size: 8px;
    font-weight: 700;
    color: #cda967;
    letter-spacing: 0.12em;
  }
  .portal-game-band .portal-journey-steps svg,
  .portal-game-band .portal-journey-steps i[data-lucide] {
    inline-size: 34px;
    block-size: 34px;
    padding: 5px;
  }
  .portal-game-band .portal-journey-steps strong,
  .portal-game-band .portal-journey-steps li:first-child strong {
    font: 600 11px/1.2 'DM Sans', sans-serif;
    color: #e7dfce;
  }
  .portal-game-band .portal-journey-steps small {
    display: none;
  }
  .portal-about-band .portal-about-strip { width: calc(100% - 40px); grid-template-columns: 1fr; gap: 20px; }
  .portal-about-band .portal-seal { width: 64px; height: 64px; font-size: 45px; }
  .portal-about-band .portal-about-strip h2 { font-size: clamp(38px, 10vw, 48px); }
  .portal-about-band .portal-about-strip p:not(.portal-kicker) { font-size: 15px; }
  .portal-about-band .portal-text-link { grid-column: 1; }
  .portal-chapters-catalog { align-items: flex-start; padding-block: 48px; }
  .portal-chapters-heading { display: block; }
  .portal-chapters-heading .portal-kicker { margin-bottom: 12px; }
  .portal-chapters-heading h2 { font-size: clamp(35px, 10vw, 47px); }
  .portal-section-pager { bottom: 16px; min-height: 46px; grid-template-columns: 42px auto 42px; }
  .portal-section-arrow-hint { bottom: 70px; font-size: 9px; }
  .portal-section-control { inline-size: 38px; block-size: 38px; }
  .portal-section-dots { gap: 5px; min-inline-size: 52px; padding-inline: 6px; }
  .portal-section-dot { inline-size: 6px; block-size: 6px; }
  .portal-section-dot.is-current { inline-size: 17px; }
  .public-portal .public-guide-launcher { right: 10px; }
}
@media (max-width: 820px) {
  body:has(.listen-bar:not([hidden])) .portal-section-pager { bottom: 152px; }
  body:has(.listen-bar:not([hidden])) .portal-section-arrow-hint { bottom: 210px; }
}

/* One visual grammar for every primary card stage. */
[data-portal-card-stage] {
  --portal-stage-width: 460px;
  --portal-stage-height: 450px;
  --portal-stage-fan-height: 340px;
  --portal-stage-card-width: 196px;
  --portal-stage-card-height: 294px;
  --portal-stage-card-shift: 105px;
  --portal-stage-card-top: 26px;
  --portal-stage-orbit-width: min(88%, 404px);
  position: relative;
  isolation: isolate;
  inline-size: min(100%, var(--portal-stage-width));
  block-size: var(--portal-stage-height);
  min-inline-size: 0;
  margin: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}
.portal-art[data-portal-card-stage] { margin-inline: auto; }
.portal-home-hero-slide [data-portal-card-stage] { display: flex; }
[data-portal-card-stage] .portal-card-stage-orbit {
  position: absolute;
  z-index: -1;
  inset: auto;
  inset-block-start: 43%;
  inset-inline-start: 50%;
  inline-size: var(--portal-stage-orbit-width);
  block-size: auto;
  aspect-ratio: 1;
  border: 1px solid #d6ac6344;
  border-radius: 50%;
  background: radial-gradient(circle, #a28b401f, transparent 68%);
  box-shadow: 0 0 0 34px #d6ac6308, 0 0 0 68px #d6ac6305;
  transform: translate(-50%, -50%);
}
[data-portal-card-stage] .portal-card-stage-orbit::before,
[data-portal-card-stage] .portal-card-stage-orbit::after {
  content: '';
  position: absolute;
  inset: 10%;
  border: 1px solid #d6ac6326;
  border-radius: 50%;
}
[data-portal-card-stage] .portal-card-stage-orbit::after {
  inset: -10%;
  border-color: #d6ac631f;
  border-style: dashed;
}
[data-portal-card-stage] .portal-card-stage-fan {
  position: relative;
  inline-size: 100%;
  block-size: var(--portal-stage-fan-height);
  flex: 0 0 var(--portal-stage-fan-height);
}
[data-portal-card-stage] .portal-card-stage-card {
  position: absolute;
  inset-block-start: var(--portal-stage-card-top);
  inset-inline-start: calc(50% - (var(--portal-stage-card-width) / 2));
  inline-size: var(--portal-stage-card-width);
  block-size: var(--portal-stage-card-height);
  box-sizing: border-box;
  /* The caption panel sits on this same frame, so the art never peeks out beside it. */
  --portal-card-frame: 5px;
  padding: var(--portal-card-frame);
  margin: 0;
  overflow: hidden;
  border: 1px solid #d5b06aae;
  border-radius: 10px;
  background: #0a1917;
  box-shadow: 0 20px 38px #0009;
  transform-origin: center 80%;
}
[data-portal-card-stage] .portal-card-stage-card:nth-child(1) { transform: translateX(calc(-1 * var(--portal-stage-card-shift))) rotate(-12deg); }
[data-portal-card-stage] .portal-card-stage-card:nth-child(2) { z-index: 2; transform: translateY(-12px); }
[data-portal-card-stage] .portal-card-stage-card:nth-child(3) { transform: translateX(var(--portal-stage-card-shift)) rotate(12deg); }
[data-portal-card-stage] .portal-card-stage-card:only-child { z-index: 2; transform: translateY(-12px); }
.portal-home-hero-slide [data-portal-card-stage] {
  inline-size: min(100%, var(--portal-stage-width));
  block-size: var(--portal-stage-height);
}
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-orbit { inline-size: var(--portal-stage-orbit-width); }
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-fan {
  block-size: var(--portal-stage-fan-height);
  flex-basis: var(--portal-stage-fan-height);
}
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-card {
  inset-block-start: var(--portal-stage-card-top);
  inset-inline-start: calc(50% - (var(--portal-stage-card-width) / 2));
  inline-size: var(--portal-stage-card-width);
  block-size: var(--portal-stage-card-height);
}
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-card:nth-child(1) { transform: translateX(calc(-1 * var(--portal-stage-card-shift))) rotate(-12deg); }
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-card:nth-child(2) { z-index: 2; transform: translateY(-12px); }
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-card:nth-child(3) { transform: translateX(var(--portal-stage-card-shift)) rotate(12deg); }
.portal-home-hero-slide [data-portal-card-stage] .portal-card-stage-card:only-child { z-index: 2; transform: translateY(-12px); }
[data-portal-card-stage] .portal-card-stage-card img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  border-radius: 5px;
}
[data-portal-card-stage] .portal-book-card.portal-card-stage-card > span,
[data-portal-card-stage] .portal-chapters-card.portal-card-stage-card > span {
  inset: auto 5px 5px;
  border-radius: 0 0 5px 5px;
}
.portal-chapters-card-art::before,
.portal-chapters-card-art::after { display: none; }
[data-portal-card-stage] .portal-card-stage-caption {
  position: absolute;
  z-index: 3;
  inset: auto 0 42px;
  inline-size: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #c9b27d;
  font: 650 clamp(11px, .72vw, 13px)/1.48 'Manrope', sans-serif;
  letter-spacing: .17em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}
[data-portal-card-stage] .portal-card-stage-caption > i {
  display: block;
  flex: 1 1 42px;
  max-inline-size: 58px;
  border-top: 1px solid #d6ac6357;
}
[data-portal-card-stage] .portal-card-stage-caption > span {
  inline-size: auto;
  min-inline-size: 194px;
  flex: 0 0 auto;
  border: 0;
}

@container public-page (max-width: 1120px) {
  [data-portal-card-stage] {
    --portal-stage-width: 404px;
    --portal-stage-height: 406px;
    --portal-stage-fan-height: 306px;
    --portal-stage-card-width: 166px;
    --portal-stage-card-height: 250px;
    --portal-stage-card-shift: 88px;
    --portal-stage-card-top: 22px;
    transform: none;
  }
  [data-portal-card-stage] .portal-card-stage-caption { inset-block-end: 38px; }
}

@container public-page (max-width: 960px) {
  [data-portal-card-stage] {
    --portal-stage-width: 390px;
    --portal-stage-height: 386px;
    --portal-stage-fan-height: 290px;
    --portal-stage-card-width: 158px;
    --portal-stage-card-height: 238px;
    --portal-stage-card-shift: 84px;
    --portal-stage-card-top: 19px;
    --portal-stage-orbit-width: min(86%, 338px);
    margin: 10px auto 0;
    display: flex;
  }
  [data-portal-card-stage] .portal-card-stage-caption { inset-block-end: 42px; }
}

@container public-page (max-width: 680px) {
  [data-portal-card-stage] {
    --portal-stage-width: 340px;
    --portal-stage-height: 326px;
    --portal-stage-fan-height: 246px;
    --portal-stage-card-width: 132px;
    --portal-stage-card-height: 198px;
    --portal-stage-card-shift: 69px;
    --portal-stage-card-top: 14px;
    --portal-stage-orbit-width: min(84%, 278px);
    margin-block-start: 4px;
  }
  [data-portal-card-stage] .portal-card-stage-card { --portal-card-frame: 4px; border-radius: 8px; }
  [data-portal-card-stage] .portal-card-stage-caption {
    inset-block-end: 52px;
    gap: 8px;
    font-size: 10px;
    letter-spacing: .13em;
  }
  [data-portal-card-stage] .portal-card-stage-caption > i { max-inline-size: 34px; }
  [data-portal-card-stage] .portal-card-stage-caption > span { min-inline-size: 168px; }
}

@container public-page (max-width: 420px) {
  [data-portal-card-stage] {
    --portal-stage-width: 300px;
    --portal-stage-height: 306px;
    --portal-stage-fan-height: 226px;
    --portal-stage-card-width: 118px;
    --portal-stage-card-height: 177px;
    --portal-stage-card-shift: 61px;
    --portal-stage-orbit-width: min(82%, 246px);
    inline-size: min(calc(100vw - 40px), var(--portal-stage-width));
  }
  [data-portal-card-stage] .portal-card-stage-caption { font-size: 9px; }
  [data-portal-card-stage] .portal-card-stage-caption > i { max-inline-size: 24px; }
  [data-portal-card-stage] .portal-card-stage-caption > span { min-inline-size: 158px; }
}

/* Every primary route opens on the same compositional grid. */
.public-portal main > [data-portal-card-intro] {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 680px) {
  .public-portal main > [data-portal-card-intro] {
    align-items: flex-start;
    justify-content: flex-start;
  }
}
.portal-card-intro-shell {
  box-sizing: border-box;
  inline-size: min(var(--portal-width), calc(100% - 96px));
  margin-inline: auto;
  padding-block: clamp(40px, 6vh, 74px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
[data-portal-card-intro] .portal-card-intro-copy {
  position: relative;
  z-index: 1;
  align-self: start;
  min-block-size: 482px;
}
[data-portal-card-intro] .portal-card-intro-shell h1 {
  max-inline-size: 620px;
  min-block-size: 2.1em;
  font-size: clamp(54px, 5.7vw, 84px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
[data-portal-card-intro] .portal-card-intro-shell .portal-lead {
  max-inline-size: 510px;
  min-block-size: 5.55em;
  margin: 26px 0;
}
.portal-chapters-intro .portal-card-intro-copy .portal-lead { max-inline-size: 430px; }
[data-portal-card-intro] [data-portal-card-stage] {
  justify-self: center;
  align-self: center;
  margin-inline: auto;
}
[data-portal-card-intro] .portal-note { min-block-size: 43px; }

/* On wide screens the Universe actions balance the card stage from the center of the copy column;
   once the intro stacks, they line up on the left like every other page. */
@media (min-width: 961px) {
  .portal-universe-intro .portal-actions { justify-content: center; }
}

/* Character summaries keep the card rhythm while adapting to every card width. */
.portal-character { display: flex; flex-direction: column; }
.portal-character > div:not(.portal-monogram) { display: flex; flex: 1; flex-direction: column; }
.portal-character p {
  min-block-size: calc(1.7em * 3);
  max-block-size: calc(1.7em * 3);
  margin: 10px 0 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.portal-character .portal-text-link { margin-top: auto; }

@media (min-width: 1001px) and (max-height: 760px) {
  [data-portal-card-intro] .portal-card-intro-copy { min-block-size: 450px; }
}

@container public-page (max-width: 960px) {
  .portal-card-intro-shell {
    inline-size: calc(100% - 64px);
    grid-template-columns: 1fr;
    gap: 18px;
  }
  [data-portal-card-intro] .portal-card-intro-copy { min-block-size: 0; }
  .portal-chapters-intro .portal-card-intro-copy .portal-lead { max-inline-size: 510px; }
}

@container public-page (max-width: 680px) {
  .portal-card-intro-shell {
    inline-size: calc(100% - 40px);
    padding-block: 38px 34px;
  }
  [data-portal-card-intro] .portal-card-intro-shell h1 {
    font-size: clamp(42px, 12cqw, 66px);
  }
  [data-portal-card-intro] .portal-card-intro-shell .portal-lead {
    min-block-size: 7em;
    margin: 20px 0;
    font-size: 15px;
    line-height: 1.75;
  }
  [data-portal-card-intro] .portal-note { min-block-size: 0; }
  [data-portal-card-intro] .portal-actions { min-block-size: 44px; }
  [data-portal-card-intro] [data-portal-card-stage] { margin-block-start: 4px; }
}

@container public-page (max-width: 420px) {
  [data-portal-card-intro] .portal-card-intro-shell h1 {
    font-size: clamp(38px, 12cqw, 46px);
  }
  [data-portal-card-intro] .portal-card-intro-shell .portal-lead { min-block-size: 8.75em; }
}

/* Public layout contract: every editorial chapter owns at least one viewport.
   Use a minimum only: long copy may grow instead of being clipped. */
.public-portal main > section[class],
.public-portal main > aside[class],
.public-portal main > [data-portal-card-intro],
.public-portal main > .portal-brand-gallery .portal-brand-entry {
  box-sizing: border-box;
  min-block-size: calc(100vh - 76px);
  min-block-size: calc(100svh - 76px);
  scroll-margin-block-start: 76px;
}
.public-portal main > .portal-book-layout,
.public-portal main > .portal-character-grid,
.public-portal main > .portal-about-content,
.public-portal main > .portal-contact {
  align-content: center;
}
.public-portal main > .portal-author-band {
  display: flex;
  align-items: center;
}

/* One unbroken timeline replaces the horizontal chapter dividers. */
.public-portal main > .portal-timeline-page {
  position: relative;
  isolation: isolate;
  border-block: 0;
}
.public-portal main > .portal-timeline-page::before {
  position: absolute;
  z-index: 0;
  content: '';
  inset: 0 auto 0 50%;
  inline-size: 1px;
  background: #b9945978;
  pointer-events: none;
}
.portal-timeline-page .portal-timeline {
  z-index: 1;
}
.portal-timeline-page .portal-timeline::before { display: none; }
.portal-timeline-page .portal-timeline-marker {
  inline-size: 30px;
  block-size: 30px;
  border-width: 7px;
  box-shadow: 0 0 0 1px #d6ac63aa, 0 0 0 13px #d6ac6322;
}

@media (max-width: 680px) {
  .public-portal main > .portal-timeline-page::before { inset-inline-start: 62px; }
  .portal-timeline-page .portal-timeline-marker {
    inset-inline-start: 8px;
    inline-size: 28px;
    block-size: 28px;
    border-width: 6px;
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-section-dot { transition: none; }
  .portal-section-arrow-hint { animation: none; }
}

/* Number blocks (stats, media and game): labels and captions sized to be read on a phone too. */
.portal-stat-grid dt,
.portal-media-grid dt,
.portal-game-stat-grid dt { font-size: 11px; line-height: 1.4; letter-spacing: .12em; }
.portal-stat-grid small,
.portal-media-grid small,
.portal-game-stat-grid small { font-size: 12px; line-height: 1.4; }
/* Lining figures sit on one baseline (Playfair defaults to old-style, where 5, 7 and 16 bob up and
   down), and every block stacks label, number and caption with the same rhythm. */
.portal-stat-grid dd,
.portal-media-grid dd,
.portal-game-stat-grid dd { margin: 10px 0 6px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; font-feature-settings: 'lnum' 1, 'tnum' 1; }
.portal-stat-grid > div,
.portal-media-grid > div,
.portal-game-stat-grid > div { justify-content: center; }

/* Short screens: the reading section keeps its call and chapter list, and drops the side note. */
@media (max-height: 720px) {
  /* Short landscape screens keep the cover, just smaller. */
  .portal-book-layout .portal-book-cover { min-height: 0; height: min(400px, calc(100svh - 76px - 150px)); padding: 26px; justify-content: center; }
  .portal-book-layout .portal-book-cover > span { font-size: 32px; }
  .portal-book-layout .portal-book-cover i { font-size: 76px; margin: 6px 0; }
  .portal-book-layout .portal-book-cover strong { margin-top: 14px; }
  .portal-book-layout .portal-muted { display: none; }
  /* Room at the bottom for the arrows hint and the pager, so the list never runs under them. */
  .public-portal main > .portal-book-layout { padding-block: 8px 104px; }
  .portal-book-layout .portal-reading h2 { margin-bottom: 14px; }
  .portal-book-layout .portal-reading > p:not(.portal-kicker) { margin-bottom: 8px; }
  .portal-book-layout .portal-chapter-list { margin: 14px 0 0; }
  .portal-book-layout .portal-chapter-list a { padding: 13px 0; }
}

/* Chapter numbers share one width, so every title in the list starts on the same line. */
.portal-chapter-list span { min-inline-size: 2ch; font-variant-numeric: tabular-nums; }
@media (max-height: 620px) {
  .portal-book-layout .portal-chapter-list a { padding: 10px 0; }
  .portal-book-layout .portal-reading h2 { margin-bottom: 10px; }
}

/* The dot of a carousel section: a loop symbol that turns in place as the carousel advances. */
.portal-section-dot.is-loop { display: grid; place-items: center; inline-size: 16px; block-size: 16px; border: 0; border-radius: 50%; background: transparent; color: #dab975aa; }
.portal-section-dot.is-loop svg { inline-size: 12px; block-size: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transform: rotate(var(--loop-turn, 0deg)); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.portal-section-dot.is-loop:hover { background: #f1cd8522; color: #f1cd85; }
.portal-section-dot.is-loop.is-current { inline-size: 20px; block-size: 20px; border-radius: 50%; background: #edc477; color: #14211e; }
.portal-section-dot.is-loop.is-current svg { inline-size: 14px; block-size: 14px; }
@media (prefers-reduced-motion: reduce) { .portal-section-dot.is-loop svg { transition: none; } }

/* Phones: like the home sections, the reading section starts at the top (kicker 25px below the
   header) instead of floating in the middle of a tall screen. */
@media (max-width: 680px) {
  .public-portal main > .portal-book-layout { align-content: start; padding-top: 25px; }
  .portal-book-layout .portal-reading .portal-kicker { margin-top: 0; }
}

/* Desktop and tablet: larger step medallions (the connecting line follows their centre). Phones keep
   their own sizes in the max-width: 680px block. */
@media (min-width: 681px) {
  .portal-game-band .portal-journey-steps::before { inset-block-start: 64px; }
  .portal-game-band .portal-journey-steps li,
  .portal-game-band .portal-journey-steps li:first-child { grid-template-rows: 13px 50px auto auto; }
  .portal-game-band .portal-journey-steps svg,
  .portal-game-band .portal-journey-steps i[data-lucide] { inline-size: 36px; block-size: 36px; padding: 6px; }
}
