/* Hana no Sho endpaper for Ship Jam. */
:root {
  --hana-endpaper: url("./hana-no-sho-endpaper.webp");
  --cream: #f3e9d5;
  --paper: #fffaf0;
  --line: #c7bb9c;
  --ink: #283e33;
  --accent: #91553f;
}

body { position: relative; isolation: isolate; }
body::before, body::after {
  position: fixed;
  content: "";
  z-index: -1;
  pointer-events: none;
  background-image: var(--hana-endpaper);
  background-repeat: no-repeat;
}
body::before {
  inset: 0;
  background-size: cover;
  background-position: center;
}
body::after { display: none; }

.wrap {
  width: min(70rem, calc(100% - clamp(3.25rem, 11vw, 10rem)));
  margin-top: clamp(2rem, 5vw, 4rem);
}
.bar { background: #fffaef; border-color: #b9a883; }
.hero, .paper {
  background: var(--paper);
  border-color: #b9a883;
  box-shadow: 0 12px 38px #5d472318;
}
.intro {
  background: linear-gradient(160deg, #fffaf0 50%, #f3e8cf);
}
.hero-art { border-inline-start: 1px solid var(--line); }
.hero-art figcaption { background: #eeead7; }
.paper { border-block-start: 2px solid #a58655; }
.transport { background: #eeefdf; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .hero-art img { height: auto; }
}

@media (max-width: 720px) {
  /* Keep both illustrated margins in view without shrinking the art behind the copy. */
  body::before, body::after { display: block; width: 32vw; background-size: auto 100%; }
  body::before { inset: 0 auto 0 0; background-position: left center; mask-image: linear-gradient(to right, #000 60%, transparent); }
  body::after { inset: 0 0 0 auto; background-position: right center; mask-image: linear-gradient(to left, #000 60%, transparent); }
  .wrap { width: calc(100% - clamp(1.75rem, 10vw, 3rem)); margin-top: 1.8rem; }
  .intro { padding: clamp(1rem, 4.8vw, 1.4rem); }
  .paper { margin-top: 1.7rem; }
}
