:root {
  color-scheme: light;
  --visual-viewport-height: 100dvh;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  color: #fff9e9;
  background: #f7efd9;
}

.homepage-sequence-scroll {
  --shelf-a: url("/assets/images/onboarding-covers/cover-1.webp");
  --shelf-b: url("/assets/images/onboarding-covers/cover-2.webp");
  --shelf-c: url("/assets/images/onboarding-covers/cover-3.webp");
  --shelf-d: url("/assets/images/onboarding-covers/cover-4.webp");
  --shelf-f: url("/assets/images/story-covers/star-giant-carrot.webp");
  --shelf-g: url("/assets/images/story-covers/star-mushroom-village-home.webp");
  --shelf-h: url("/assets/images/story-covers/star-pyramid-adventure.webp");
  --shelf-j: url("/assets/images/story-covers/star-little-hamburger.webp");
  --shelf-k: url("/assets/images/story-covers/star-little-tiger-stars.webp");
  --shelf-l: url("/assets/images/story-covers/dandan-red-race-car.webp");
  --shelf-m: url("/assets/images/story-covers/star-crab-starfish-night.webp");
  --shelf-final: url("/assets/images/story-covers/star-cat-caterpillar.webp");
}

.sequence-scroll {
  height: 320svh;
  min-height: 2400px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 248, 224, 0.74), transparent 26rem),
    radial-gradient(circle at 18% 16%, rgba(246, 216, 125, 0.36), transparent 28rem),
    radial-gradient(circle at 78% 76%, rgba(33, 55, 69, 0.2), transparent 28rem),
    linear-gradient(145deg, #9a733b 0%, #c7a456 44%, #6e7b5f 100%);
}

.homepage-sequence-scroll {
  height: 780svh;
  min-height: 5600px;
}

.sequence-scroll::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 24rem, rgba(18, 25, 30, 0.16) 58rem),
    linear-gradient(180deg, rgba(11, 20, 30, 0.22), transparent 28%, rgba(12, 21, 30, 0.2));
}

.sequence-sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(280px, 440px) minmax(360px, 620px);
  align-items: center;
  justify-content: center;
  gap: 56px;
  min-height: 720px;
  height: var(--visual-viewport-height);
  overflow: hidden;
  padding: 54px max(28px, calc((100vw - 1160px) / 2));
}

.homepage-sequence-sticky {
  --checkpoint-gap: 42px;
  --checkpoint-copy-width: 440px;
  --checkpoint-book-width: 560px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: var(--checkpoint-gap);
  perspective: 1800px;
}

.sequence-copy {
  position: relative;
  z-index: 3;
  text-shadow: 0 18px 40px rgba(37, 26, 12, 0.3);
}

.sequence-brand {
  position: absolute;
  top: 34px;
  left: max(28px, calc((100vw - 1160px) / 2));
  z-index: 8;
  display: grid;
  grid-template-columns: 54px auto;
  align-items: center;
  column-gap: 14px;
  color: rgba(255, 250, 237, 0.96);
  text-shadow: 0 8px 22px rgba(31, 24, 15, 0.28);
}

.sequence-brand img {
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  box-shadow: 0 15px 34px rgba(72, 50, 15, 0.24);
}

.sequence-brand span {
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", "PingFang TC", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.sequence-brand small {
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", "PingFang TC", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
}

.homepage-language-switch {
  position: absolute;
  top: 44px;
  right: max(28px, calc((100vw - 1160px) / 2));
  z-index: 20;
}

.homepage-language-switch details {
  position: relative;
}

.homepage-language-switch summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.38);
  border-radius: 999px;
  padding: 0 12px 0 14px;
  color: rgba(255, 250, 237, 0.88);
  background: rgba(255, 248, 232, 0.11);
  font-size: 0.8rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
  text-decoration: none;
  text-shadow: 0 8px 20px rgba(31, 24, 15, 0.28);
  user-select: none;
}

.homepage-language-switch summary::-webkit-details-marker {
  display: none;
}

.homepage-language-switch summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.homepage-language-switch details[open] summary {
  background: rgba(255, 248, 232, 0.18);
  color: #fffdf5;
}

