:root {
  color-scheme: light;
  --ink: #2c241f;
  --muted: #6f6259;
  --paper: #fbf3df;
  --paper-deep: #f3d8b2;
  --rose: #dc8f82;
  --plum: #6f5a92;
  --aqua: #8dcac1;
  --green: #879b63;
  --blue: #6f91c4;
  --line: rgba(44, 36, 31, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(220, 143, 130, 0.22), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(141, 202, 193, 0.28), transparent 22rem),
    linear-gradient(180deg, #fbf3df 0%, #f7e6c9 58%, #f4d7bd 100%);
  color: var(--ink);
  font-family:
    ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.mark,
.topbar nav {
  display: flex;
  align-items: center;
}

.mark {
  gap: 0.55rem;
  text-decoration: none;
}

.mark span {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 251, 240, 0.74);
  box-shadow: 0 0.5rem 1.5rem rgba(98, 74, 49, 0.12);
  font-weight: 900;
}

.mark strong {
  font-size: 0.98rem;
}

.topbar nav {
  gap: clamp(0.7rem, 2.8vw, 1.6rem);
  font-size: 0.88rem;
}

.topbar nav a {
  text-decoration: none;
}

.story-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 7rem 1rem 4rem;
  overflow: hidden;
}

.scene {
  position: absolute;
  inset: 4.8rem clamp(1rem, 5vw, 4rem) 2rem;
  border: 1px solid rgba(44, 36, 31, 0.14);
  border-radius: 1.4rem;
  background:
    linear-gradient(180deg, rgba(255, 250, 236, 0.85), rgba(247, 214, 188, 0.62)),
    linear-gradient(135deg, rgba(141, 202, 193, 0.3), rgba(220, 143, 130, 0.16));
  box-shadow: inset 0 -2rem 5rem rgba(137, 113, 82, 0.1);
}

.sun,
.cloud,
.path,
.platform,
.tower,
.page-card {
  position: absolute;
}

