/*
 * Nakaya. The visual language is the app's: a Japanese scientific instrument,
 * 1936. Cream washi, sumi ink, indigo from the Sekka Zusetsu's woodblocks,
 * brass hairlines, and vermillion exactly once per page, on the seal.
 *
 * It departs from the studio's other sites on purpose. Orrery and HiveLab are
 * night pages; Nakaya's page is paper, and the dark arrives only where the app
 * is dark: the prologue's room, and the ground the specimens are lit on.
 */

:root {
  --paper:      #EEE7DA;   /* measured from the app's painted ground */
  --paper-deep: #E4DCCB;   /* fold, panel edge */
  --card:       #F4F1EA;   /* the app's washi, for cards that sit on the page */
  --sumi:       #2A2B2E;   /* ink */
  --sumi-2:     rgba(42, 43, 46, 0.72);
  --sumi-3:     rgba(42, 43, 46, 0.55);
  --ai:         #1B2A4A;   /* indigo: headings, the diagram */
  --kon:        #0B1221;   /* the prologue's room */
  --plate:      #000413;   /* the specimens' own ground, measured from the plates */
  --shu:        #C4362C;   /* the seal, once */
  --kin:        #B99A5B;   /* brass hairlines and fittings */
  --kin-line:   rgba(185, 154, 91, 0.5);
  --kori:       #DCE7F2;   /* ice */
  --washi-ink:  rgba(244, 241, 234, 0.92);  /* paper-on-indigo text */
  --washi-ink-2: rgba(244, 241, 234, 0.66);

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mincho: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", YuMincho, "Noto Serif JP", serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--sumi);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* The washi's fibre, faint, over the flat page colour. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("/img/washi.webp") repeat;
  background-size: 627px;
  opacity: 0.32;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--ai); text-decoration-color: var(--kin-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ai); }
:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--card); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ai);
  opacity: 0.8;
  margin: 0 0 14px;
}

h1, h2, h3 { font-weight: 400; color: var(--ai); margin: 0; }
h2 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; letter-spacing: -0.005em; }
h3 { font-size: 21px; line-height: 1.3; }

section { padding: clamp(80px, 11vw, 140px) 0; }
.section-head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p:not(.eyebrow) { color: var(--sumi-2); margin: 18px 0 0; }

/* ------------------------------------------------------------------ nav */

.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 22px 0; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand {
  font-size: 15px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ai); text-decoration: none; margin: 0;
}
.links { display: flex; gap: clamp(16px, 3vw, 30px); }
.links a { font-size: 15px; color: var(--sumi-2); text-decoration: none; }
.links a:hover { color: var(--ai); }

/* ------------------------------------------------------------------ hero */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px 0 80px;
  overflow: hidden;
}

/* The ume branch and the mountain, cut from the app's own painted ground and
   faded into the page by masks, so no edge of either crop is ever visible. */
.ume {
  position: absolute; top: 0; right: 0;
  width: clamp(220px, 26vw, 380px);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 78% 38%, #000 52%, transparent 100%);
          mask-image: radial-gradient(ellipse 80% 75% at 78% 38%, #000 52%, transparent 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.fuji {
  position: absolute; left: -2vw; bottom: 4vh;
  width: clamp(300px, 42vw, 592px);
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 55% 55%, #000 40%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 55% at 55% 55%, #000 40%, transparent 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.wordmark {
  font-size: clamp(64px, 10vw, 128px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--sumi);
}
.subtitle {
  font-style: italic;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--ai);
  margin: 14px 0 0;
}
.lede {
  max-width: 34ch;
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--sumi-2);
  margin: 26px 0 34px;
  padding-top: 26px;
  border-top: 1px solid var(--kin-line);
}

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 52px; padding: 7px 20px 8px;
  border-radius: 10px;
  background: var(--sumi);
  color: var(--card);
  line-height: 1.15;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