.homepage-language-switch details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.homepage-language-switch .locale-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 218px;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 248, 232, 0.26);
  border-radius: 8px;
  background: rgba(70, 50, 22, 0.92);
  box-shadow: 0 18px 44px rgba(31, 24, 15, 0.28);
  backdrop-filter: blur(14px);
}

.homepage-language-switch .locale-switch-menu a {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  border-radius: 6px;
  padding: 7px 10px;
  color: rgba(255, 250, 237, 0.86);
  text-decoration: none;
}

.homepage-language-switch .locale-switch-menu a:hover,
.homepage-language-switch .locale-switch-menu a:focus-visible,
.homepage-language-switch .locale-switch-menu a[aria-current="page"] {
  background: rgba(255, 248, 232, 0.16);
  color: #fffdf5;
}

.homepage-language-switch .locale-switch-menu span {
  font-size: 0.84rem;
  font-weight: 900;
}

.homepage-language-switch .locale-switch-menu small {
  color: rgba(255, 250, 237, 0.6);
  font-size: 0.68rem;
  font-weight: 800;
}

.homepage-sequence-copy {
  flex: 1 1 var(--checkpoint-copy-width);
  max-width: var(--checkpoint-copy-width);
  min-height: 410px;
}

.sequence-copy.homepage-sequence-copy h1 {
  overflow-wrap: normal;
  word-break: normal;
}

html[data-text-script="cjk"] .sequence-copy.homepage-sequence-copy h1 {
  overflow-wrap: anywhere;
  word-break: break-all;
}

html[data-text-script="latin"] .sequence-copy.homepage-sequence-copy h1 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

html[data-text-script="latin"] .homepage-sequence-panel {
  width: min(470px, 37vw);
}

.homepage-text-panel {
  --copy-amount: 0;
  --copy-offset: 22px;
  visibility: hidden;
  opacity: var(--copy-amount);
  pointer-events: none;
  transition: visibility 0ms linear 80ms;
}

.homepage-sequence-panel {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(440px, 36vw);
  transform: translate3d(0, calc(-50% + var(--copy-offset)), 0);
  pointer-events: none;
}

.homepage-grid-copy {
  position: absolute;
  left: 50%;
  top: clamp(76px, 10svh, 104px);
  z-index: 7;
  width: min(980px, calc(100vw - 72px));
  text-align: center;
  transform: translate3d(-50%, var(--copy-offset), 0);
}

.homepage-grid-copy p {
  margin: 0 0 14px;
  color: rgba(255, 250, 237, 0.78);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.homepage-grid-copy h1 {
  margin: 0;
  color: #fff9e9;
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti TC", Georgia, serif;
  font-size: clamp(2.65rem, 4.2vw, 4.25rem);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 18px 40px rgba(37, 26, 12, 0.3);
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
}

.homepage-grid-copy span {
  display: block;
  max-width: 680px;
  margin: 16px auto 0;
  color: rgba(255, 250, 237, 0.84);
  font-size: clamp(1.02rem, 1.3vw, 1.22rem);
  font-weight: 800;
  line-height: 1.64;
  text-shadow: 0 8px 20px rgba(37, 26, 12, 0.22);
}

.homepage-sequence-sticky.is-grid-stage [data-copy-grid] {
  pointer-events: none;
}

.homepage-text-panel.is-visible {
  visibility: visible;
  pointer-events: none;
  transition: visibility 0ms;
}

.sequence-copy p {
  margin: 0 0 14px;
  color: rgba(255, 250, 237, 0.78);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sequence-copy h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti TC", Georgia, serif;
  font-size: clamp(3.2rem, 5.8vw, 5.75rem);
  line-height: 1.08;
}

.sequence-copy span {
  display: block;
  max-width: 34rem;
  margin-top: 24px;
  color: rgba(255, 250, 237, 0.84);
  font-size: clamp(1.08rem, 1.5vw, 1.32rem);
  font-weight: 800;
  line-height: 1.75;
}

.sequence-stage {
  position: relative;
  z-index: 2;
  width: min(620px, 48vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.homepage-sequence-stage {
  flex: 0 1 var(--checkpoint-book-width);
  width: min(620px, 48vw, var(--checkpoint-book-width));
  min-width: min(100%, var(--checkpoint-book-width));
  height: auto;
  min-height: 0;
}

.homepage-sequence-stage canvas {
  aspect-ratio: 1 / 1;
  max-width: 100%;
  max-height: 100%;
}

.homepage-sequence-sticky.is-stacked {
  align-content: flex-start;
}

.homepage-sequence-sticky.is-stacked .homepage-sequence-copy,
.homepage-sequence-sticky.is-stacked .homepage-sequence-stage {
  flex-basis: 100%;
}

.homepage-sequence-sticky.is-stacked .homepage-sequence-stage {
  min-height: 260px;
}

.sequence-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 217, 0.56), transparent 68%);
  filter: blur(18px);
}

