/* Hapşu! — the product's printed spread. */
.product-page {
  --paper: #f6f1e7;
  --ink: #251d23;
  --pink-stage: #f1a6be;
  --rule: rgb(37 29 35 / 31%);
  --gutter: clamp(1.15rem, 4.45vw, 6rem);
  --edge: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  background: var(--paper);
  color: var(--ink);
}
.product-page .masthead { min-height: 4.4375rem; }
.product-page .masthead .brand { gap: .65rem; font-size: 1.4rem; font-weight: 730; letter-spacing: .018em; }
.product-page .main-nav { gap: clamp(1rem, 3.8vw, 3.5rem); }
.product-page .main-nav a { font-weight: 660; }
.hapshu-story :is(h1, h2, p, figure) { margin: 0; }
.game-opening { background: var(--pink-stage); }
.scene-meta, .scene-foot, .section-kicker, .pail-figure figcaption {
  font: 500 .72rem/1.4 ui-monospace, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scene-meta, .scene-foot { display: flex; align-items: center; }
.scene-meta {
  min-height: 3.8rem;
  padding-top: .8rem;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.opening-spread {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 51.5% 48.5%;
  grid-template-rows: 1fr auto;
  min-height: clamp(26rem, min(40.3vw, 66svh), 43rem);
}
.opening-spread h1 {
  grid-area: 1 / 1;
  align-self: end;
  width: max-content;
  margin-left: -.045em;
  margin-bottom: .105em;
  font-size: 13.6cqw;
  font-weight: 1000;
  line-height: .99;
  letter-spacing: -.055em;
  text-transform: uppercase;
  -webkit-text-stroke: .025em currentColor;
  transform: scale(1.105, .93);
  transform-origin: left top;
}
.cow-portrait {
  grid-area: 1 / 2 / 3;
  min-width: 0;
  align-self: stretch;
  position: relative;
}
.cow-portrait img {
  position: absolute;
  inset: 2% 0;
  display: block;
  height: 96%;
  width: 97%;
  object-fit: contain;
}
.mode-intro { grid-area: 2 / 1; padding-bottom: clamp(2rem, 3.75vw, 4.4rem); }
.mode-intro h2 { font-size: clamp(1.65rem, 2.35vw, 2.7rem); font-weight: 650; line-height: 1.1; letter-spacing: -.035em; }
.mode-intro p { margin-top: 1.15rem; font-size: clamp(1.1rem, 1.55vw, 1.65rem); line-height: 1.35; letter-spacing: -.027em; }
.round-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.6rem;
  min-height: 3.125rem;
  margin-top: clamp(1.5rem, 3.1vw, 3.25rem);
  padding: .55rem 1.15rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.08rem;
  font-weight: 660;
  text-decoration: none;
}
.round-link span, .scene-foot span { font-size: 1.25rem; line-height: 1; }
.round-link:focus-visible { outline-color: var(--ink); }
@media (hover: hover) { .round-link:hover { background: #44303c; } }
.round-link:active { background: #573748; }
.scene-foot { min-height: 4.375rem; gap: 1.5rem; justify-content: end; border-top: 1px solid var(--rule); }
.round-scene { padding-block: clamp(2rem, 2.35vw, 3rem) clamp(2.75rem, 4.4vw, 5rem); }
.round-scene h2 {
  display: grid;
  grid-template-columns: minmax(max-content, 38%) 1fr;
  align-items: center;
  gap: 1rem;
  margin-top: .95rem;
  font-size: clamp(2.5rem, 3.25vw, 4rem);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.045em;
}
.round-scene h2::after { content: ""; height: 1px; background: var(--rule); }
.round-spread {
  display: grid;
  grid-template-columns: 49% 51%;
  align-items: center;
  padding-block: clamp(2rem, 3.5vw, 4.25rem);
}
.pail-figure { display: grid; justify-items: center; gap: 1rem; }
.story-pail { display: block; width: clamp(12rem, 20vw, 22rem); height: auto; }
.round-result { padding-inline: 2% 0; }
.milk-score { font-weight: 850; font-size: clamp(4.2rem, 10vw, 11rem); line-height: 1; letter-spacing: -.075em; }
.round-result .milk-score { margin-block: .1em 1rem; }
.milk-score span { display: block; margin-top: .2em; font-size: clamp(1.25rem, 1.8vw, 2rem); font-weight: 580; letter-spacing: -.035em; }
.score-note { max-width: 33ch; font-size: clamp(1rem, 1.3vw, 1.4rem); line-height: 1.45; letter-spacing: -.018em; }
.round-sources { display: flex; justify-content: end; gap: 1.8rem; padding-top: .5rem; border-top: 1px solid var(--rule); }
.round-sources a { display: inline-flex; min-height: 44px; align-items: center; gap: .4rem; font-size: .9rem; text-decoration-thickness: 1px; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry 25% entry 100%) {
    .round-spread { view-timeline-name: --round; }
    .pail-level {
      animation: milk-rises auto linear both;
      animation-timeline: --round;
      animation-range: entry 25% entry 100%;
    }
  }
}
@keyframes milk-rises {
  from { transform: translateY(172px); }
  to { transform: translateY(12.94px); }
}
@media (max-width: 46rem) {
  .product-page .masthead { min-height: 3.5rem; gap: .5rem; }
  .product-page .masthead .brand { gap: .35rem; font-size: 1rem; letter-spacing: 0; }
  .product-page .masthead .brand img { width: 1.15rem; }
  .product-page .main-nav { gap: clamp(.25rem, 2.5vw, .95rem); }
  .product-page .main-nav a { justify-content: center; font-size: .82rem; }
  .scene-meta { min-height: 2.8rem; padding-top: .15rem; }
  .scene-meta, .section-kicker, .pail-figure figcaption { font-size: .66rem; }
  .opening-spread { grid-template-columns: 1fr; grid-template-rows: auto auto auto; min-height: 0; padding-block: 1.25rem 1.5rem; }
  .opening-spread h1 { grid-area: 1 / 1; margin-bottom: 0; font-size: min(25.6cqw, 9rem); line-height: .96; }
  .cow-portrait { grid-area: 2 / 1; justify-self: end; width: 78%; max-width: 23rem; margin-block: .1rem .65rem; }
  .cow-portrait img { position: static; width: 100%; height: auto; }
  .mode-intro { grid-area: 3 / 1; padding: 0; }
  .mode-intro p { margin-top: .4rem; }
  .round-link { min-height: 2.9rem; margin-top: 1.15rem; gap: 2.1rem; font-size: 1rem; }
  .scene-foot { min-height: 2.6rem; font-size: .64rem; gap: .8rem; }
  .round-scene h2 { grid-template-columns: max-content 1fr; margin-top: .65rem; }
  .round-spread { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 1.3rem; align-items: start; padding-block: 2.2rem; }
  .story-pail { width: min(100%, 12rem); }
  .round-result { padding: 0; }
  .round-result .section-kicker { font-size: .61rem; }
  .milk-score { font-size: clamp(3.35rem, 12vw, 5rem); }
  .milk-score span { font-size: 1.1rem; }
  .score-note { font-size: .95rem; }
  .round-sources { justify-content: start; gap: 1.2rem; }
}