.store-small { font-size: 11px; letter-spacing: 0.02em; opacity: 0.85; }
.store-big { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.store-light { background: var(--card); color: var(--sumi); }
a.store { text-decoration: none; }

.btn-ghost {
  font-size: 17px; color: var(--ai); text-decoration: none;
  border-bottom: 1px solid var(--kin-line); padding-bottom: 2px;
}
.btn-ghost:hover { border-bottom-color: var(--ai); }
.btn-ghost::after { content: " \2193"; }
.cta-note { font-size: 14px; color: var(--sumi-3); margin: 16px 0 0; }

/* The porthole: the chamber's round window, ringed in brass like the icon. */
.porthole-fig { margin: 0; justify-self: center; width: min(100%, 440px); }
.porthole {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--plate);
  box-shadow:
    0 0 0 6px var(--paper),
    0 0 0 7px var(--kin),
    0 0 0 13px var(--paper),
    0 0 0 13.75px var(--kin-line),
    0 30px 60px -20px rgba(11, 18, 33, 0.45);
  overflow: hidden;
}
.porthole canvas, .porthole img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%;
}
.porthole canvas { opacity: 0; transition: opacity 0.9s ease; }
.porthole canvas.is-live { opacity: 1; }
/* A faint vignette, the glass of the window. */
.porthole::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, transparent 62%, rgba(0, 4, 19, 0.55) 100%);
  pointer-events: none;
}
figcaption { text-align: center; margin-top: 30px; min-height: 92px; }
.reading { display: block; font-size: 15px; letter-spacing: 0.04em; color: var(--ai); font-variant-numeric: tabular-nums; }
.reading-note { display: block; font-size: 14px; color: var(--sumi-3); margin-top: 4px; font-style: italic; }
.regrow {
  margin-top: 12px;
  font: inherit; font-size: 15px; color: var(--ai);
  background: none; border: 1px solid var(--kin-line); border-radius: 999px;
  padding: 6px 18px; cursor: pointer;
}
.regrow:hover { border-color: var(--ai); }

/* Nakaya's own sentence, set vertically, with the seal at its foot. */
.tategaki {
  writing-mode: vertical-rl;
  font-family: var(--mincho);
  font-size: 19px;
  letter-spacing: 0.32em;
  color: var(--ai);
  opacity: 0.78;
  display: flex;
  align-items: center;
  gap: 18px;
  /* Pinned low in the page's right margin, so the column hangs below the ume
     branch rather than through it. */
  position: absolute;
  right: calc(var(--gutter) * 0.9);
  bottom: 9vh;
}
.seal {
  writing-mode: horizontal-tb;
  display: grid; place-items: center;
  width: 46px; height: 46px;
  background: var(--shu);
  color: var(--card);
  border-radius: 5px;
  font-size: 17px; line-height: 1.05; letter-spacing: 0;
  text-align: center;
  font-weight: 600;
  opacity: 0.96;
}

/* ------------------------------------------------------------------ night */

.night { background: var(--kon); color: var(--washi-ink); }
.night h2, .night h3 { color: var(--card); }
.night .eyebrow { color: var(--kin); opacity: 1; }
.night .section-head p:not(.eyebrow) { color: var(--washi-ink-2); }

/* ------------------------------------------------------------------ story */

.story-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 100px); }
.story-frame {
  position: sticky; top: 8vh;
  height: 80vh; max-height: 820px;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  justify-self: end;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(185, 154, 91, 0.28), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}
.story-frame picture {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.1s ease;
}
.story-frame picture.is-on { opacity: 1; }
.story-frame img { width: 100%; height: 100%; object-fit: cover; }
/* Each painting is a tall phone frame; these keep its subject in a 3:4 crop. */
.story-frame [data-frame="0"] img { object-position: 50% 88%; }
.story-frame [data-frame="1"] img { object-position: 50% 26%; }
.story-frame [data-frame="2"] img { object-position: 50% 42%; }
.story-frame [data-frame="3"] img { object-position: 50% 52%; }
.story-frame [data-frame="4"] img { object-position: 50% 62%; }

