:root {
  --paper: #f7f3ea;
  --ink: #34434a;
  --sea: #72aeca;
  --soft-ink: rgba(52, 67, 74, .68);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
}

body {
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.about-island {
  min-height: 100svh;
  background: var(--paper);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

.scene {
  position: absolute;
  inset: 0;
}

.hero-picture {
  position: absolute;
  inset: 0;
  display: block;
  z-index: -2;
}

.hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(247, 243, 234, .78) 0%,
    rgba(247, 243, 234, .38) 24%,
    rgba(247, 243, 234, .08) 43%,
    transparent 58%);
}

.hero-heading {
  position: absolute;
  top: clamp(32px, 5.2vh, 64px);
  left: clamp(28px, 5vw, 88px);
  width: min(430px, 35vw);
}

.back-link {
  display: inline-block;
  margin-bottom: clamp(30px, 5.3vh, 58px);
  color: var(--soft-ink);
  font-size: .72rem;
  letter-spacing: .08em;
  text-decoration: none;
  transition: color .25s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--sea);
}

.back-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--sea);
  font: 700 .68rem/1.2 Georgia, "Times New Roman", serif;
  letter-spacing: .22em;
}

h1 {
  margin: 0;
  font: 600 clamp(2.7rem, 4.6vw, 5.2rem)/1.06 "Songti SC", "STSong", "SimSun", serif;
  letter-spacing: .08em;
}

.opening {
  margin: clamp(24px, 3.5vh, 38px) 0 0;
  color: rgba(52, 67, 74, .84);
  font: 600 clamp(1.02rem, 1.45vw, 1.42rem)/1.95 "Songti SC", "STSong", "SimSun", serif;
  letter-spacing: .09em;
}

.morning-note {
  position: absolute;
  left: clamp(28px, 5vw, 88px);
  bottom: clamp(24px, 4vh, 48px);
  margin: 0;
  color: rgba(52, 67, 74, .58);
  font: .76rem/1.7 "Songti SC", "STSong", serif;
  letter-spacing: .08em;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-picture { animation: picture-in 1.5s ease both; }
  .hero-heading { animation: words-in 1.1s .28s ease both; }
  .morning-note { animation: words-in 1.1s .55s ease both; }

  @keyframes picture-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes words-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 720px) {
  .hero {
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    overflow: visible;
    padding: 24px 0 28px;
  }

  .hero-heading {
    position: static;
    order: 1;
    width: auto;
    padding: 0 25px;
  }

  .back-link {
    margin-bottom: 34px;
    font-size: .7rem;
  }

  .eyebrow { margin-bottom: 10px; }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }

  .opening {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.85;
  }

  .scene {
    position: relative;
    inset: auto;
    order: 2;
    width: 100%;
    margin-top: 30px;
  }

  .hero-picture { position: relative; inset: auto; }

  .hero-picture img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .hero-veil { display: none; }

  .morning-note {
    position: static;
    order: 3;
    margin: 22px 25px 0;
    font-size: .72rem;
  }
}

.book-hotspot {
  position: absolute;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.book-hotspot[hidden] { display: none; }
.book-hotspot:hover, .book-hotspot:focus-visible {
  background: rgba(255, 245, 209, .18);
  border-color: rgba(255, 245, 209, .8);
  outline: 2px solid rgba(112, 89, 56, .35);
  outline-offset: 3px;
}
.book-hotspot span {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 7px 12px; border-radius: 3px;
  background: var(--paper); font-size: .75rem; opacity: 0; pointer-events: none;
}
.book-hotspot:hover span, .book-hotspot:focus-visible span { opacity: 1; }
body.album-open { overflow: hidden; }
#daily-album {
  width: min(760px, calc(100% - 32px)); max-height: calc(100svh - 32px);
  padding: clamp(20px, 4vw, 38px); border: 1px solid #dfd5c4; border-radius: 8px;
  background: #faf6ef; color: var(--ink); box-shadow: 0 24px 90px #25383c40;
}
#daily-album::backdrop { background: #233c4666; backdrop-filter: blur(4px); }
.album-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; color: var(--soft-ink); font-size: 1.8rem; width: 44px; height: 44px; cursor: pointer; }
.album-heading { text-align: center; }
.album-heading p { color: var(--soft-ink); font-size: .7rem; letter-spacing: .18em; }
.album-heading h2 { margin: 12px 0 0; font: 500 1.8rem/1.4 "STSong", "SimSun", serif; letter-spacing: .12em; }
.album-page { margin: 16px 0 24px; text-align: center; }
.album-art { height: clamp(170px, 40svh, 340px); display: grid; place-items: center; overflow: hidden; }
.album-sprite { background-image: url('../assets/resident-character-sheet.png'); background-repeat: no-repeat; mix-blend-mode: multiply; }
.album-page h3 { margin: 18px 0 10px; font: 500 1.15rem/1.5 "STSong", "SimSun", serif; letter-spacing: .2em; }
.album-page figcaption p { margin: 0; font-size: .85rem; line-height: 1.8; color: var(--soft-ink); }
.album-pagination { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #dfd5c4; padding-top: 14px; gap: 10px; }
.album-pagination button { min-height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: .8rem; cursor: pointer; }
.album-pagination button:disabled { opacity: .3; cursor: default; }
.album-pagination span { color: var(--soft-ink); font-size: .75rem; }
#daily-album button:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }
