:root {
  --paper: #fefdfa;
  --ink: #273b32;
  --muted: #627267;
  --sage: #739077;
  --coral: #d59077;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --sans: "Source Han Sans SC", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "Courier New", "Courier", monospace;
  --header-height: clamp(58px, 5.14vw, 74px);
  color-scheme: light;
  scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid #7b543c; outline-offset: 4px; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 12px; top: 6px; z-index: 5; padding: .6em 1em; color: white; background: var(--ink); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.chapter { min-height: 100svh; display: grid; align-items: center; position: relative; }
.sheet { position: relative; width: 100%; max-width: 1440px; min-height: 0; aspect-ratio: 1440 / 810; margin: auto; container-type: inline-size; }
.chapter:focus, main:focus { outline: none; }
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 3; height: var(--header-height);
  background: linear-gradient(to bottom, #faf9f5, rgba(254,253,250,.98) 36%, rgba(254,253,250,.72) 62%, rgba(254,253,250,.22) 85%, rgba(254,253,250,0) 100%);
}
.masthead-inner {
  width: 100%; max-width: 1440px; height: 100%; margin: auto; padding-inline: min(7.78vw,112px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
}
.masthead-brand, .map-brand { display: flex; align-items: center; }
.masthead-brand { padding-top: clamp(2px,.35vw,5px); gap: clamp(0px,.35vw,5px); }
.menu-button { display: grid; place-items: center start; width: 38px; height: 44px; padding: 0 5px; margin-left: -5px; border: 0; background: none; cursor: pointer; }
.menu-button i, .menu-button i::before, .menu-button i::after { display: block; height: 2px; border-radius: 2px; background: #4c6658; }
.menu-button i { position: relative; width: 17px; }
.menu-button i::before, .menu-button i::after { content: ""; position: absolute; left: 0; }
.menu-button i::before { width: 22px; top: -7px; }
.menu-button i::after { width: 12px; top: 7px; }
.menu-button:hover i, .menu-button:hover i::before, .menu-button:hover i::after { background: var(--ink); }
.brand-link { display: inline-flex; align-items: center; gap: clamp(8px,1.04vw,15px); line-height: 1.2; white-space: nowrap; text-decoration: none; }
.brand-link svg { width: clamp(27px,2.5vw,36px); height: auto; aspect-ratio: 36/39; }
.brand-link span { font-size: clamp(14px,1.11vw,16px); font-weight: 600; letter-spacing: .10em; }
.brand-link small { display: block; margin-top: 3px; color: #677d6d; font-size: 10px; font-weight: 400; letter-spacing: .12em; }
.top-links { display: flex; align-items: center; gap: clamp(11px,1.15vw,17px); padding-top: clamp(5px,.56vw,8px); color: var(--muted); }
.top-links a { display: grid; align-content: center; min-height: 38px; text-decoration: none; white-space: nowrap; font-size: clamp(13px,1.11vw,16px); letter-spacing: .04em; font-weight: 500; }
.top-links a:hover, .top-links a[aria-current] { text-decoration: underline; text-decoration-color: #8ba18d; text-underline-offset: .4em; color: var(--ink); }
.location { position: relative; justify-self: end; display: flex; align-items: center; gap: 4px; padding-top: clamp(6px,.83vw,12px); text-align: right; white-space: nowrap; }
.location-label { font-size: clamp(11px,.97vw,14px); color: #708276; line-height: 1.05; letter-spacing: .07em; }
.location-label small { display: block; font-family: var(--serif); font-size: 7px; letter-spacing: .12em; }
#location-name { display: grid; place-items: center; width: 6.15em; text-align: center; font-size: clamp(11px,.91vw,13px); letter-spacing: .13em; border: 1px solid #a4b9a4; border-radius: 2em; padding: .42em .65em .45em; }
#location-caption { position: absolute; top: calc(100% + 3px); right: 0; display: grid; justify-items: end; width: max-content; color: #64786a; font-size: clamp(9px,.69vw,10px); letter-spacing: .14em; }
.location-reading, .location-ink { grid-area: 1 / 1; }
.location-ready .location-reading { opacity: 0; }
.location-ink { pointer-events: none; opacity: 0; }
.location-ink::before { content: attr(data-text); }
.location-ink.is-current { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .location-ready .location-ink {
    /* A critically damped settle, like Morphicons' smooth preset. */
    --settle: linear(0, .123, .342, .545, .702, .814, .889, .938, .969, .988, 1);
    transition: opacity .32s ease, transform .46s var(--settle), filter .32s ease;
    transform: translateY(.32em) scale(.98);
    filter: blur(1.5px);
  }
  .location-ready .location-ink.is-current { transform: none; filter: none; }
}
html:has(#garden-map[open]) { overflow: hidden; }
#garden-map {
  position: fixed; inset: 0 auto 0 0; margin: 0; padding: 0; border: 0; color: var(--ink);
  width: min(438px, calc(100% - 32px)); max-width: none; height: 100%; height: 100dvh; max-height: none;
  overflow: hidden; background: transparent;
}
#garden-map::backdrop { background: rgba(38,54,45,.32); }
.map-prelayer, .map-panel { position: absolute; inset: 0; }
.map-prelayer { background: #829982; pointer-events: none; }
.map-prelayer + .map-prelayer { background: #e7b89a; }
.map-panel { overflow: auto; overscroll-behavior: contain; scroll-padding-top: 56px; background: #fff8e7; }
.map-sheet { padding-top: 49px; position: relative; isolation: isolate; overflow: hidden; min-height: 818px; container-type: inline-size; }
.map-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; color: #3e5949; }
.map-art img { position: absolute; }
.map-sprout { top: 44px; left: 8.68%; width: 79%; opacity: .5; }
.map-orbit { top: 278px; left: 45%; width: 35.7%; opacity: .5; }
.map-plane { top: 646px; left: 9.6%; width: 81.7%; height: 143px; object-fit: fill; opacity: .5; }
.map-ruler, .map-signature { position: absolute; writing-mode: vertical-rl; }
.map-ruler { top: 172px; left: 1.4%; height: 222px; font: 600 15px/1 var(--serif); letter-spacing: .09em; white-space: nowrap; }
.map-signature { top: 465px; left: 7%; font: 400 44px/.98 var(--sans); letter-spacing: .015em; color: #617f67; }
.map-links, .map-exits, .map-note { margin-left: 25.55%; position: relative; }
.map-brand {
  position: absolute; inset: 0 0 auto; z-index: 1; gap: 1px;
  padding: 5px 0 6px 25.55%;
  background: linear-gradient(#fff8e7 75%, transparent);
}
#close-map i { width: 20px; transform: rotate(45deg); }
#close-map i::before { top: 0; width: 20px; transform: rotate(90deg); }
#close-map i::after { display: none; }
.map-brand .brand-link { gap: 14px; }
.map-brand .brand-link svg { width: 36px; }
.map-brand .brand-link span { font-size: 16px; }
.map-links { margin-top: 116px; display: grid; justify-items: start; }
.map-links h2 { margin: 0 0 3px; font-size: 17px; font-weight: 500; }
.map-links a { display: flex; align-items: center; min-height: 40px; color: #4e6957; text-decoration: none; font-size: 14px; }
.map-links a:hover, .map-exits a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.map-exits { display: grid; gap: 37px; margin-top: 47px; padding-right: 8px; }
.map-exits a { display: block; text-decoration: none; color: #304c3e; }
.map-exits a:last-child { color: #51433d; }
.map-exits strong { font: 700 39px/1 var(--serif); }
.map-exits small { font: 700 clamp(8px,2.15cqw,10px)/1.25 var(--mono); letter-spacing: .06em; }
.map-exits span { display: block; margin-top: 3px; font-size: 15px; }
.map-note { margin-top: 42px; }
.map-note strong, .map-note b, .map-note small { display: block; }
.map-note strong { font-size: 25px; line-height: 1.3; }
.map-note b { font-size: 14px; }
.map-note small { margin-top: 24px; font-size: 13px; color: #5d7965; letter-spacing: .18em; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* Adapted from https://reactbits.dev/components/staggered-menu. See licenses/react-bits.txt. */
  #garden-map { --enter-ease: cubic-bezier(.16,1,.3,1); transition: display .32s allow-discrete, overlay .32s allow-discrete; }
  #garden-map:not([open]), #garden-map:not([open])::backdrop { pointer-events: none; }
  #garden-map::backdrop {
    opacity: 0;
    transition: opacity .32s, display .32s allow-discrete, overlay .32s allow-discrete;
  }
  #garden-map[open]::backdrop { opacity: 1; }
  .map-prelayer, .map-panel {
    transform: translateX(-100%);
    transition: transform .32s cubic-bezier(.48,.02,.8,.6);
  }
  #garden-map[open] :is(.map-prelayer, .map-panel) {
    transform: none;
    transition: transform var(--duration,.5s) var(--enter-ease) var(--delay,0s);
  }
  .map-prelayer + .map-prelayer { --delay: .07s; }
  .map-panel { --delay: .15s; --duration: .65s; }

  .garden-lines li, .map-exits a {
    transform-origin: left bottom;
  }
  .garden-lines li:nth-child(2) { --row: 1; }
  .garden-lines li:nth-child(3) { --row: 2; }
  .garden-lines li:nth-child(4) { --row: 3; }
  .garden-lines li:nth-child(5) { --row: 4; }
  #garden-map[open] .garden-lines li, #garden-map[open] .map-exits a {
    --reveal: calc(.2475s + var(--row, 0) * .1s);
    opacity: 1; transform: none;
    transition: transform 1s var(--enter-ease) var(--reveal), opacity .5s ease-out var(--reveal);
  }
  #garden-map[open] .map-exits a { --reveal: .45s; transition-duration: .55s; }
  #garden-map[open] .map-exits a + a { --reveal: .53s; }
  #garden-map[open] :is(.garden-lines li, .map-exits a):focus-within { transition: none; }

  .map-brand { opacity: 0; transition: opacity .15s; }
  #garden-map[open] .map-brand { opacity: 1; transition: opacity .24s ease-out .15s; }
  #close-map i { transition: transform .65s var(--enter-ease); }
  @starting-style {
    #garden-map[open] :is(.map-prelayer, .map-panel) { transform: translateX(-100%); }
    #garden-map[open] .garden-lines li { opacity: 0; transform: translateY(140%) rotate(10deg); }
    #garden-map[open] .map-exits a { opacity: 0; transform: translateY(25px); }
    #garden-map[open]::backdrop, #garden-map[open] .map-brand { opacity: 0; }
    #garden-map[open] #close-map i { transform: rotate(-135deg); }
  }
}
@media (max-width: 900px) {
  .masthead-inner { padding-inline: 4%; }
  .brand-link { gap: 7px; }
}
@media (max-width: 760px) {
  :root { --header-height: 62px; }
  .sheet { aspect-ratio: auto; }
  .masthead-inner { grid-template-columns: 1fr auto; align-items: center; padding-inline: max(18px,4.5%); }
  .masthead-brand { padding: 0; }
  .masthead-brand .brand-link { gap: 7px; }
  .brand-link small { font-size: 9px; }
  .top-links { display: none; }
  .location { padding: 0; }
  #location-caption { display: none; }
  #location-name { font-size: 12px; }
  .location-label { font-size: 10px; }
}
@media (max-width: 450px) {
  .map-links, .map-exits, .map-note { margin-left: 23%; }
  .map-brand { padding-left: 23%; }
  .map-signature { left: 6%; font-size: 37px; }
  .map-exits small { letter-spacing: 0; }
  .map-exits span { font-size: 14px; }
  .map-links a { min-height: 44px; }
  .map-note { padding-bottom: 32px; }
}
@media (max-width: 355px) {
  .location-label { display: none; }
  .map-exits small { display: block; }
}