.stanzas { list-style: none; margin: 0; padding: 0; }
.stanza {
  min-height: 72vh;
  display: flex; flex-direction: column; justify-content: center;
  font-size: clamp(21px, 2.1vw, 26px);
  line-height: 1.55;
  color: var(--washi-ink-2);
  transition: color 0.6s ease;
}
.stanza.is-on { color: var(--washi-ink); }
.stanza p { margin: 0; max-width: 28ch; }
.stanza em { color: var(--kori); }
.stanza-last { margin-top: 1.1em !important; color: var(--card); font-style: italic; }
.stanza-img { display: none; }

/* ------------------------------------------------------------------ letters */

.letters-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.letters-intro p:not(.eyebrow) { color: var(--sumi-2); margin: 18px 0 0; max-width: 40ch; }
.letters-intro h2 { margin-bottom: 4px; }
.desk {
  margin-top: 44px;
  max-width: 380px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(185, 154, 91, 0.35), 0 24px 50px -28px rgba(42, 43, 46, 0.45);
}

.envelopes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: none; }
.envelope {
  background: var(--card);
  border: 0.75px solid rgba(185, 154, 91, 0.45);
  border-radius: 6px;
  padding: 22px 26px 22px;
  box-shadow: 0 4px 12px rgba(42, 43, 46, 0.06);
  position: relative;
}
/* The flap: a brass hairline chevron, the envelope reduced to one stroke. */
.envelope::before {
  content: "";
  position: absolute; right: 22px; top: 22px;
  width: 26px; height: 18px;
  border: 0.75px solid var(--kin-line);
  border-radius: 2px;
  background:
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--kin-line) 50%, transparent calc(50% + 0.5px)) left / 50% 100% no-repeat,
    linear-gradient(to bottom left, transparent calc(50% - 0.5px), var(--kin-line) 50%, transparent calc(50% + 0.5px)) right / 50% 100% no-repeat;
}
.envelope.sealed::after {
  content: "";
  position: absolute; right: 30px; top: 31px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ai);
  opacity: 0.85;
}
.env-no { font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sumi-3); margin: 0; }
.env-free {
  letter-spacing: 0.08em; text-transform: none; font-style: italic;
  color: var(--ai); margin-left: 8px;
}
.env-from { margin: 6px 0 0; color: var(--ai); font-size: 17px; }
.envelope blockquote {
  margin: 10px 0 0; padding: 0;
  font-style: italic; font-size: 19px; line-height: 1.45; color: var(--sumi);
}
.envelope blockquote::before { content: "\201C"; }
.envelope blockquote::after { content: "\201D"; }
.price-note { margin: 44px 0 0; text-align: center; color: var(--sumi-2); font-style: italic; }

/* ------------------------------------------------------------------ diagram */

