.story-portal.is-open .book-stage {
  width: min(1800px, 99vw);
  height: min(1100px, 98dvh);
}

.open-spread {
  padding: clamp(24px, 2.7vw, 42px) clamp(30px, 3.5vw, 54px) 13px;
  border: 8px ridge #a77b42;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18px 18px, #f0cf84 0 3px, #694421 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) 18px, #f0cf84 0 3px, #694421 4px 6px, transparent 7px),
    radial-gradient(circle at 18px calc(100% - 18px), #f0cf84 0 3px, #694421 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), #f0cf84 0 3px, #694421 4px 6px, transparent 7px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px),
    linear-gradient(135deg, #6d3d1f, #2c150d 18%, #361b11 82%, #704524);
  box-shadow: 0 0 0 3px #27130c, 0 10px 0 #4b2917, 0 19px 38px rgba(0,0,0,.68), inset 0 0 25px rgba(0,0,0,.64);
}
.open-spread::before { display: none; }
.open-spread::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 10px;
  border: 1px solid rgba(224,184,110,.62);
  border-radius: 7px;
  box-shadow: inset 0 0 12px rgba(0,0,0,.18);
  pointer-events: none;
}
.site-book-view {
  border: 1px solid #8c6538;
  outline: 2px solid #d9c397;
  box-shadow: 0 0 0 5px #74502c, 0 0 0 8px #ead9b3, 0 0 0 11px #4a2917, inset 0 0 0 7px rgba(238,220,181,.9);
  background:
    linear-gradient(90deg, #b99a68 0, #ead8b1 5px, transparent 10px, transparent calc(50% - 8px), rgba(61,37,21,.24) calc(50% - 2px), rgba(242,224,187,.28) 50%, rgba(61,37,21,.22) calc(50% + 3px), transparent calc(50% + 9px), transparent calc(100% - 10px), #ead8b1 calc(100% - 5px), #b99a68 100%),
    repeating-linear-gradient(0deg, rgba(93,64,35,.14) 0 1px, rgba(255,246,219,.3) 2px 3px, #e4d1aa 4px 5px);
  padding: 9px;
}
.book-page { inset: 9px; }
.page-leaf { top: 9px; bottom: 9px; }
.page-zone { z-index: 7; }
.open-spread {
  border: 12px ridge #9b6a35;
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(197,147,76,.2), transparent 58%),
    repeating-linear-gradient(0deg, rgba(250,215,151,.055) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, #754625 0%, #482817 9%, #32190f 24%, #28130d 49%, #351a10 76%, #482817 91%, #754625 100%);
  box-shadow: 0 0 0 3px #27130c, 0 8px 0 #4b2917, 0 18px 0 #2d170e, 0 27px 48px rgba(0,0,0,.72), inset 0 0 24px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,225,168,.48);
}
.open-spread::before {
  display: block;
  z-index: 7;
  inset: 10px;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: auto;
  transform: none;
  background: linear-gradient(90deg, rgba(234,205,148,.28), transparent 1.2%, transparent 48.8%, rgba(32,17,11,.52) 49.7%, rgba(227,190,125,.25) 50%, rgba(32,17,11,.48) 50.3%, transparent 51.2%, transparent 98.8%, rgba(234,205,148,.25));
  box-shadow: inset 0 0 0 1px rgba(231,190,117,.62), inset 0 0 16px rgba(0,0,0,.25);
  pointer-events: none;
}
.page-leaf, .page-preview { pointer-events: none !important; }
.book-page.is-leaving {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.book-page.is-entering { animation: none !important; opacity: 1 !important; transform: none !important; }
.page-leaf {
  perspective: 1300px;
  transform-style: preserve-3d;
  backface-visibility: visible;
  filter: drop-shadow(0 3px 5px rgba(24,13,6,.38));
}
.page-leaf-front, .page-leaf-back {
  background-color: #ebdfc4;
  background-image:
    repeating-linear-gradient(0deg, rgba(119,89,53,.045) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, #a98b5d, #efe4ca 6%, #e6d7b5 91%, #92744a);
  box-shadow: inset 0 0 17px rgba(75,48,21,.16);
}
.page-leaf-back {
  transform: rotateY(180deg);
  background-image:
    repeating-linear-gradient(0deg, rgba(119,89,53,.045) 0 1px, transparent 1px 5px),
    linear-gradient(270deg, #a98b5d, #efe4ca 6%, #e6d7b5 91%, #92744a);
}
.page-preview {
  right: auto !important;
  bottom: auto !important;
  max-width: none !important;
}
.page-preview.preview-left { left: 0 !important; }
.book-stage.turning-next .page-leaf {
  left: 50%;
  transform-origin: left center;
  animation: turn-forward .96s cubic-bezier(.42,.02,.24,1) both;
}
.book-stage.turning-prev .page-leaf {
  left: 0;
  transform-origin: right center;
  animation: turn-back .96s cubic-bezier(.42,.02,.24,1) both;
}
@keyframes turn-forward {
  0% { transform: rotateY(0deg) translateZ(2px); }
  28% { transform: rotateY(-42deg) translateZ(7px) scaleX(.98); }
  55% { transform: rotateY(-104deg) translateZ(11px) scaleX(.93); }
  78% { transform: rotateY(-151deg) translateZ(6px) scaleX(.98); }
  100% { transform: rotateY(-180deg) translateZ(0); }
}
@keyframes turn-back {
  0% { transform: rotateY(0deg) translateZ(2px); }
  28% { transform: rotateY(42deg) translateZ(7px) scaleX(.98); }
  55% { transform: rotateY(104deg) translateZ(11px) scaleX(.93); }
  78% { transform: rotateY(151deg) translateZ(6px) scaleX(.98); }
  100% { transform: rotateY(180deg) translateZ(0); }
}
.page-zone-prev, .page-zone-next { width: clamp(22px, 3vw, 42px); }
.page-zone-prev:hover { background: linear-gradient(90deg, rgba(224,184,110,.18), transparent); }
.page-zone-next:hover { background: linear-gradient(270deg, rgba(224,184,110,.18), transparent); }
@media (max-width: 760px) {
  .open-spread { padding: 13px 13px 8px; border-width: 7px; border-radius: 12px; }
  .open-spread::after { inset: 5px; }
  .open-spread::before { inset: 6px; left: 6px; top: 6px; bottom: 6px; }
  .site-book-view { padding: 5px; box-shadow: 0 0 0 2px #d9c397, 0 0 0 4px #74502c, 0 0 0 6px #ead9b3, inset 0 0 0 4px rgba(238,220,181,.9); }
  .book-page { inset: 5px; }
  .page-leaf { top: 5px; bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-stage.turning-next .page-leaf, .book-stage.turning-prev .page-leaf { animation-duration: .01ms !important; }
}

/* The open-book illustration is the physical spread; the live site sits on its pages. */
.story-portal.is-open .book-stage {
  width: min(1584px, 97vw, 146dvh);
  height: auto;
  aspect-ratio: 1585 / 992;
}
.story-portal.is-open .open-spread {
  display: grid;
  grid-template-rows: minmax(0, 1fr) clamp(30px, 4.2%, 46px);
  gap: 0;
  padding: clamp(40px, 6.5dvh, 70px) clamp(48px, 7.7vw, 124px) clamp(64px, 9.5dvh, 108px);
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}
.story-portal.is-open .open-spread::before {
  content: "";
  display: block;
  position: absolute;
  z-index: 0;
  inset: -7.5%;
  width: auto;
  height: auto;
  transform: none;
  background: url('assets/redridge-rats-open-book-cutout.png') center / 100% 100% no-repeat;
  box-shadow: none;
  pointer-events: none;
}
.story-portal.is-open .open-spread::after { display: none; }
.story-portal.is-open .site-book-view {
  grid-row: 1;
  min-height: 0;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}
.story-portal.is-open .site-book-view::-webkit-scrollbar { display: none; }
.story-portal.is-open .book-page { inset: 0; }
.story-portal.is-open .site-book-view::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 48.9%, rgba(22,11,7,.12) 49.72%, rgba(255,226,174,.1) 50%, rgba(22,11,7,.11) 50.28%, transparent 51.1%);
}
.story-portal.is-open .page-leaf { top: 0; bottom: 0; }
.story-portal.is-open .folio-controls {
  grid-row: 2;
  align-self: center;
  min-height: 30px;
  padding: 0 clamp(4px, 1vw, 16px);
  color: #f2dfb8;
  text-shadow: 0 1px 3px #28150e;
}
.story-portal.is-open .folio-controls button {
  min-width: 112px;
  padding: 6px 10px;
  border-color: rgba(112,68,33,.52);
  background: rgba(77,43,22,.6);
  color: #f7e5c0;
}
.story-portal.is-open .book-close {
  top: clamp(12px, 2.2vw, 28px);
  right: clamp(14px, 2.4vw, 32px);
}
@media (max-width: 760px) {
  .story-portal.is-open .book-stage {
    width: min(100vw, 146dvh);
    height: auto;
    aspect-ratio: 1585 / 992;
  }
  .story-portal.is-open .open-spread {
    padding: 6.5vw 7.7vw 9.5vw;
    grid-template-rows: minmax(0, 1fr) 26px;
  }
  .story-portal.is-open .book-close { top: 3vw; right: 4vw; }
  .story-portal.is-open .folio-controls { min-height: 24px; padding: 0; }
  .story-portal.is-open .folio-controls button { min-width: 0; padding: 4px 6px; }
}

/* Let each spread read as two facing leaves, with the hinge kept clear. */
.story-portal.is-open .book-page {
  border-radius: 12px;
  box-shadow: inset 0 0 26px rgba(17,10,6,.13);
}
.story-portal.is-open .overview-page {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(255,255,255,.3), transparent 65%),
    repeating-linear-gradient(0deg, rgba(112,79,43,.035) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, #e8dec8, #f0e8d8 49%, #e9e0d0 51%, #f0e8d8);
}
.story-portal.is-open .overview-page .overview {
  padding: clamp(34px, 4.5vw, 70px) clamp(42px, 6vw, 96px);
}
.story-portal.is-open .overview-page .overview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(48px, 7vw, 112px);
}
.story-portal.is-open .overview-page .overview-heading > p { max-width: 330px; }
.story-portal.is-open .overview-page .overview-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-template-areas: "one three" "two three";
  column-gap: clamp(48px, 7vw, 112px);
  row-gap: 12px;
  margin-top: clamp(22px, 3vh, 38px);
}
.story-portal.is-open .overview-cards article:nth-child(1) { grid-area: one; }
.story-portal.is-open .overview-cards article:nth-child(2) { grid-area: two; }
.story-portal.is-open .overview-cards article:nth-child(3) { grid-area: three; }
.story-portal.is-open .overview-page .overview-cards article {
  min-height: 0;
  padding: clamp(14px, 1.6vw, 24px);
  border: 0;
  border-left: 1px solid rgba(143,101,51,.35);
  background: linear-gradient(110deg, rgba(255,255,255,.22), rgba(244,231,207,.08));
  box-shadow: inset 0 1px rgba(255,255,255,.3), 0 5px 18px rgba(64,44,23,.055);
}
.story-portal.is-open .overview-page .overview-cards article:hover { transform: translateY(-2px); }
.story-portal.is-open .page-quote {
  text-align: right;
  padding-right: clamp(5px, 1vw, 16px);
}
.story-portal.is-open .stream-page .stream-card {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 112px);
  background: transparent;
  border: 0;
  box-shadow: none;
}
.story-portal.is-open .stream-page .stream-player-wrap {
  border: 1px solid rgba(224,184,110,.3);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
}
.story-portal.is-open .stream-page .stream-aside {
  border-left: 1px solid rgba(224,184,110,.28);
  background: linear-gradient(115deg, rgba(255,255,255,.025), transparent 75%);
}
.story-portal.is-open .join-page .join-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(48px, 7vw, 112px);
}
.story-portal.is-open .join-page .join-compact > img { grid-column: 1; grid-row: 1; justify-self: start; }
.story-portal.is-open .join-page .join-compact > div { grid-column: 1; grid-row: 2; text-align: left; }
.story-portal.is-open .join-page .join-compact > .button { grid-column: 2; grid-row: 1 / span 2; justify-self: center; }
.story-portal.is-open .folio-controls { font-size: 11px; }
.story-portal.is-open .folio-controls button {
  min-width: 132px;
  padding: 8px 13px;
  border-radius: 3px;
  box-shadow: inset 0 1px rgba(255,224,163,.16), 0 3px 7px rgba(24,11,5,.3);
}
.story-portal.is-open .book-close { padding: 9px 13px; font-size: 11px; }
@media (max-width: 760px) {
  .story-portal.is-open .overview-page .overview { padding: 22px 7%; }
  .story-portal.is-open .overview-page .overview-heading { column-gap: 18px; }
  .story-portal.is-open .overview-page .overview-heading h2 { font-size: clamp(23px, 5vw, 39px); }
  .story-portal.is-open .overview-page .overview-heading > p { font-size: 9px; }
  .story-portal.is-open .overview-page .overview-cards { column-gap: 18px; row-gap: 6px; margin-top: 12px; }
  .story-portal.is-open .overview-page .overview-cards article { padding: 7px; }
  .story-portal.is-open .overview-page .overview-cards h3 { font-size: 11px; }
  .story-portal.is-open .overview-page .overview-cards p { font-size: 8px; }
  .story-portal.is-open .page-quote { font-size: 10px; margin-top: 7px; }
  .story-portal.is-open .stream-page .stream-card { gap: 16px; }
  .story-portal.is-open .join-page .join-compact { column-gap: 18px; }
  .story-portal.is-open .join-page .join-compact h2 { font-size: 24px; }
  .story-portal.is-open .folio-controls { font-size: 9px; }
  .story-portal.is-open .folio-controls button { font-size: 8px; }
}

/* Balance the final spread and keep its important content away from the hinge. */
.story-portal.is-open .join-page {
  background:
    radial-gradient(ellipse at 24% 28%, rgba(224,184,110,.12), transparent 38%),
    radial-gradient(ellipse at 76% 72%, rgba(169,76,55,.12), transparent 40%),
    linear-gradient(90deg, #182129 0%, #1a232a 47.8%, #2b211b 49.5%, #3b281d 50%, #2b211b 50.5%, #1a232a 52.2%, #182129 100%);
}
.story-portal.is-open .join-page .join-compact {
  align-content: center;
  align-items: center;
  justify-items: center;
  grid-template-rows: auto auto;
  padding: 40px 7% 68px;
  row-gap: 12px;
}
.story-portal.is-open .join-page .join-compact > img {
  width: clamp(70px, 8vw, 112px);
  margin-bottom: 4px;
}
.story-portal.is-open .join-page .join-compact > div { max-width: 100%; }
.story-portal.is-open .join-page .join-compact h2 {
  margin: 8px 0 11px;
  font-size: clamp(34px, 3.3vw, 50px);
  line-height: 1.12;
  white-space: nowrap;
  letter-spacing: -.045em;
}
.story-portal.is-open .join-page .join-compact p {
  max-width: 330px;
  margin: 0;
  color: #c7c1b5;
  line-height: 1.7;
}
.story-portal.is-open .join-page .join-compact > .button {
  justify-self: center;
  align-self: center;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.22);
}
.story-portal.is-open .join-page footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(38px, 7vw, 108px);
  left: 7%;
  right: 7%;
  bottom: 3%;
  min-height: 58px;
  border-top: 1px solid transparent;
  background: linear-gradient(90deg, rgba(224,184,110,.28) 0 47%, transparent 47% 53%, rgba(224,184,110,.28) 53% 100%) top / 100% 1px no-repeat;
}
.story-portal.is-open .join-page .footer-brand { justify-self: start; }
.story-portal.is-open .join-page .footer-note {
  justify-self: end;
  max-width: 300px;
  text-align: right;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .story-portal.is-open .join-page .join-compact { padding: 18px 7% 48px; row-gap: 5px; }
  .story-portal.is-open .join-page .join-compact > img { width: 48px; }
  .story-portal.is-open .join-page .join-compact h2 { font-size: clamp(18px, 4.3vw, 29px); }
  .story-portal.is-open .join-page .join-compact p { font-size: 8px; }
  .story-portal.is-open .join-page footer { min-height: 40px; gap: 14px; }
  .story-portal.is-open .join-page .footer-brand img { width: 34px; height: 34px; }
  .story-portal.is-open .join-page .footer-brand { font-size: 8px; }
  .story-portal.is-open .join-page .footer-note { font-size: 8px; }
}

.giuced-corner {
  position: absolute;
  z-index: 5;
  right: clamp(18px, 4vw, 58px);
  bottom: clamp(44px, 7vh, 76px);
  display: block;
  width: clamp(92px, 12.5vw, 166px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(230,190,119,.8);
  border-radius: 5px 22px 5px 5px;
  background: #28170f;
  box-shadow: 0 9px 28px rgba(0,0,0,.5), 0 0 0 3px rgba(44,24,15,.76), inset 0 0 0 1px rgba(255,232,184,.2);
  transition: transform .24s ease, box-shadow .24s ease;
}
.giuced-corner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  filter: saturate(.86) contrast(1.04);
  transition: transform .35s ease;
}
.giuced-corner::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(12,10,8,.88));
  pointer-events: none;
}
.giuced-corner > span {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 8px;
  color: #f4dfb7;
  font: 700 9px 'DM Sans', Arial, sans-serif;
  letter-spacing: .17em;
  text-shadow: 0 1px 5px #140d09;
}
.giuced-corner > span b { color: #e3b76a; margin-left: 4px; }
.giuced-corner:hover { transform: translateY(-4px); box-shadow: 0 15px 34px rgba(0,0,0,.56), 0 0 0 3px rgba(44,24,15,.82), 0 0 25px rgba(224,184,110,.25); }
.giuced-corner:hover img { transform: scale(1.04); }
.giuced-corner:focus-visible { outline: 2px solid #f5d58e; outline-offset: 5px; }
@media (max-width: 760px) {
  .giuced-corner { right: 14px; bottom: 46px; width: clamp(48px, 15vw, 78px); border-radius: 3px 13px 3px 3px; }
  .giuced-corner > span { right: 4px; bottom: 4px; font-size: 6px; letter-spacing: .1em; }
  .giuced-corner > span b { margin-left: 1px; }
}