.sequence-stage canvas,
.sequence-stage video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 34px 58px rgba(54, 39, 14, 0.34));
}

.homepage-sequence-stage::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 1;
  width: 72%;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(48, 36, 18, 0.2) 0%,
    rgba(48, 36, 18, 0.11) 42%,
    rgba(48, 36, 18, 0) 72%
  );
  filter: blur(18px);
  opacity: 0.72;
  transform: translate3d(-50%, 0, 0);
  pointer-events: none;
}

.homepage-sequence-stage .sequence-glow {
  z-index: 0;
}

.homepage-sequence-stage canvas {
  z-index: 2;
  filter: none;
}

.homepage-library-grid {
  --grid-amount: 0;
  --slot-amount: 0;
  --library-columns: 4;
  --library-rows: 3;
  --library-gap: 22px;
  --library-padding: 28px;
  --library-copy-space: clamp(390px, 40svh, 460px);
  --library-book-radius: calc(var(--grid-card-size) * 0.055);
  --grid-card-size: min(
    330px,
    calc((100vw - var(--library-padding) * 2 - var(--library-gap) * (var(--library-columns) - 1)) / var(--library-columns)),
    calc((100svh - var(--library-copy-space) - var(--library-gap) * (var(--library-rows) - 1)) / var(--library-rows))
  );
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(var(--library-columns), var(--grid-card-size));
  gap: var(--library-gap);
  width: max-content;
  padding-inline: var(--library-padding);
  opacity: var(--grid-amount);
  transform:
    translate3d(-50%, calc((1 - var(--grid-amount)) * 42px), 0)
    scale(calc(0.94 + var(--grid-amount) * 0.06));
  pointer-events: none;
}

.homepage-library-grid::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 100vw;
  height: clamp(92px, 17svh, 170px);
  background: linear-gradient(
    180deg,
    rgba(109, 123, 95, 0),
    rgba(101, 113, 86, 0.72) 68%,
    rgba(92, 105, 80, 0.96)
  );
  opacity: var(--grid-amount);
  transform: translateX(-50%);
  pointer-events: none;
}

.homepage-library-slot,
.homepage-library-book {
  aspect-ratio: 1;
  border-radius: 0 var(--library-book-radius) var(--library-book-radius) 0;
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.24),
    inset 0 -44px 58px rgba(20, 18, 14, 0.16),
    0 22px 34px rgba(49, 35, 15, 0.22);
  overflow: hidden;
}

.book-handoff-cover {
  aspect-ratio: 1;
  border-radius: 0 10px 10px 0;
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.24),
    inset 0 -44px 58px rgba(20, 18, 14, 0.16),
    0 22px 34px rgba(49, 35, 15, 0.22);
  overflow: hidden;
}

.homepage-library-slot {
  width: var(--grid-card-size);
  background-image: var(--shelf-final);
  opacity: var(--slot-amount);
}

.homepage-library-book {
  position: relative;
  width: var(--grid-card-size);
  min-width: 0;
  opacity: var(--grid-amount);
  transform: translateY(calc((1 - var(--grid-amount)) * 72px));
}

.homepage-library-book:nth-child(3),
.homepage-library-book:nth-child(4) {
  transform: translateY(calc((1 - var(--grid-amount)) * 92px));
}

.homepage-library-book:nth-child(n + 5) {
  transform: translateY(calc((1 - var(--grid-amount)) * 112px));
}

