@font-face {
  font-family: MangoGrotesque;
  src: url("assets/mango-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Barlow;
  src: url("assets/barlow-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Barlow;
  src: url("assets/barlow-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --grey: rgb(11 11 11 / 10%);
  --grey-strong: rgb(0 0 0 / 60%);
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --pad: 1.5rem;
  --nav-height: 3.5rem;
  --english-font: "ヒラギノ角ゴ Std", "Hiragino Kaku Gothic Std", "Hiragino Sans", Arial, sans-serif;
  --chinese-font: "兰亭黑-简", "Lantinghei SC", "FZLanTingHeiS", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: clamp(12px, 1vw, 17.5px);
  scrollbar-width: none;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--english-font);
  font-size: 1rem;
  line-height: 1.5;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body::-webkit-scrollbar {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-transform: inherit;
}

::selection {
  background: var(--black);
  color: var(--white);
}

.bilingual {
  align-items: baseline;
  display: inline-flex;
  gap: 0.45em;
}

.bilingual::after {
  content: attr(data-cn);
  font-family: var(--chinese-font);
  font-size: 0.86em;
  font-weight: inherit;
  line-height: inherit;
}

.bilingual::before {
  content: none;
}

.loader {
  align-items: center;
  background: var(--white);
  display: flex;
  height: 100svh;
  inset: 0;
  justify-content: center;
  opacity: 1;
  position: fixed;
  transition: opacity 600ms ease;
  width: 100vw;
  z-index: 999;
}

.loader.is-gone {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  height: 5rem;
  object-fit: contain;
  width: 5rem;
}

.transition-overlay {
  background: var(--black);
  height: 100vh;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 380ms ease;
  width: 100vw;
  z-index: 120;
}

.transition-overlay.is-active {
  opacity: 1;
}

.site-header {
  color: var(--white);
  inset: 0 0 auto;
  mix-blend-mode: difference;
  min-height: var(--nav-height);
  pointer-events: none;
  position: fixed;
  z-index: 100;
}

.nav {
  align-items: center;
  color: inherit;
  display: flex;
  justify-content: space-between;
  padding: 1rem var(--pad) 0;
  text-transform: uppercase;
}

.nav-group {
  align-items: center;
  display: flex;
  gap: 6vw;
}

.nav-link {
  align-items: center;
  display: inline-flex;
  font-size: 0.75rem;
  gap: 0.5rem;
  line-height: 1;
  pointer-events: auto;
}

.nav-dot {
  background: currentcolor;
  border-radius: 100%;
  display: block;
  height: 0.625rem;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 450ms var(--ease), transform 450ms var(--ease);
  width: 0.625rem;
}

.nav-link:hover .nav-dot,
.nav-link:focus-visible .nav-dot {
  opacity: 1;
  transform: scale(1);
}

.brand {
  align-items: center;
  display: flex;
  height: 3.125rem;
  pointer-events: auto;
  width: 3.125rem;
}

.brand img {
  display: block;
  height: 100%;
  image-rendering: auto;
  object-fit: contain;
  width: 100%;
}

.site-header .brand img {
  filter: invert(1);
}

.site-header .brand img[src*="lonetree-logo"] {
  filter: none;
  mix-blend-mode: multiply;
}

.menu-toggle {
  display: none;
  font-size: 1rem;
  line-height: 1;
  pointer-events: auto;
}

.book-card {
  border: 1px solid var(--grey);
  border-radius: 0.2rem;
  bottom: var(--pad);
  left: var(--pad);
  max-width: 14rem;
  position: fixed;
  right: auto;
  top: auto;
  transition: border-color 500ms ease, opacity 350ms ease;
  z-index: 90;
}

.book-card:hover {
  border-color: rgb(0 0 0 / 40%);
}

.book-link {
  align-items: flex-start;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
}

.book-link img {
  flex: none;
  height: 4.5rem;
  object-fit: cover;
  width: 4rem;
}

.book-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  justify-content: space-between;
  line-height: 1.1;
}

.book-copy strong {
  font-weight: 600;
  line-height: 1.5;
}

.book-copy .bilingual {
  align-items: flex-start;
}

.arrow {
  font-size: 0.8rem;
  line-height: 1;
}

.viewport,
.home {
  height: 100svh;
  position: fixed;
  width: 100%;
}

.home {
  overflow: hidden;
}

.hero {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-start;
  padding: 4rem var(--pad) var(--pad);
  position: relative;
  z-index: 1;
}

.display-title {
  font-family: var(--english-font);
  font-size: clamp(5.5rem, 8.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.94;
  max-width: 100%;
  text-transform: none;
  width: max-content;
}

.display-title span {
  display: block;
  margin-top: -2rem;
}

.hero-rule {
  margin-top: 1rem;
}

.intro {
  font-family: var(--english-font);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.42;
  max-width: 31rem;
  text-transform: none;
}

.intro-en {
  display: block;
}

.intro small {
  display: block;
  font-family: var(--english-font);
  font-size: 0.9em;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.15rem;
}

.intro-cn {
  display: block;
  font-family: var(--chinese-font);
  font-size: 0.98em;
  font-weight: 500;
  line-height: 1.45;
  margin-top: 1rem;
}

.reveal-title {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 850ms var(--ease), transform 850ms var(--ease);
}

.reveal-copy {
  opacity: 0;
  transition: opacity 700ms ease 310ms;
}

body.is-ready .reveal-title,
body.is-ready .reveal-copy {
  opacity: 1;
  transform: none;
}

.gallery-window {
  bottom: 0;
  height: 100%;
  overflow: hidden;
  position: absolute;
  right: 0;
  touch-action: none;
  width: min(46vw, 31rem);
  z-index: 3;
}

.gallery {
  bottom: 0;
  height: 100%;
  left: 0;
  position: absolute;
  user-select: none;
  width: 100%;
}

.tile {
  aspect-ratio: 0.64;
  height: clamp(18rem, 52vh, 31rem);
  min-width: 0;
  opacity: 0;
  position: absolute;
  right: var(--pad);
  top: 0;
  transform-origin: center right;
  width: auto;
  will-change: transform, opacity;
}

.media-link {
  cursor: grab;
  display: block;
  height: 100%;
  overflow: hidden;
  position: absolute;
  inset: 0;
  width: 100%;
}

.gallery.is-dragging .media-link {
  cursor: grabbing;
}

.media-link img {
  display: block;
  height: 110%;
  object-fit: cover;
  pointer-events: none;
  transform: translateY(var(--parallax, -5%));
  transition: transform 600ms var(--ease);
  user-select: none;
  width: 100%;
}

.tile:hover .media-link img {
  transform: translateY(var(--parallax, -5%)) scale(1.03);
}

.tile-label {
  align-items: center;
  display: inline-flex;
  font-size: 0.75rem;
  gap: 0.5rem;
  left: 0;
  line-height: 1;
  opacity: 0;
  position: absolute;
  text-transform: uppercase;
  top: -5%;
  transform: translateY(100%);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.tile:hover .tile-label,
.tile:focus-within .tile-label {
  opacity: 1;
  transform: none;
}

.tile-dot {
  background: var(--black);
  border-radius: 50%;
  display: inline-block;
  height: 0.5rem;
  width: 0.5rem;
}

@media (min-width: 992px) {
  .site-header {
    inset: auto auto var(--pad) var(--pad);
    min-height: 0;
    width: auto;
  }

  .nav {
    gap: 1.5rem;
    justify-content: flex-start;
    padding: 0;
    pointer-events: auto;
    text-transform: none;
  }

  .nav-group {
    gap: 1.4rem;
  }

  .nav-link {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.42;
  }

  .brand {
    height: 2.5rem;
    width: 2.5rem;
  }

  /* Use the same paperclip mark on desktop and mobile navigation. */
  .site-header .brand {
    align-items: center;
    display: flex;
    justify-content: center;
  }

  .site-header .brand img,
  .site-header .brand img[src*="lonetree-logo"] {
    display: none;
  }

  .site-header .brand::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M24.6 34.5 37.2 21.9c4.7-4.7 12.3 2.9 7.6 7.6L29.1 45.2c-7.1 7.1-18.5-4.3-11.4-11.4L34.2 17.3' fill='none' stroke='%23111111' stroke-width='4.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M27.7 37.6 39.7 25.6' fill='none' stroke='%23111111' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    content: "";
    display: block;
    height: 1.42rem;
    transform: rotate(-4deg);
    width: 1.42rem;
  }

  .book-card {
    bottom: calc(var(--pad) + 3.75rem);
  }

  .gallery-window {
    width: min(57vw, 44rem);
  }

  .tile {
    height: clamp(27rem, 78vh, 46.5rem);
  }

  body:not(.subpage-body) .site-header {
    right: var(--pad);
  }

  body:not(.subpage-body) .site-header .brand {
    display: none;
  }

  body:not(.subpage-body) .nav,
  body:not(.subpage-body) .nav-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.22rem;
  }

  body:not(.subpage-body) .nav-link {
    align-items: flex-start;
    font-size: 1.65rem;
    gap: 0;
    line-height: 1.08;
    position: relative;
  }

  body:not(.subpage-body) .nav-link .bilingual {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.16em;
    white-space: nowrap;
  }

  body:not(.subpage-body) .nav-link .bilingual::before {
    content: none;
  }

  body:not(.subpage-body) .nav-link .bilingual::after {
    content: attr(data-cn);
    font-family: var(--chinese-font);
    font-size: 0.62em;
    font-weight: 500;
    line-height: 1.05;
  }

  body:not(.subpage-body) .nav-link .nav-dot {
    height: 0.45rem;
    left: -0.8rem;
    position: absolute;
    top: 0.38rem;
    width: 0.45rem;
  }

  body:not(.subpage-body) .book-card {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  body:not(.subpage-body) .site-header {
    inset: auto var(--pad) var(--pad) var(--pad);
    min-height: 0;
    width: auto;
  }

  body:not(.subpage-body) .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.22rem;
    justify-content: flex-start;
    padding: 0;
    pointer-events: auto;
    text-transform: none;
  }

  body:not(.subpage-body) .nav-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.22rem;
  }

  body:not(.subpage-body) .site-header .brand,
  body:not(.subpage-body) .menu-toggle,
  body:not(.subpage-body) .mobile-menu {
    display: none;
  }

  body:not(.subpage-body) .desktop-link {
    display: inline-flex;
  }

  body:not(.subpage-body) .nav-link {
    align-items: flex-start;
    font-size: 1.65rem;
    gap: 0;
    line-height: 1.08;
    position: relative;
  }

  body:not(.subpage-body) .nav-link .bilingual {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.16em;
    white-space: nowrap;
  }

  body:not(.subpage-body) .nav-link .bilingual::before {
    content: none;
  }

  body:not(.subpage-body) .nav-link .bilingual::after {
    content: attr(data-cn);
    font-family: var(--chinese-font);
    font-size: 0.62em;
    font-weight: 500;
    line-height: 1.05;
  }

  body:not(.subpage-body) .nav-link .nav-dot {
    height: 0.4rem;
    left: -0.65rem;
    position: absolute;
    top: 0.38rem;
    width: 0.4rem;
  }

  body:not(.subpage-body) .book-card {
    display: none;
  }
}

.mobile-menu {
  background: var(--white);
  display: none;
  flex-direction: column;
  height: 100svh;
  inset: 0;
  opacity: 0;
  padding: 0.5rem var(--pad) 1.5rem;
  pointer-events: none;
  position: fixed;
  transition: opacity 400ms ease;
  z-index: 110;
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 3.5rem;
  text-transform: uppercase;
}

.menu-close {
  font-size: 1rem;
  line-height: 1;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.mobile-links a {
  font-family: var(--english-font);
  font-size: 15vw;
  line-height: 0.75;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.mobile-menu.is-open .mobile-links a {
  opacity: 1;
  transform: none;
}

.mobile-menu.is-open .mobile-links a:nth-child(1) { transition-delay: 300ms; }
.mobile-menu.is-open .mobile-links a:nth-child(2) { transition-delay: 360ms; }
.mobile-menu.is-open .mobile-links a:nth-child(3) { transition-delay: 420ms; }
.mobile-menu.is-open .mobile-links a:nth-child(4) { transition-delay: 480ms; }
.mobile-menu.is-open .mobile-links a:nth-child(5) { transition-delay: 540ms; }
.mobile-menu.is-open .mobile-links a:nth-child(6) { transition-delay: 600ms; }

.mobile-footer {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: auto;
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 300ms ease 650ms;
}

.mobile-menu.is-open .mobile-footer {
  opacity: 1;
}

.mobile-bottom-nav {
  display: none;
}

.project-modal {
  background: var(--white);
  display: none;
  height: 100svh;
  inset: 0;
  opacity: 0;
  padding: 5.5rem var(--pad) var(--pad);
  position: fixed;
  transition: opacity 420ms ease;
  width: 100%;
  z-index: 105;
}

.project-modal.is-visible {
  display: block;
  opacity: 1;
}

.modal-close {
  font-size: 0.75rem;
  position: absolute;
  right: var(--pad);
  text-transform: uppercase;
  top: 1.6rem;
}

.modal-image {
  display: block;
  height: calc(100svh - 7rem);
  object-fit: cover;
  width: min(56vw, 54rem);
}

.modal-kicker {
  font-size: 0.75rem;
  left: calc(min(56vw, 54rem) + 3rem);
  position: absolute;
  text-transform: uppercase;
  top: 5.6rem;
}

.modal-title {
  font-family: var(--english-font);
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: 700;
  left: calc(min(56vw, 54rem) + 3rem);
  line-height: 0.82;
  max-width: calc(44vw - 5rem);
  position: absolute;
  text-transform: uppercase;
  top: 7rem;
}

@media (max-width: 991px) {
  :root {
    --pad: 3vw;
  }

  html {
    font-size: 16px;
  }

  .desktop-link {
    display: none;
  }

  .menu-toggle,
  .mobile-menu {
    display: flex;
  }

  .book-card {
    bottom: 1rem;
    left: var(--pad);
    right: auto;
  }

  .display-title {
    font-size: 3.25rem;
  }

  .display-title span {
    margin-top: -1vw;
  }

  .hero {
    padding-top: 4rem;
  }

  .modal-image {
    height: 60svh;
    width: 100%;
  }

  .modal-kicker,
  .modal-title {
    left: var(--pad);
    max-width: calc(100% - 2 * var(--pad));
    position: relative;
    top: auto;
  }

  .modal-kicker {
    margin-top: 1rem;
  }

  .modal-title {
    margin-top: 0.5rem;
  }

  .mobile-bottom-nav {
    align-items: center;
    background: var(--white);
    border-bottom: 1px solid rgb(0 0 0 / 10%);
    color: var(--black);
    display: flex;
    gap: 1.05rem;
    height: var(--nav-height);
    justify-content: flex-start;
    left: 0;
    overflow-x: auto;
    padding: 0.55rem 0.9rem 0.55rem 4.65rem;
    position: fixed;
    right: 0;
    scrollbar-width: none;
    top: 0;
    z-index: 108;
  }

  .mobile-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .mobile-bottom-nav a {
    color: var(--black);
    flex: 0 0 auto;
    font-family: var(--english-font);
    font-size: clamp(0.66rem, 2.45vw, 0.82rem);
    font-weight: 600;
    line-height: 1.08;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  html {
    font-size: 14px;
  }

  body {
    min-width: 0;
  }

  .site-header {
    z-index: 112;
  }

  .site-header .nav {
    padding-top: 0.55rem;
  }

  .site-header .brand {
    height: 2.4rem;
    width: 2.4rem;
  }

  .bilingual {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.08em;
    text-align: left;
  }

  .bilingual::before {
    content: attr(data-cn);
    font-family: var(--chinese-font);
    font-size: 0.78em;
    font-weight: inherit;
    line-height: 1.05;
  }

  .bilingual::after {
    content: none;
  }

  .display-title {
    font-size: 3.1rem;
  }

  .intro {
    font-size: 1.15rem;
    max-width: 18rem;
  }

  .menu-toggle,
  .mobile-menu {
    display: none;
  }


  .book-card {
    bottom: 4.8rem;
  }

  .tile {
    height: min(48vh, 28rem);
  }
}

@media (max-width: 479px) {
  .display-title {
    font-size: 2.6rem;
  }

  .mobile-links a {
    font-size: 3.4rem;
  }

  .book-card {
    bottom: 4.8rem;
    left: auto;
    right: 1rem;
  }

  .gallery-window {
    height: 50svh;
    width: min(72vw, 17rem);
  }

  .tile {
    height: min(41svh, 21rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}


@media (max-width: 991px) {
  .mobile-bottom-nav {
    align-items: center !important;
    background: var(--white) !important;
    border-bottom: 1px solid rgb(0 0 0 / 10%) !important;
    bottom: auto !important;
    color: var(--black) !important;
    display: flex !important;
    gap: 1.05rem !important;
    height: var(--nav-height) !important;
    justify-content: flex-start !important;
    left: 0 !important;
    overflow-x: auto !important;
    padding: 0.55rem 0.9rem 0.55rem 4.65rem !important;
    position: fixed !important;
    right: 0 !important;
    scrollbar-width: none !important;
    top: 0 !important;
    z-index: 108 !important;
  }

  .mobile-bottom-nav a {
    color: var(--black) !important;
    flex: 0 0 auto !important;
  }

  .site-header {
    z-index: 112 !important;
  }

  .site-header .nav {
    padding-top: 0.55rem !important;
  }

  .site-header .brand {
    height: 2.4rem !important;
    width: 2.4rem !important;
  }
}


@media (max-width: 991px) {
  .mobile-bottom-nav {
    background: transparent !important;
    border-bottom: 0 !important;
    bottom: auto !important;
    display: contents !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
  }

  .mobile-bottom-nav a {
    align-items: center !important;
    display: inline-flex !important;
    font-family: var(--english-font) !important;
    font-size: clamp(0.66rem, 2.45vw, 0.82rem) !important;
    font-weight: 600 !important;
    justify-content: center !important;
    line-height: 1.08 !important;
    position: fixed !important;
    text-align: center !important;
    white-space: nowrap !important;
    z-index: 109 !important;
  }

  .mobile-bottom-nav a:nth-child(1),
  .mobile-bottom-nav a:nth-child(5),
  .mobile-bottom-nav a:nth-child(6) {
    color: var(--black) !important;
    top: 0.62rem !important;
  }

  .mobile-bottom-nav a:nth-child(1) {
    left: 4.55rem !important;
  }

  .mobile-bottom-nav a:nth-child(5) {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .mobile-bottom-nav a:nth-child(6) {
    right: 0.95rem !important;
  }

  .mobile-bottom-nav a:nth-child(2),
  .mobile-bottom-nav a:nth-child(3),
  .mobile-bottom-nav a:nth-child(4) {
    background: var(--black) !important;
    bottom: 0 !important;
    color: var(--white) !important;
    height: 3.7rem !important;
    padding: 0 0.4rem !important;
    width: 33.333vw !important;
  }

  .mobile-bottom-nav a:nth-child(2) {
    left: 0 !important;
  }

  .mobile-bottom-nav a:nth-child(3) {
    left: 33.333vw !important;
  }

  .mobile-bottom-nav a:nth-child(4) {
    left: 66.666vw !important;
  }

  .book-card {
    bottom: 4.7rem !important;
  }
}


@media (max-width: 991px) {
  .site-header::before {
    background: var(--white);
    border-bottom: 1px solid rgb(0 0 0 / 10%);
    content: "";
    height: var(--nav-height);
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    z-index: -1;
  }

  .mobile-bottom-nav a:nth-child(1),
  .mobile-bottom-nav a:nth-child(5),
  .mobile-bottom-nav a:nth-child(6) {
    height: var(--nav-height) !important;
    top: 0 !important;
  }

  .mobile-bottom-nav a:nth-child(1) {
    left: 4.55rem !important;
    width: calc((100vw - 5.25rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(5) {
    left: calc(4.55rem + (100vw - 5.25rem) / 3) !important;
    transform: none !important;
    width: calc((100vw - 5.25rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(6) {
    left: calc(4.55rem + (100vw - 5.25rem) * 2 / 3) !important;
    right: auto !important;
    width: calc((100vw - 5.25rem) / 3) !important;
  }
}


@media (max-width: 991px) {
  .site-header {
    background: var(--white) !important;
    color: var(--black) !important;
    height: var(--nav-height) !important;
    mix-blend-mode: normal !important;
  }

  .site-header::before {
    display: none !important;
  }

  .site-header .brand img,
  .site-header .brand img[src*="lonetree-logo"] {
    filter: none !important;
    mix-blend-mode: normal !important;
  }

  .mobile-bottom-nav a:nth-child(1),
  .mobile-bottom-nav a:nth-child(5),
  .mobile-bottom-nav a:nth-child(6) {
    z-index: 114 !important;
  }
}


@media (max-width: 991px) {
  .mobile-bottom-nav a:nth-child(1) {
    left: 3.25rem !important;
    width: calc((100vw - 3.55rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(5) {
    left: calc(3.25rem + (100vw - 3.55rem) / 3) !important;
    width: calc((100vw - 3.55rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(6) {
    left: calc(3.25rem + (100vw - 3.55rem) * 2 / 3) !important;
    width: calc((100vw - 3.55rem) / 3) !important;
  }
}


@media (max-width: 991px) {
  .bilingual {
    align-items: flex-start !important;
    text-align: left !important;
  }
}


@media (max-width: 991px) {
  .site-header .brand {
    background: var(--white) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 0 0.22rem var(--white) !important;
  }

  body:not(.subpage-body) .book-card {
    display: none !important;
  }
}


@media (max-width: 991px) {
  .site-header .brand {
    transform: translateY(-0.48rem) !important;
  }
}


/* Keep the current mobile navigation stable through tablet widths. */
.nav {
  text-transform: none;
}

@media (max-width: 991px) {
  body:not(.subpage-body) .desktop-link,
  body:not(.subpage-body) .menu-toggle,
  body:not(.subpage-body) .mobile-menu {
    display: none !important;
  }

  body:not(.subpage-body) .site-header {
    inset: 0 0 auto !important;
    width: 100% !important;
  }

  body:not(.subpage-body) .site-header .brand {
    display: flex !important;
  }
}

.model-back {
  text-transform: none;
}


@media (max-width: 991px) {
  .site-header .brand {
    align-items: center !important;
    background:
      linear-gradient(135deg, rgb(255 255 255 / 62%), rgb(255 255 255 / 24%)),
      rgb(255 255 255 / 24%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    border: 1px solid rgb(255 255 255 / 58%) !important;
    border-radius: 999px !important;
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 76%),
      0 0.45rem 1.3rem rgb(0 0 0 / 8%) !important;
    color: var(--black) !important;
    display: flex !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .site-header .brand img,
  .site-header .brand img[src*="lonetree-logo"] {
    display: none !important;
  }

  .site-header .brand::before {
    content: "←";
    font-family: Barlow, var(--english-font);
    font-size: 1.28rem;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-0.03rem);
  }
}


@media (max-width: 991px) {
  .site-header .brand {
    align-items: center !important;
    background:
      linear-gradient(145deg, rgb(255 255 255 / 30%), rgb(255 255 255 / 8%)),
      rgb(255 255 255 / 6%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.35) !important;
    backdrop-filter: blur(22px) saturate(1.35) !important;
    border: 1px solid rgb(255 255 255 / 42%) !important;
    border-radius: 999px !important;
    box-shadow:
      inset 0 1px 1px rgb(255 255 255 / 82%),
      inset 0 -1px 1px rgb(0 0 0 / 7%),
      0 0 0 1px rgb(255 255 255 / 16%),
      0 0.65rem 1.6rem rgb(0 0 0 / 9%) !important;
    color: var(--black) !important;
    display: flex !important;
    height: 2.25rem !important;
    justify-content: center !important;
    left: 0.72rem !important;
    overflow: hidden !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 0.62rem !important;
    transform: none !important;
    width: 3.8rem !important;
    z-index: 140 !important;
  }

  .site-header .brand::after {
    background: linear-gradient(90deg, rgb(255 255 255 / 52%), transparent 72%);
    border-radius: inherit;
    content: "";
    inset: 0.18rem;
    opacity: 0.55;
    pointer-events: none;
    position: absolute;
  }

  .site-header .brand::before {
    content: "←";
    font-family: Barlow, var(--english-font);
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1;
    position: relative;
    transform: translateY(-0.03rem);
    z-index: 1;
  }

  .site-header .brand img,
  .site-header .brand img[src*="lonetree-logo"] {
    display: none !important;
  }

  .mobile-bottom-nav a:nth-child(1) {
    left: 5rem !important;
    width: calc((100vw - 5.2rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(5) {
    left: calc(5rem + (100vw - 5.2rem) / 3) !important;
    width: calc((100vw - 5.2rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(6) {
    left: calc(5rem + (100vw - 5.2rem) * 2 / 3) !important;
    width: calc((100vw - 5.2rem) / 3) !important;
  }
}


.loader-logo {
  display: none;
}

.loader::before {
  animation: loaderDotPulse 1.05s steps(1, end) infinite;
  background: rgb(0 0 0 / 24%);
  border-radius: 999px;
  box-shadow: 1.05rem 0 0 rgb(0 0 0 / 24%), 2.1rem 0 0 rgb(0 0 0 / 24%);
  content: "";
  display: block;
  height: 0.42rem;
  transform: translateX(-1.05rem);
  width: 0.42rem;
}

@keyframes loaderDotPulse {
  0%, 100% {
    background: var(--black);
    box-shadow: 1.05rem 0 0 rgb(0 0 0 / 24%), 2.1rem 0 0 rgb(0 0 0 / 24%);
  }
  33% {
    background: rgb(0 0 0 / 24%);
    box-shadow: 1.05rem 0 0 var(--black), 2.1rem 0 0 rgb(0 0 0 / 24%);
  }
  66% {
    background: rgb(0 0 0 / 24%);
    box-shadow: 1.05rem 0 0 rgb(0 0 0 / 24%), 2.1rem 0 0 var(--black);
  }
}

@media (max-width: 991px) {
  .site-header .brand {
    height: 2.45rem !important;
    left: 0.74rem !important;
    top: 0.52rem !important;
    width: 2.45rem !important;
  }

  .site-header .brand::before {
    border: 0.17rem solid currentColor;
    border-radius: 999px;
    border-left-color: transparent;
    box-sizing: border-box;
    content: "";
    height: 1.14rem;
    position: relative;
    transform: rotate(-42deg);
    width: 0.56rem;
    z-index: 1;
  }

  .site-header .brand::after {
    background:
      linear-gradient(145deg, rgb(255 255 255 / 44%), transparent 44%),
      radial-gradient(circle at 32% 22%, rgb(255 255 255 / 62%), transparent 28%);
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: inherit;
    content: "";
    inset: 0.16rem;
    opacity: 0.78;
    pointer-events: none;
    position: absolute;
  }

  .mobile-bottom-nav a:nth-child(1) {
    left: 3.72rem !important;
    width: calc((100vw - 3.95rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(5) {
    left: calc(3.72rem + (100vw - 3.95rem) / 3) !important;
    width: calc((100vw - 3.95rem) / 3) !important;
  }

  .mobile-bottom-nav a:nth-child(6) {
    left: calc(3.72rem + (100vw - 3.95rem) * 2 / 3) !important;
    width: calc((100vw - 3.95rem) / 3) !important;
  }
}


@media (max-width: 991px) {
  .site-header .brand::before {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M24.6 34.5 37.2 21.9c4.7-4.7 12.3 2.9 7.6 7.6L29.1 45.2c-7.1 7.1-18.5-4.3-11.4-11.4L34.2 17.3' fill='none' stroke='%23111111' stroke-width='4.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M27.7 37.6 39.7 25.6' fill='none' stroke='%23111111' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
    border: 0 !important;
    content: "";
    height: 1.42rem;
    transform: rotate(-4deg);
    width: 1.42rem;
  }
}
