html {
  font-family: serif;
  font-feature-settings: "palt";
  font-size: 1rem;
  scroll-padding-top: 200px;
  text-align: justify;
}

#nav {
  align-items: center;
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  color: black;
  display: flex;
  height: 70px;
  padding: 0 max(30px, 50% - 300px);
  position: fixed;
  top: -70px;
  transition: top 200ms ease-out;
  width: 100%;
  z-index: 1;
}
@media (min-height: 420px) {
  #nav.on {
    top: 0;
  }
}
#nav a:hover {
  opacity: 0.5;
}
#nav a.top {
  aspect-ratio: 1 / 1;
  height: 100%;
}
#nav a.up {
  color: inherit;
  padding: 20px 8px;
  text-decoration: none;
}

#unofficial {
  background-color: white;
  border-bottom: 1px solid #e0e0e0;
  color: black;
  padding: 9px max(30px, 50% - 300px) 11px;
}
#unofficial a {
  color: inherit;
}

h1 {
  background-color: white;
  background-image: url("/news/2026/kisaragisai/hero.avif");
  background-position: 50% 30%;
  background-size: cover;
  border-bottom: 1px solid #e0e0e0;
  color: black;
  font-size: 1.7rem;
  padding: 410px 30px 40px;
  text-align: center;
  width: 100%;
}

main {
  background-color: white;
  color: black;
  padding: 30px max(30px, 50% - 300px) 30px;
}
main > :not(hr, .carousel, :last-child) {
  margin-bottom: 1rem;
}
main h2 {
  font-size: 1.2rem;
  font-weight: bold;
}
main h2 small {
  background-color: black;
  border-radius: 12px;
  color: white;
  display: inline-block;
  font-size: 1rem;
  margin-inline-end: 4px;
  padding-inline: 8px;
}
main hr {
  border: 0;
  border-bottom: 1px solid #e0e0e0;
  margin: 24px -30px;
  width: calc(100% + 60px);
}
main a {
  color: inherit;
  word-break: break-all;
}
main figure {
  border-radius: 12px;
  box-shadow: 0 0 0 1px #e0e0e0;
  margin-inline: auto;
  max-width: 100%;
  overflow: clip;
  width: 400px;
  /* <figure> has multiple subfigures */
  &:has(.lr, .lrl, .lrr, .lrlr) {
    display: grid;
    gap: 2px;
    grid-auto-flow: dense;
    grid-template-columns: 1fr 1fr;
  }
}
/* two subfigures on left, one on right */
main figure :nth-child(2 of .lrl) {
  grid-row: span 2;
}
/* one subfigure on left, two on right */
main figure :nth-child(1 of .lrr) {
  grid-row: span 2;
}
main figure figcaption {
  grid-column: 1 / -1;
  padding: 3px 0 5px;
  text-align: center;
}
main figure img {
  background-color: #f0f0f0;
  height: 100%;
  object-fit: cover;
  width: 100%;
}
main figure a:hover {
  opacity: 0.7;
}
main .carousel {
  anchor-name: --carousel;
  anchor-scope: all;
  display: flex;
  gap: 1rem;
  list-style: none;
  margin-inline: clamp(-30px, 50% - 300px, 0px);
  margin-bottom: 38px;  /* padding box height of ::scroll-marker-group */
  overflow-x: scroll;
  padding: 1px clamp(1px, 300px - 50%, 30px);
  scroll-marker-group: after;
  scroll-snap-type: x mandatory;
  width: min(600px, 100vw);
}
main .carousel::scroll-marker-group {
  display: flex;
  gap: 6px;
  padding: 16px;
  position: absolute;
  position-anchor: --carousel;
  position-area: bottom center;
}
main .carousel li {
  border-radius: 12px;
  box-shadow: 0 0 0 1px #e0e0e0;
  flex-grow: 0;
  flex-shrink: 0;
  height: 250px;
  overflow: clip;
  position: relative;
  scroll-snap-align: center;
  width: 200px;
}
main .carousel li::scroll-marker {
  background-color: #e0e0e0;
  border-radius: 50%;
  content: "";
  height: 6px;
  transition: background-color 200ms;
  width: 6px;
}
main .carousel li::scroll-marker:target-current {
  background-color: black;
}
main .carousel img {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}
main .carousel small {
  bottom: 38px;
  font-size: 1rem;  /* not small actually */
  left: 1rem;
  position: absolute;
}
main .carousel b {
  bottom: 16px;
  left: 1rem;
  position: absolute;
}