.diagram { background: rgba(228, 220, 203, 0.55); border-top: 1px solid var(--kin-line); border-bottom: 1px solid var(--kin-line); }
.diagram-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--sumi); stroke-opacity: 0.55; stroke-width: 1; }
.chart .grid { stroke: var(--kin); stroke-opacity: 0.28; stroke-width: 0.75; }
.chart .tick { font-size: 13px; fill: var(--sumi-2); font-family: var(--serif); font-variant-numeric: tabular-nums; }
.chart .axis-label { font-size: 13px; fill: var(--ai); letter-spacing: 0.16em; text-transform: uppercase; font-family: var(--serif); }
.chart .cloud { fill: none; stroke: var(--kin); stroke-width: 1.5; stroke-dasharray: 5 5; }
.chart .cloud-label { font-size: 13px; fill: #8a6f3a; font-style: italic; font-family: var(--serif); }
.chart .region { cursor: pointer; outline: none; }
.chart .region circle { fill: var(--ai); fill-opacity: 0.07; stroke: var(--ai); stroke-opacity: 0.45; stroke-width: 1; transition: fill-opacity 0.25s, stroke-opacity 0.25s; }
.chart .region text {
  font-size: 14px; fill: var(--ai); font-family: var(--serif); text-anchor: middle; pointer-events: none;
  /* A paper halo, so a name stays legible where it crosses the chosen region. */
  paint-order: stroke; stroke: #E9E2D3; stroke-width: 3.5px; stroke-linejoin: round;
}
.chart .region:hover circle, .chart .region:focus-visible circle { fill-opacity: 0.14; stroke-opacity: 0.9; }
.chart .region:focus-visible circle { stroke-width: 2; }
.chart .region.is-on circle { fill: var(--ai); fill-opacity: 0.86; stroke-opacity: 1; }
.chart .region.is-on text { fill: var(--card); stroke: var(--ai); }
.chart .region .dot { fill: var(--ai); fill-opacity: 0.6; stroke: none; }
.chart .region.is-on .dot { fill: var(--card); }

.specimen { position: sticky; top: 40px; }
.specimen-plate {
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--plate);
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--kin), 0 24px 48px -20px rgba(11, 18, 33, 0.5);
  margin-bottom: 28px;
}
.specimen-plate img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; }
.specimen-plate img.is-fading { opacity: 0; }
.specimen-air { font-size: 14px; letter-spacing: 0.06em; color: var(--sumi-3); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.specimen h3 { font-size: 28px; }
.specimen-tag { font-style: italic; color: var(--ai); margin: 4px 0 14px; }
.specimen p:last-child { color: var(--sumi-2); margin: 0; }
.footnotes {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px); margin-top: 56px;
  padding-top: 28px; border-top: 1px solid var(--kin-line);
}
.footnote { margin: 0; font-size: 15.5px; color: var(--sumi-2); }
.limits h3 { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 10px; }
.limits p { margin: 0 0 12px; }
.limits p:last-child { margin-bottom: 0; }
.cloud-key { white-space: nowrap; border-bottom: 1.5px dashed var(--kin); }

/* ------------------------------------------------------------------ real */

.real { padding-bottom: 0; }
.real-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.real-copy p { margin: 0 0 18px; color: var(--sumi-2); }
.real-copy p:first-child { color: var(--sumi); font-size: 20px; }

/* ------------------------------------------------------------------ museum */

.museum { background: var(--plate); margin-top: clamp(80px, 11vw, 140px); }
.shelf {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 28px);
}
.shelf li { color: var(--washi-ink-2); }
.shelf figure { margin: 0; }
.shelf .plate {
  aspect-ratio: 1; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 0.75px rgba(185, 154, 91, 0.3);
}
.shelf .plate img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease; }
.shelf figure:hover .plate img { transform: scale(1.04); }
.shelf figcaption { text-align: left; margin: 12px 0 0; min-height: 0; }
.shelf .name { display: block; color: var(--card); font-size: 17px; }
.shelf .tag { display: block; color: var(--washi-ink-2); font-size: 14.5px; font-style: italic; margin-top: 2px; }
.shelf .journey {
  display: inline-block; margin-top: 8px;
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--kin);
}

/* ------------------------------------------------------------------ care */

.care-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}
.care-list li { border-top: 1px solid var(--kin-line); padding: 22px 0 34px; }
.care-list h3 { font-size: 19px; margin-bottom: 8px; }
.care-list p { margin: 0; color: var(--sumi-2); font-size: 16.5px; }

/* ------------------------------------------------------------------ close */

.close {
  background: var(--kon);
  color: var(--washi-ink);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
}
.close-art { height: 100%; max-height: 900px; }
.close-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.close-words { padding: clamp(64px, 9vw, 120px) var(--gutter); max-width: 620px; margin: 0; }
.close h2 { color: var(--card); font-style: italic; }
.close p { color: var(--washi-ink-2); margin: 24px 0 36px; }

/* ------------------------------------------------------------------ footer */