.homepage-library-book:nth-child(n + 9) {
  transform: translateY(calc((1 - var(--grid-amount)) * 132px));
}

.homepage-library-book span,
.homepage-library-book small,
.book-handoff-cover span,
.book-handoff-cover small {
  display: flex;
  position: absolute;
  left: 8.6%;
  right: 8.6%;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: #fffdf5;
  text-align: center;
  text-wrap: balance;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.48),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.homepage-library-book span,
.book-handoff-cover span {
  top: 6.8%;
  height: 21.1%;
  font-size: clamp(0.54rem, calc(var(--grid-card-size, 180px) * 0.084), 1.72rem);
  font-weight: 900;
  line-height: 1.05;
}

.homepage-library-book small,
.book-handoff-cover small {
  bottom: 4.3%;
  height: 11.7%;
  font-size: clamp(0.34rem, calc(var(--grid-card-size, 180px) * 0.045), 0.92rem);
  font-weight: 800;
  line-height: 1;
  opacity: 0.94;
}

.book-handoff {
  --cover-radius: 10px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  opacity: 0;
  overflow: visible;
  pointer-events: none;
  will-change: opacity;
}

.book-handoff-three {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.book-handoff-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0 var(--cover-radius) var(--cover-radius) 0;
  background: none;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}

.cover-final {
  background-image: var(--shelf-final);
}

.book-handoff-cover.cover-final {
  background-image: none;
}

.book-handoff:not(.is-three-unavailable) .book-handoff-cover span,
.book-handoff:not(.is-three-unavailable) .book-handoff-cover small {
  opacity: 0;
}

.book-handoff.is-three-unavailable {
  display: none;
}

.book-handoff.is-three-unavailable .book-handoff-cover.cover-final {
  background-image: var(--shelf-final);
}

.cover-a {
  background-image: var(--shelf-a);
}

.cover-b {
  background-image: var(--shelf-b);
}

.cover-c {
  background-image: var(--shelf-c);
}

.cover-d {
  background-image: var(--shelf-d);
}

.cover-f {
  background-image: var(--shelf-f);
}

.cover-g {
  background-image: var(--shelf-g);
}

.cover-h {
  background-image: var(--shelf-h);
}

.cover-j {
  background-image: var(--shelf-j);
}

.cover-k {
  background-image: var(--shelf-k);
}

.cover-l {
  background-image: var(--shelf-l);
}

.cover-m {
  background-image: var(--shelf-m);
}

.after-opening {
  padding: 96px max(28px, calc((100vw - 1160px) / 2));
  background: linear-gradient(180deg, #fff6df, #e9dfbd);
}

.section-kicker {
  margin: 0 0 12px;
  color: #516356;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.after-opening h2 {
  max-width: 820px;
  margin: 0;
  color: #28342f;
  font-family: "Iowan Old Style", "Palatino Linotype", "Songti TC", Georgia, serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
}

.after-opening p:not(.section-kicker) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #5e6c61;
  font-size: 1.1rem;
  line-height: 1.75;
}

.after-opening p.availability-note {
  margin-top: 16px;
  color: #7b6b45;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.45;
}

.site-footer {
  padding: 42px 28px;
  background: rgba(25, 38, 35, 0.96);
  color: rgba(255, 248, 232, 0.84);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.site-footer a {
  color: #fff7d8;
}

.footer-language-switch {
  position: relative;
  z-index: 5;
}

.footer-language-switch details {
  position: relative;
}

.footer-language-switch summary {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 248, 232, 0.3);
  border-radius: 999px;
  padding: 0 11px 0 13px;
  color: rgba(255, 250, 237, 0.86);
  background: rgba(255, 248, 232, 0.09);
  font-size: 0.78rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.footer-language-switch summary::-webkit-details-marker {
  display: none;
}

.footer-language-switch summary::after {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.footer-language-switch details[open] summary {
  background: rgba(255, 248, 232, 0.16);
  color: #fffdf5;
}

.footer-language-switch details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.footer-language-switch .locale-switch-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  display: grid;
  width: min(218px, calc(100vw - 56px));
  min-width: 0;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 248, 232, 0.26);
  border-radius: 8px;
  background: rgba(25, 38, 35, 0.98);
  box-shadow: 0 18px 44px rgba(12, 19, 17, 0.34);
}

