:root {
  color-scheme: light;
  --canvas: #faf8ef;
  --paper: #fffdf6;
  --ink: #2d2934;
  --muted: #625b69;
  --purple: #54406b;
  --accent: #665080;
  --line: #dacfda;
  --lilac: #eee6f5;
  --green: #e8eddb;
  --peach: #f8ead8;
  --serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "STSong", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.75;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--purple); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }

.wrap { width: min(100% - 3rem, 71rem); margin-inline: auto; }
.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
  padding: .5rem 1rem;
  background: var(--paper);
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.site-header {
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--purple);
  font-family: var(--serif);
  font-size: 1.13rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { border: 1px solid var(--line); border-radius: 25%; }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem clamp(.7rem, 2.6vw, 2.2rem); }
.site-header nav a { padding-block: .45rem; color: var(--purple); font-size: .95rem; text-decoration: none; white-space: nowrap; }
.site-header nav a:hover, .help-links a:hover { text-decoration: underline; text-underline-offset: .28em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
  min-height: 38rem;
  padding-block: clamp(3rem, 7.5vw, 6.25rem);
}
.app-name { font-family: Georgia, serif; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: var(--accent); font-style: italic; }
.hero h1 {
  margin-top: .1rem;
  font-family: var(--serif);
  font-size: clamp(3.15rem, 7.7vw, 6.35rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.075em;
}
.hero-line {
  margin-top: 1.4rem;
  color: var(--purple);
  font: 700 clamp(1.45rem, 3.1vw, 2.65rem) / 1.42 var(--serif);
  letter-spacing: -.045em;
}
.hero-description { max-width: 23rem; margin-top: 1.2rem; color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  margin-top: 1.6rem;
  border-radius: 3rem;
  padding: .6rem 1.5rem;
  background: var(--purple);
  color: white;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: #3e2e50; }
.hero-art { position: relative; padding: 1.5rem 1.4rem 1.5rem 1rem; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 9% 2% 6% 2%;
  border-radius: 46% 48% 44% 41%;
  background: var(--lilac);
  transform: rotate(-12deg);
}
.paper-sheet {
  isolation: isolate;
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 29rem);
  aspect-ratio: 1.1;
  margin-inline: auto;
  border: 1px solid #e6dace;
  border-radius: 1.15rem 1.15rem 2rem 1.15rem;
  background-color: var(--paper);
  background-image: linear-gradient(#ad92b322 1px, transparent 1px), linear-gradient(90deg, #ad92b322 1px, transparent 1px);
  background-size: 1.15rem 1.15rem;
  transform: rotate(4deg);
  box-shadow: .7rem 1rem 0 #baa3c440, 0 1.2rem 2.4rem #47344e20;
}
.paper-tab {
  position: absolute;
  top: -.8rem;
  left: calc(50% - 3.25rem);
  width: 6.5rem;
  height: 1.8rem;
  background: #eee1bde8;
  transform: rotate(-10deg);
  clip-path: polygon(2% 7%, 99% 0, 96% 30%, 100% 63%, 96% 98%, 0 100%, 4% 71%, 0 39%);
}
.hero-cat { width: 78%; margin-top: -6%; transform: rotate(-6deg); }
.paper-sheet figcaption { position: absolute; right: 9%; bottom: 7%; color: var(--purple); font: 700 clamp(.85rem, 2vw, 1.15rem) / 1.4 var(--serif); }
.pencil-spark { position: absolute; color: var(--accent); font-family: Georgia, serif; line-height: 1; }
.spark-top { top: 14%; left: 17%; font-size: clamp(1.1rem, 4vw, 2.3rem); }
.spark-bottom { right: 13%; bottom: 24%; font-size: clamp(.85rem, 3vw, 1.55rem); }

.experience { padding-block: 2rem 5rem; }
.section-intro { margin-bottom: 1.55rem; }
h2 { font: 800 clamp(1.9rem, 4vw, 3.1rem) / 1.25 var(--serif); letter-spacing: -.045em; }
.section-intro p, .help p { color: var(--muted); margin-top: .55rem; }
.story { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.35rem); }
.story-panel { display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 2.15rem 2.15rem 1.5rem 1.5rem; }
.panel-lilac { background: var(--lilac); }
.panel-green { background: var(--green); }
.panel-peach { background: var(--peach); }
.story-art { min-width: 0; aspect-ratio: 1.62; display: grid; place-items: center; }
.story-art > img { width: min(62%, 12rem); max-height: 100%; object-fit: contain; }
.story-copy { padding: .1rem clamp(1rem, 2.7vw, 1.75rem) 1.45rem; }
.story-copy h3 { font: 800 1.43rem / 1.35 var(--serif); }
.story-copy p { margin-top: .4rem; color: var(--muted); }
.timer-face {
  display: grid;
  place-content: center;
  justify-items: center;
  width: min(54%, 8.4rem);
  aspect-ratio: 1;
  border: 2px solid #8d74a5;
  border-radius: 50%;
  outline: 1px dashed #987cb1;
  outline-offset: 5px;
  background: var(--paper);
  color: var(--purple);
  transform: rotate(-7deg);
}
.timer-face span { font: 700 clamp(1.3rem, 3vw, 1.85rem) / 1.25 Georgia, serif; font-variant-numeric: tabular-nums; }
.timer-face i { width: 1.6rem; height: .18rem; margin-top: .35rem; border-radius: 50%; background: #a78cbc; }
.album-sheet {
  display: grid;
  place-items: center;
  width: min(53%, 8.6rem);
  aspect-ratio: 1;
  background: var(--paper);
  border: 1px solid #d6bbb1;
  border-radius: .65rem .35rem .75rem .35rem;
  box-shadow: 5px 5px 0 #dabcaf;
  transform: rotate(8deg);
}
.album-sheet img { width: 90%; transform: rotate(-6deg); }

.help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 1.8rem 2.3rem;
}
.help h2 { font-size: clamp(1.65rem, 3.2vw, 2.4rem); }
.help-links { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.help-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  border: 1px solid #bbabc3;
  border-radius: 3rem;
  padding: .4rem 1.12rem;
  color: var(--purple);
  text-decoration: none;
  white-space: nowrap;
}
.help-links a:hover { background: var(--lilac); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem 1.75rem; color: var(--muted); font-size: .9rem; }

@media (max-width: 48rem) {
  .wrap { width: min(100% - 2rem, 34rem); }
  .site-header { min-height: 4.5rem; }
  .hero { grid-template-columns: 1fr; gap: 1.5rem; min-height: unset; padding-block: 2.8rem 2.25rem; }
  .hero-art { max-width: 24rem; margin-inline: auto; padding-right: 1rem; }
  .hero-art::before { inset-inline: 7%; }
  .hero-copy { padding-inline: .125rem; }
  .hero h1 { font-size: clamp(3.25rem, 12vw, 5.3rem); }
  .hero-line { margin-top: 1rem; }
  .hero-description { margin-top: .85rem; }
  .experience { padding-block: 1.1rem 3.3rem; }
  .story { grid-template-columns: 1fr; }
  .story-panel { grid-template-columns: minmax(6rem, .85fr) minmax(0, 1.3fr); grid-template-rows: auto; align-items: center; min-height: 9rem; border-radius: 2rem; }
  .story-art { width: 100%; min-height: 7rem; aspect-ratio: auto; padding: .5rem .85rem; }
  .story-art > img { width: min(90%, 6.2rem); }
  .timer-face, .album-sheet { width: min(78%, 5.6rem); }
  .story-copy { padding: .95rem .95rem .95rem .4rem; }
  .story-copy h3 { font-size: 1.28rem; }
  .story-copy p { margin-top: .25rem; }
  .help { display: block; }
  .help-links { margin-top: 1rem; }
}

@media (max-width: 23rem) {
  .wrap { width: calc(100% - 1.4rem); }
  .brand { gap: .45rem; font-size: 1rem; }
  .brand img { width: 2rem; }
  .site-header nav a { font-size: .86rem; }
  .story-panel { grid-template-columns: minmax(4.5rem, .7fr) minmax(0, 1.5fr); }
}
