/* Quake Canvas. Art first, everything else quiet. */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

/* The page takes the ground colour of the artwork on show. */
.v-suminagashi {
  --bg: #eee6d4;
  --text: #6b6252;
  --strong: #2b2720;
  --faint: rgba(60, 45, 25, 0.28);
}
.v-helicorder {
  --bg: #131418;
  --text: #8f897d;
  --strong: #e4ddd0;
  --faint: rgba(236, 229, 214, 0.22);
}
.v-suminagashi .only-helicorder,
.v-helicorder .only-suminagashi {
  display: none !important;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--serif);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 0.2em; }
a:hover { color: var(--strong); text-decoration-color: currentColor; }

/* Day */
.day {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3vh 0 0;
}
.art {
  margin: 0 auto;
  /* Fill the width, but leave room for the caption on short screens. */
  width: min(100%, calc((100svh - 9rem) * 1.6));
  padding: 0 4vw;
}
.art img,
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  /* Soften the outer 3% so the image edge disappears into the page
     (paper grain and WebP colour drift would otherwise show a faint box). */
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 3%, #000 97%, transparent),
    linear-gradient(to bottom, transparent, #000 3%, #000 97%, transparent);
  mask-composite: intersect;
}
.caption {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.4rem auto 0;
  padding: 0 16px;
  max-width: 60rem;
  font-size: 0.87rem;
  text-align: center;
}
.caption p { margin: 0; }
.caption time { color: var(--strong); }
.caption .facts::before { content: "· "; }
.step {
  min-width: 2rem;
  padding: 0.2rem 0.4rem;
  text-decoration: none;
  color: var(--text);
}
.download {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.75rem;
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 2.2rem 16px 1.2rem;
  font-size: 0.75rem;
}
.foot nav { display: flex; gap: 1.2rem; }
.foot p { margin: 0; }
@media (min-width: 700px) {
  .foot { padding-left: 4vw; padding-right: 4vw; }
}

/* Version toggle: deliberately small and easy to miss. */
.toggle {
  position: fixed;
  right: 6px;
  top: 6px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  opacity: 0.35;
  cursor: pointer;
}
.toggle:hover, .toggle:focus-visible { opacity: 0.9; }

/* Gallery and About */
.gallery, .about {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 3.5rem 16px 0;
}
.about { max-width: 36rem; }
h1 {
  margin: 0 0 1.6rem;
  font-size: 1rem;
  font-weight: normal;
  color: var(--strong);
}
h2 {
  margin: 2rem 0 0.4rem;
  font-size: 0.9rem;
  font-weight: normal;
  font-style: italic;
  color: var(--strong);
}
.about p { margin: 0 0 0.9rem; }
.gallery { max-width: 76rem; }
.gallery ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2rem 1.5rem;
}
.gallery a { display: block; text-decoration: none; font-size: 0.8rem; }
.gallery img { margin-bottom: 0.4rem; }
@media (min-width: 700px) {
  .gallery, .about { padding-left: 4vw; padding-right: 4vw; }
  .about { max-width: calc(36rem + 8vw); }
}