.footer-language-switch .locale-switch-menu a {
  display: grid;
  gap: 2px;
  min-height: 48px;
  align-content: center;
  border-radius: 6px;
  padding: 7px 10px;
  color: rgba(255, 250, 237, 0.86);
  text-decoration: none;
}

.footer-language-switch .locale-switch-menu a:hover,
.footer-language-switch .locale-switch-menu a:focus-visible,
.footer-language-switch .locale-switch-menu a[aria-current="page"] {
  background: rgba(255, 248, 232, 0.13);
  color: #fffdf5;
}

.footer-language-switch .locale-switch-menu span {
  font-size: 0.84rem;
  font-weight: 900;
}

.footer-language-switch .locale-switch-menu small {
  color: rgba(255, 250, 237, 0.6);
  font-size: 0.68rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .sequence-sticky {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
    min-height: 650px;
    padding: 34px 24px;
  }

  .homepage-sequence-sticky {
    --checkpoint-gap: 20px;
    --checkpoint-copy-width: 430px;
    --checkpoint-book-width: min(calc(100vw - 12px), 390px);
    --mobile-browser-bottom-reserve: clamp(6px, 1.5svh, 14px);
    align-items: flex-start;
    align-content: flex-start;
    justify-content: flex-start;
    min-height: var(--visual-viewport-height);
    padding: 22px 18px var(--mobile-browser-bottom-reserve);
  }

  .sequence-copy {
    text-align: center;
  }

  .homepage-sequence-copy {
    flex: 0 0 100%;
    height: clamp(
      300px,
      calc(var(--visual-viewport-height) - var(--checkpoint-book-width) - var(--mobile-browser-bottom-reserve) - 112px),
      370px
    );
    min-height: 0;
    margin-top: clamp(32px, 7svh, 64px);
    text-align: left;
  }

  .sequence-copy.homepage-sequence-copy h1 {
    font-size: clamp(2rem, 8.7vw, 2.55rem);
    text-wrap: balance;
  }

  html[data-text-script="cjk"] .sequence-copy.homepage-sequence-copy h1 {
    overflow-wrap: anywhere;
    word-break: break-all;
  }

  html[data-text-script="latin"] .sequence-copy.homepage-sequence-copy h1 {
    font-size: clamp(2rem, 8.2vw, 2.45rem);
    line-height: 1.04;
  }

  html[data-text-script="latin"] .sequence-copy.homepage-sequence-copy h1 {
    overflow-wrap: normal;
    word-break: normal;
  }

  .homepage-sequence-copy span {
    max-width: min(320px, calc(100vw - 48px));
    margin-inline: 0;
    margin-top: 18px;
    font-size: 0.98rem;
    line-height: 1.58;
  }

  .homepage-sequence-stage {
    position: absolute;
    left: 50%;
    bottom: var(--mobile-browser-bottom-reserve);
    flex: 0 0 auto;
    width: var(--checkpoint-book-width);
    min-width: 0;
    height: auto;
    margin: 0;
    transform: translateX(-50%);
  }

  .sequence-brand {
    top: 22px;
    left: 24px;
    grid-template-columns: 44px auto;
  }

  .sequence-brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .sequence-brand span {
    font-size: 1.58rem;
  }

  .sequence-brand span,
  .sequence-brand small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .homepage-sequence-sticky .sequence-brand {
    position: relative;
    top: auto;
    left: auto;
    width: min(176px, calc(100vw - 190px));
    min-width: 0;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 8px;
    padding-right: 0;
  }

  .homepage-sequence-sticky .sequence-brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .homepage-sequence-sticky .sequence-brand span {
    font-size: 1.32rem;
  }

  .homepage-sequence-sticky .sequence-brand small {
    font-size: 0.58rem;
    letter-spacing: 0;
  }

  .homepage-language-switch {
    top: 26px;
    right: 18px;
  }

  .homepage-language-switch summary {
    min-height: 32px;
    padding: 0 10px 0 12px;
    font-size: 0.72rem;
  }

  .homepage-language-switch .locale-switch-menu {
    min-width: min(206px, calc(100vw - 36px));
  }

  .homepage-sequence-copy {
    min-height: 0;
  }

  .homepage-sequence-sticky.is-grid-stage [data-copy-grid] {
    top: 102px;
    width: calc(100vw - 36px);
  }

  .homepage-sequence-sticky.is-grid-stage .homepage-grid-copy h1 {
    font-size: clamp(2.1rem, 10vw, 3.25rem);
    overflow-wrap: normal;
    word-break: normal;
  }

  .homepage-sequence-sticky.is-grid-stage [data-copy-grid] span {
    max-width: 330px;
    font-size: 0.98rem;
    overflow-wrap: normal;
    word-break: normal;
  }

  .homepage-sequence-panel {
    left: 50%;
    width: min(560px, calc(100vw - 48px));
    transform: translate3d(-50%, calc(-50% + var(--copy-offset)), 0);
  }

  html[data-text-script="latin"] .homepage-sequence-panel {
    width: min(560px, calc(100vw - 48px));
  }

  .homepage-grid-copy {
    transform: translate3d(-50%, var(--copy-offset), 0);
  }

  .sequence-copy span {
    margin-inline: auto;
  }

  .homepage-sequence-copy span {
    margin-inline: 0;
  }

  .sequence-stage {
    width: min(620px, 92vw);
    max-height: 54svh;
  }

  .homepage-sequence-sticky .homepage-sequence-stage {
    width: var(--checkpoint-book-width);
    max-height: none;
  }

  .homepage-library-grid {
    --library-gap: 8px;
    --library-padding: 8px;
    --library-copy-space: clamp(300px, 39svh, 370px);
    --grid-card-size: min(
      calc((100vw - var(--library-padding) * 2 - var(--library-gap) * (var(--library-columns) - 1)) / var(--library-columns)),
      calc((100svh - var(--library-copy-space) - var(--library-gap) * (var(--library-rows) - 1)) / var(--library-rows))
    );
  }

  .homepage-library-book span {
    font-size: clamp(0.48rem, calc(var(--grid-card-size) * 0.084), 1.18rem);
  }

  .homepage-library-book small {
    font-size: clamp(0.32rem, calc(var(--grid-card-size) * 0.045), 0.68rem);
  }

  .after-opening {
    padding: 72px 24px;
  }

  .footer-inner {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .footer-links {
    margin-left: 0;
  }

  .footer-inner p {
    flex: 0 0 100%;
  }

  .footer-language-switch {
    margin-left: auto;
  }

  .footer-language-switch .locale-switch-menu {
    right: 0;
    left: auto;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .homepage-sequence-sticky {
    --landscape-pad-x: clamp(18px, 3.6vw, 36px);
    --checkpoint-gap: clamp(14px, 2.4vw, 24px);
    --checkpoint-copy-width: clamp(230px, 32vw, 304px);
    --checkpoint-book-size: min(
      470px,
      calc(var(--visual-viewport-height) - 60px),
      calc(100vw - var(--landscape-pad-x) * 2 - var(--checkpoint-gap) - var(--checkpoint-copy-width))
    );
    --checkpoint-book-width: min(
      470px,
      calc(100vw - var(--landscape-pad-x) * 2 - var(--checkpoint-gap) - var(--checkpoint-copy-width))
    );
    flex-wrap: nowrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    min-height: var(--visual-viewport-height);
    padding: 16px var(--landscape-pad-x) 20px;
  }

  .homepage-sequence-sticky .sequence-brand {
    position: absolute;
    top: 14px;
    left: var(--landscape-pad-x);
    grid-template-columns: 32px auto;
    column-gap: 9px;
  }

  .homepage-sequence-sticky .sequence-brand img {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .homepage-sequence-sticky .sequence-brand span {
    font-size: 1.12rem;
  }

  .homepage-sequence-sticky .sequence-brand small {
    font-size: 0.56rem;
  }

  .homepage-language-switch {
    top: 14px;
    right: var(--landscape-pad-x);
  }

  .homepage-sequence-copy {
    flex: 0 0 var(--checkpoint-copy-width);
    max-width: var(--checkpoint-copy-width);
    height: min(calc(var(--visual-viewport-height) - 112px), 238px);
    min-height: min(calc(var(--visual-viewport-height) - 112px), 238px);
    margin-top: clamp(28px, calc(var(--visual-viewport-height) * 0.07), 40px);
    text-align: left;
  }

  .homepage-sequence-stage {
    position: relative;
    left: auto;
    bottom: auto;
    flex: 0 0 var(--checkpoint-book-size);
    width: var(--checkpoint-book-size);
    min-width: 0;
    height: var(--checkpoint-book-size);
    margin: 0;
    max-height: none;
    transform: none;
  }

  .homepage-sequence-stage canvas {
    width: 100%;
    height: 100%;
  }

  .homepage-sequence-sticky.is-stacked .homepage-sequence-copy,
  .homepage-sequence-sticky.is-stacked .homepage-sequence-stage {
    flex-basis: auto;
  }

  .homepage-sequence-panel {
    left: 0;
    width: 100%;
    transform: translate3d(0, calc(-50% + var(--copy-offset)), 0);
  }

  html[data-text-script="latin"] .homepage-sequence-panel {
    width: 100%;
  }

  .sequence-copy p {
    margin-bottom: 7px;
    font-size: clamp(0.54rem, 1.45vw, 0.64rem);
  }

  .sequence-copy h1 {
    font-size: clamp(1.62rem, 4.9vw, 2.65rem);
    line-height: 1.04;
  }

  html[data-text-script="latin"] .sequence-copy.homepage-sequence-copy h1 {
    font-size: clamp(1.5rem, 4.4vw, 2.35rem);
    line-height: 1.03;
  }

  .sequence-copy span {
    max-width: 100%;
    margin-top: 10px;
    font-size: clamp(0.68rem, 1.8vw, 0.8rem);
    line-height: 1.44;
  }

  .homepage-sequence-sticky.is-grid-stage .homepage-grid-copy {
    left: 50%;
    top: clamp(28px, 8svh, 44px);
    width: min(760px, calc(100vw - 48px));
    transform: translate3d(-50%, var(--copy-offset), 0);
  }

  .homepage-sequence-sticky.is-grid-stage .homepage-grid-copy p {
    margin-bottom: 5px;
    font-size: clamp(0.5rem, 1.35vw, 0.6rem);
  }

  .homepage-sequence-sticky.is-grid-stage .homepage-grid-copy h1 {
    font-size: clamp(1.5rem, 4.55vw, 2.35rem);
    line-height: 1;
  }

  .homepage-sequence-sticky.is-grid-stage .homepage-grid-copy span {
    max-width: 660px;
    margin-top: 6px;
    font-size: clamp(0.62rem, 1.55vw, 0.74rem);
    line-height: 1.3;
  }

  .homepage-library-grid {
    --library-gap: min(2.1svh, 1.2vw);
    --library-padding: 1.8svh;
    --library-copy-space: clamp(176px, 46svh, 214px);
    --grid-card-size: min(
      calc((100vw - var(--library-padding) * 2 - var(--library-gap) * (var(--library-columns) - 1)) / var(--library-columns)),
      calc((100svh - var(--library-copy-space) - var(--library-gap) * (var(--library-rows) - 1)) / var(--library-rows))
    );
  }
}

@media (orientation: portrait) {
  .homepage-sequence-panel {
    top: 66%;
  }

  .homepage-grid-copy {
    top: 102px;
  }

  .homepage-library-grid {
    --library-gap: clamp(8px, 1vw, 12px);
    --library-padding: clamp(8px, 1vw, 12px);
    --library-copy-space: clamp(300px, 36svh, 430px);
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  .homepage-sequence-panel {
    top: 58%;
  }
}

@media (orientation: portrait) and (max-width: 900px) and (max-height: 760px) {
  .homepage-sequence-sticky {
    --checkpoint-book-width: min(calc(100vw - 16px), 330px);
    --mobile-browser-bottom-reserve: clamp(6px, 1.4svh, 12px);
  }

  .homepage-sequence-panel {
    top: 42%;
  }
}

@media (orientation: portrait) and (max-width: 340px) and (max-height: 760px) {
  .homepage-sequence-sticky {
    --checkpoint-book-width: calc(100vw - 16px);
  }
}