.sun {
  top: 10%;
  right: 12%;
  width: clamp(4rem, 10vw, 7rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f3b55f;
  box-shadow: 0 0 0 1.2rem rgba(243, 181, 95, 0.12);
}

.cloud {
  height: 1rem;
  border-radius: 999px;
  background: rgba(255, 251, 240, 0.72);
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 18%;
  width: 1.8rem;
  height: 1.8rem;
}

.cloud::after {
  right: 15%;
  width: 2.4rem;
  height: 2.4rem;
}

.cloud-one {
  top: 18%;
  left: 11%;
  width: 7rem;
}

.cloud-two {
  top: 31%;
  right: 20%;
  width: 5.5rem;
}

.path {
  bottom: 19%;
  height: 2.7rem;
  border-radius: 999px;
  transform-origin: center;
  opacity: 0.72;
}

.path-left {
  left: 20%;
  width: 25%;
  background: var(--rose);
  transform: rotate(-22deg);
}

.path-right {
  right: 18%;
  width: 30%;
  background: var(--aqua);
  transform: rotate(19deg);
}

.platform {
  width: clamp(6rem, 17vw, 12rem);
  aspect-ratio: 1.5;
  transform: skewY(-14deg) rotate(-3deg);
  border: 1px solid rgba(44, 36, 31, 0.18);
  border-radius: 0.45rem;
  box-shadow: 0 1.4rem 1.8rem rgba(93, 68, 54, 0.14);
}

.platform span {
  position: absolute;
  inset: 16% 14%;
  border: 1px dashed rgba(44, 36, 31, 0.22);
  border-radius: 0.35rem;
}

.platform-one {
  bottom: 22%;
  left: 18%;
  background: #f5c77c;
}

.platform-two {
  bottom: 39%;
  left: 42%;
  background: #b7d7ca;
}

.platform-three {
  bottom: 24%;
  right: 17%;
  background: #d7b5d5;
}

.tower {
  right: 31%;
  bottom: 42%;
  width: clamp(4rem, 10vw, 7rem);
  height: clamp(6rem, 15vw, 10rem);
  transform: skewY(-10deg);
  border: 1px solid rgba(44, 36, 31, 0.18);
  border-radius: 0.55rem 0.55rem 0.25rem 0.25rem;
  background: #fff8e9;
  box-shadow: 0 1.2rem 2rem rgba(93, 68, 54, 0.14);
}

.tower span {
  display: block;
  width: 52%;
  height: 0.8rem;
  margin: 1rem auto;
  border-radius: 999px;
  background: rgba(111, 90, 146, 0.28);
}

.page-card {
  width: clamp(5rem, 10vw, 7rem);
  height: clamp(6rem, 12vw, 9rem);
  border: 1px solid rgba(44, 36, 31, 0.16);
  border-radius: 0.45rem;
  background:
    linear-gradient(#fffaf0 0 0) top 20% left 18% / 48% 0.35rem no-repeat,
    linear-gradient(#fffaf0 0 0) top 34% left 18% / 65% 0.35rem no-repeat,
    linear-gradient(#fffaf0 0 0) top 48% left 18% / 40% 0.35rem no-repeat,
    var(--blue);
  box-shadow: 0 1rem 1.5rem rgba(93, 68, 54, 0.14);
}

.page-card-one {
  left: 28%;
  top: 27%;
  transform: rotate(-8deg);
}

.page-card-two {
  right: 18%;
  top: 45%;
  transform: rotate(9deg);
  background-color: var(--green);
}

.intro-panel {
  position: relative;
  z-index: 2;
  width: min(42rem, calc(100vw - 2rem));
  margin-top: 2rem;
  padding: clamp(1.7rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(255, 250, 236, 0.84);
  box-shadow: 0 2rem 5rem rgba(90, 67, 43, 0.16);
  text-align: center;
  backdrop-filter: blur(14px);
}

.kicker {
  margin: 0 0 0.85rem;
  color: var(--plum);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(4.8rem, 17vw, 11rem);
  line-height: 0.82;
  letter-spacing: 0;
}

.lede {
  max-width: 31rem;
  margin: 0 auto 1.8rem;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.34rem);
}

.chooser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.chooser p {
  flex-basis: 100%;
  margin-bottom: 0.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.choice,
.pager-button {
  min-height: 2.75rem;
  border: 1px solid rgba(44, 36, 31, 0.2);
  border-radius: 999px;
  background: rgba(255, 251, 240, 0.72);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.choice {
  min-width: 8.5rem;
  padding: 0.72rem 1.2rem;
  font-weight: 750;
}

.choice.active,
.choice:hover,
.pager-button:hover {
  background: var(--ink);
  color: #fffaf0;
}

.pager {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(-50%);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.pager span {
  min-width: 4rem;
  text-align: center;
  font-weight: 800;
}

.pager-button {
  padding: 0.65rem 1rem;
}

.pages,
.notes {
  width: min(70rem, calc(100% - 2rem));
  margin: 0 auto;
}

.pages {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.section-heading p,
.page-sample p,
.notes p {
  color: var(--muted);
  font-size: 1.05rem;
}

.page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.page-sample {
  min-height: 18rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  border: 1px solid rgba(44, 36, 31, 0.2);
  border-radius: 1rem;
  box-shadow: 0 1rem 2rem rgba(90, 67, 43, 0.1);
}

.page-sample span {
  color: rgba(44, 36, 31, 0.48);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 850;
}

.page-sample h3 {
  margin-bottom: 0.65rem;
  font-size: 1.6rem;
  line-height: 1;
}

.page-sample p {
  margin-bottom: 0;
}

.sample-one {
  background: #fff8e8;
}

.sample-two {
  background: #dcebdc;
}

.sample-three {
  background: #ead6e9;
}

.sample-four {
  background: #d8e6ef;
}

.notes {
  padding: 0 0 clamp(4rem, 8vw, 6rem);
}

.notes p {
  width: min(44rem, 100%);
  margin: 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.4rem, 3.5vw, 2.8rem);
  line-height: 1.12;
}

body[data-mode="sharp"] {
  --paper: #f6efe5;
  --rose: #e1795f;
  --plum: #39447a;
  --aqua: #5cb7ad;
  --green: #9aa647;
  --blue: #4f81bf;
}

body[data-mode="sharp"] .scene {
  border-radius: 0.35rem;
}

body[data-mode="sharp"] .intro-panel,
body[data-mode="sharp"] .page-sample {
  border-radius: 0.35rem;
}

body[data-mode="sharp"] .platform,
body[data-mode="sharp"] .tower,
body[data-mode="sharp"] .page-card {
  transform: none;
}

@media (max-width: 900px) {
  .scene {
    inset: 4.8rem 1rem 2rem;
  }

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

  .page-card-one,
  .path-left {
    display: none;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar nav {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .story-shell {
    padding-top: 6rem;
  }

  .scene {
    bottom: 1rem;
  }

  .cloud-two,
  .platform-three,
  .page-card-two {
    display: none;
  }

  .intro-panel {
    margin-top: 0;
  }

  .pager {
    bottom: 1.45rem;
  }

  .page-grid {
    grid-template-columns: 1fr;
  }

  .page-sample {
    min-height: 12rem;
  }
}