footer { padding: 64px 0 48px; border-top: 1px solid var(--kin-line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.quote { margin: 14px 0 0; color: var(--sumi-2); font-size: 15px; max-width: 40ch; }
.quote [lang="ja"] { font-family: var(--mincho); color: var(--ai); letter-spacing: 0.12em; }
.cols { display: flex; gap: clamp(32px, 6vw, 72px); }
.cols div { display: flex; flex-direction: column; gap: 10px; }
.cols a { color: var(--sumi-2); text-decoration: none; font-size: 15.5px; }
.cols a:hover { color: var(--ai); }
.fnote { font-size: 13.5px; color: var(--sumi-3); margin: 40px 0 0; max-width: 72ch; }

/* ------------------------------------------------------------------ documents */

.doc { max-width: 720px; margin: 0 auto; padding: 120px var(--gutter) 80px; }
.doc h1 { font-size: clamp(38px, 6vw, 54px); margin-bottom: 10px; }
.doc h2 { font-size: 24px; margin: 44px 0 10px; }
.doc p, .doc li { color: var(--sumi-2); }
.doc strong { color: var(--sumi); font-weight: 600; }
.doc .updated { font-size: 14px; color: var(--sumi-3); margin: 0 0 28px; }
.doc .lead {
  background: var(--card);
  border: 0.75px solid rgba(185, 154, 91, 0.45);
  border-radius: 6px;
  padding: 22px 26px;
  color: var(--sumi);
  margin: 0 0 12px;
}
.back { display: inline-block; font-size: 15px; text-decoration: none; margin-bottom: 30px; }

/* ------------------------------------------------------------------ narrow */

/* Below this the page margin is too narrow to hold the column, so the
   sentence sets horizontally under the porthole. */
@media (max-width: 1240px) {
  .tategaki {
    position: static; writing-mode: horizontal-tb;
    grid-column: 2; justify-self: center; margin-top: -8px;
    font-size: 16px; letter-spacing: 0.18em; gap: 14px;
  }
  .seal { width: 38px; height: 38px; font-size: 14px; }
}

@media (max-width: 960px) {
  .tategaki { grid-column: 1; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .porthole-fig { margin-top: 12px; }
  .diagram-grid, .letters-grid, .real-grid, .footnotes { grid-template-columns: minmax(0, 1fr); }
  .specimen { position: static; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .specimen-plate { grid-row: 1 / span 4; width: 160px; margin: 6px 0 0; }
  .care-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desk { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hide-sm { display: none; }
  .hero { padding-top: 96px; min-height: 0; }
  .ume { width: 48vw; opacity: 0.8; }
  .fuji { display: none; }
  .wordmark { font-size: clamp(60px, 18vw, 84px); }
  .lede { max-width: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .porthole-fig { grid-column: 1; width: min(100%, 360px); margin-top: 8px; }

  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .story-frame { display: none; }
  .stanza { min-height: 0; padding: 0 0 56px; color: var(--washi-ink); }
  .stanza-img {
    display: block; width: min(100%, 300px); aspect-ratio: 640 / 1000;
    border-radius: 12px; overflow: hidden; margin-bottom: 22px;
    box-shadow: 0 0 0 1px rgba(185, 154, 91, 0.28);
  }
  .stanza-img img { width: 100%; height: 100%; object-fit: cover; }
  .stanza[data-frame="0"] .stanza-img img { object-position: 50% 92%; }
  .stanza[data-frame="1"] .stanza-img img { object-position: 50% 24%; }
  .stanza[data-frame="2"] .stanza-img img { object-position: 50% 42%; }
  .stanza[data-frame="3"] .stanza-img img { object-position: 50% 52%; }
  .stanza[data-frame="4"] .stanza-img img { object-position: 50% 62%; }
  .stanza p { max-width: none; }

  /* The chart scales down with the page; its type must not. */
  .chart .region text { font-size: 19px; }
  .chart .tick, .chart .axis-label, .chart .cloud-label { font-size: 17px; }
  .specimen { grid-template-columns: minmax(0, 1fr); }
  .specimen-plate { grid-row: auto; width: min(70%, 260px); margin: 0 0 22px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-list { grid-template-columns: minmax(0, 1fr); }
  .close { grid-template-columns: minmax(0, 1fr); }
  .close-art { height: 46vh; }
  .close-words { padding-top: 48px; }
  .foot { flex-direction: column; }
  .cols { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .story-frame picture, .stanza, .porthole canvas, .specimen-plate img, .shelf .plate img { transition: none; }
  .shelf figure:hover .plate img { transform: none; }
}
