:root {
  --olive: #585f4d;
  --olive-deep: #32382c;
  --ink: #22261c;
  --paper: #f4f1ea;
  --card: #fbf9f5;
  --muted: #5c6454;
  --line: rgba(34, 38, 28, 0.14);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Songti TC", PMingLiU, serif;
  --sans: "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --pad: clamp(18px, 4vw, 48px);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --fs-kicker: 0.8125rem;
  --fs-h2: 1.5625rem;
  --fs-h3: 1.125rem;
  --fs-body: 0.9375rem;
  --fs-caption: 0.8125rem;
  --lh-body: 1.6;
  --text-zoom: 1;
  color-scheme: light;
}

@media (min-width: 720px) {
  :root {
    --fs-kicker: 0.875rem;
    --fs-h2: 2.125rem;
    --fs-h3: 1.3125rem;
    --fs-body: 1rem;
    --fs-caption: 0.875rem;
    --lh-body: 1.7;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: calc(100% * var(--text-zoom));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  margin: 0;
  text-wrap: pretty;
}

h1 { font-weight: 700; line-height: 1.15; }
h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.3; }
h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.4; }

p { margin: 0; }

::selection { background: #d7decc; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--card);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 6;
}

.skip:focus { top: 12px; }

:focus-visible {
  outline: 3px solid #f4f1ea;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--pad);
  background: var(--olive);
  color: var(--paper);
}

.brand { display: flex; align-items: center; }

.logo { height: 48px; width: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: auto;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.book-link {
  min-height: 40px;
  padding: 0 16px;
  flex: none;
}

.text-size {
  display: inline-flex;
  flex: none;
  align-items: stretch;
  border: 1px solid rgba(244, 241, 234, 0.4);
  border-radius: 999px;
  overflow: hidden;
}

.text-size-label {
  display: inline-flex;
  align-items: center;
  padding: 0 10px 0 12px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.text-size button {
  min-width: 52px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid rgba(244, 241, 234, 0.28);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.text-size button:disabled { opacity: 0.38; cursor: default; }
.text-size button:not(:disabled):active { background: rgba(244, 241, 234, 0.14); }

.hero {
  display: grid;
  background: var(--olive);
  color: var(--paper);
}

.hero-copy {
  padding: 28px var(--pad) 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  max-width: 640px;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  font-size: var(--fs-kicker);
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.78);
}

h1 { font-size: clamp(2.5rem, 9vw, 4.8rem); }

.lead {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  max-width: 28em;
  color: #f3f0e6;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn.solid { background: var(--paper); color: var(--olive-deep); }
.btn.ghost { border-color: rgba(244, 241, 234, 0.7); color: var(--paper); background: transparent; }
.btn.ink { background: var(--olive); color: var(--paper); border: 0; }

.hero-photo {
  position: relative;
  margin: 16px var(--pad) 24px;
  border-radius: 22px;
  overflow: hidden;
  background: #2c3326;
  aspect-ratio: 4 / 5;
  box-shadow: 0 0 0 1px rgba(244, 241, 234, 0.18);
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 68% 24%;
}

.hero-cap {
  position: absolute;
  left: 12px;
  bottom: 12px;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(34, 38, 28, 0.62);
  color: var(--paper);
  font-size: var(--fs-caption);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.section {
  padding: clamp(56px, 8vw, 104px) var(--pad);
  max-width: 1160px;
  margin: 0 auto;
  scroll-margin-top: 108px;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 1.5rem;
  max-width: 38rem;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--olive);
  letter-spacing: 0.05em;
  font-size: var(--fs-kicker);
  font-weight: 500;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.section-head h2 { margin: 0; }
.section-head p { color: var(--muted); max-width: 38em; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rx-band {
  background: var(--olive);
  color: var(--paper);
  padding: clamp(36px, 6vw, 80px) var(--pad) clamp(48px, 7vw, 88px);
  scroll-margin-top: 108px;
}

.rx-board {
  max-width: 820px;
  margin: 0 auto;
}

.rx-logo {
  height: 84px;
  width: auto;
  margin: 0 auto 20px;
}

.rx-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vw, 20px);
  align-items: stretch;
}

.rx-v {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.42em;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rx-sheet {
  border: 1.5px solid rgba(244, 241, 234, 0.92);
  box-shadow: inset 0 0 0 6px rgba(88, 95, 77, 0.35), inset 0 0 0 7px rgba(244, 241, 234, 0.35);
  padding: 18px 20px 20px;
}

.rx-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.45);
  font-size: var(--fs-body);
}

.rx-check,
.rx-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.rx-list li { display: flex; }

.box {
  width: 1em;
  height: 1em;
  border: 1.5px solid currentColor;
  position: relative;
  flex: none;
}

.box::after {
  content: "";
  position: absolute;
  left: 0.18em;
  top: 0.26em;
  width: 0.46em;
  height: 0.24em;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.blank {
  display: inline-block;
  width: 2em;
  border-bottom: 1px solid currentColor;
  margin: 0 0.2em;
  transform: translateY(-0.15em);
}

.rx-sheet h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: var(--fs-h3);
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 16px 0 8px;
  margin: 0 0 10px;
}

.rx-sheet h3::before,
.rx-sheet h3::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(244, 241, 234, 0.45);
}

.rx-list,
.rx-effects {
  list-style: none;
  margin: 0;
  padding: 0 6px 6px;
  display: grid;
  gap: 7px;
}

.rx-effects li::before {
  content: "－";
  margin-right: 0.35em;
}

.rx-caution {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 0 6px;
  line-height: 1.75;
}

.rx-tools { width: 132px; height: auto; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.chips li {
  border: 1px solid rgba(244, 241, 234, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chips-on-olive { justify-content: center; }

.focus-grid {
  display: grid;
  gap: 14px;
}

.focus-grid article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 24px;
}

.focus-grid h3 { margin-bottom: 8px; }
.focus-grid p { color: var(--muted); max-width: 36em; }

.pair-list { display: grid; gap: 12px; }

.pair {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.pair summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.pair summary::-webkit-details-marker { display: none; }
.pair summary::marker { content: ""; }

.pair summary::after {
  content: "";
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--olive);
  border-bottom: 2px solid var(--olive);
  transform: translateY(-0.12em) rotate(45deg);
  flex: none;
  transition: transform 160ms var(--ease);
}

.pair[open] summary::after { transform: translateY(0.12em) rotate(225deg); }

.pair h3 { margin: 0; }

.pair-body {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.pair p { color: var(--muted); max-width: 36em; }

.frame {
  --pos: 62%;
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background: #d9d3c6;
  box-shadow: 0 16px 40px rgba(34, 38, 28, 0.08);
}

.frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.frame .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.frame[data-focus="toilet"] img { object-position: 22% 70%; }

.frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #f4f1ea;
  transform: translateX(-1px);
  box-shadow: 0 0 0 1px rgba(34, 38, 28, 0.25);
  z-index: 2;
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 14px;
  z-index: 3;
  background: rgba(34, 38, 28, 0.72);
  color: var(--paper);
  border-radius: 999px;
  max-width: calc(50% - 20px);
  padding: 5px 11px;
  font-size: var(--fs-caption);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
}

.badge.before { left: 14px; }
.badge.after { right: 14px; }

.range-label {
  display: grid;
  gap: 2px;
  margin-top: 10px;
  font-size: var(--fs-caption);
  font-weight: 400;
  color: var(--muted);
}

.range-label input {
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--olive);
  background: transparent;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 460px);
  margin: 0 0 12px;
  padding: 4px;
  background: #e8e2d6;
  border-radius: 999px;
}

.filters button {
  min-height: 40px;
  padding: 0 8px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.filters button[aria-pressed="true"] {
  background: var(--olive);
  color: var(--paper);
}

#gallery-status {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-weight: 400;
}

.gallery {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
}

.card {
  position: relative;
  min-width: 0;
  margin: 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.card[hidden]:not([hidden="until-found"]) { display: none; }

.card[hidden="until-found"] {
  content-visibility: hidden;
  contain-intrinsic-size: 0px;
  position: absolute;
  inset: 0 auto auto 0;
  width: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.pager[hidden] { display: none; }

.pager button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}

.pager button[aria-current="page"] {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--paper);
}

.pager button:active { transform: scale(0.97); }

.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #ddd6c8;
  border-radius: 18px;
  overflow: hidden;
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.card figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  color: var(--paper);
  pointer-events: none;
  font-size: var(--fs-caption);
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.card figcaption span {
  background: rgba(24, 28, 20, 0.62);
  border-radius: 999px;
  padding: 2px 8px;
}

.phase {
  color: rgba(244, 241, 234, 0.82);
  letter-spacing: 0.06em;
  font-size: 0.875rem;
  font-weight: 500;
}

.steps {
  display: grid;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0 0 0 6px;
  counter-reset: step;
  border-left: 1px solid var(--line);
}

.steps li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 26px 22px;
  border: 0;
}

.steps strong { font-size: var(--fs-h3); font-weight: 600; line-height: 1.4; }
.steps li span { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--muted); }

.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -15px;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--olive);
  color: var(--olive);
  font-family: var(--serif);
  font-size: var(--fs-caption);
  font-weight: 500;
}

.book {
  display: grid;
  gap: 28px;
}

.book > div p { margin-top: 10px; color: var(--muted); max-width: 28em; }

.book-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 20px 50px rgba(34, 38, 28, 0.05);
}

form, .book-card { display: grid; gap: 14px; }

.form-2 { display: grid; gap: 14px; }

label { display: grid; gap: 6px; font-size: var(--fs-caption); font-weight: 400; }

input, select, textarea {
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 400;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
}

textarea { min-height: 120px; resize: vertical; }

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 1px;
  box-shadow: none;
  border-color: var(--olive);
}

.check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; }
.check input { min-height: 1.15rem; width: 1.15rem; margin-top: 0.2rem; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status { min-height: 1.5em; color: var(--olive-deep); }

.site-footer {
  background: var(--olive-deep);
  color: var(--paper);
  padding: 40px var(--pad) calc(36px + env(safe-area-inset-bottom));
}

.site-footer .wrap {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}

.footer-logo { height: 52px; width: auto; }

.site-footer strong { font-size: 1rem; font-weight: 600; }
.site-footer p { color: rgba(244, 241, 234, 0.76); margin-top: 4px; font-size: var(--fs-caption); font-weight: 400; }
.site-footer .btn { margin-left: auto; }

.credit {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-weight: 400;
}

.credit a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer .credit {
  max-width: 1160px;
  margin: 20px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(244, 241, 234, 0.18);
  color: rgba(244, 241, 234, 0.66);
}

.site-footer .credit a:hover { color: var(--paper); }

dialog {
  width: min(960px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 20px;
  padding: 12px;
  background: var(--card);
  color: var(--ink);
  overflow: auto;
}

dialog::backdrop { background: rgba(34, 38, 28, 0.72); }

dialog img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  background: #ece7dc;
  border-radius: 12px;
}

dialog form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

dialog .text-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: none;
  padding: 0 0 1px;
  border: 0;
  border-radius: 999px;
  background: var(--olive-deep);
  color: var(--paper);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 719px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
    padding: 8px 12px 0;
  }

  .brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .header-tools {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    gap: 6px;
  }

  .text-size-label { padding: 0 6px 0 8px; font-size: 13px; letter-spacing: 0; }
  .text-size button {
    min-width: 0;
    min-height: 40px;
    padding: 0 8px;
    font-size: 13px;
  }
  .book-link { min-height: 40px; padding: 0 10px; font-size: 14px; }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 4px -12px 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(244, 241, 234, 0.2);
  }

  .nav a {
    justify-content: center;
    padding: 0 4px;
    min-height: 42px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
  }

  .logo { height: 34px; max-width: 100%; }

  .rx-v { letter-spacing: 0.28em; font-size: 0.95rem; }
  .rx-sheet { padding: 14px 12px 16px; }
  .rx-bar { display: none; }
  .rx-meta { row-gap: 8px; }
  .rx-caution {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 8px;
  }
  .rx-tools { justify-self: end; width: 112px; }
}

@media (min-width: 720px) {
  .focus-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book { grid-template-columns: 0.82fr 1.18fr; align-items: start; gap: 48px; }
  .book > div:first-child { position: sticky; top: 108px; }
  .form-2 { grid-template-columns: 1fr 1fr; }
  .pair-body { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; }
  .frame { aspect-ratio: 4 / 5; }
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    border-left: 0;
  }
  .steps li {
    padding: 22px 8px 0 0;
    border-top: 1px solid var(--line);
  }
  .steps li::before {
    position: static;
    margin-bottom: 12px;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(340px, 0.86fr) 1.14fr;
    min-height: calc(100svh - 68px);
    align-items: stretch;
  }
  .hero-copy { padding: clamp(40px, 6vw, 80px) 48px clamp(40px, 6vw, 80px) var(--pad); }
  .hero-photo {
    margin: 20px;
    aspect-ratio: auto;
    min-height: 0;
    align-self: stretch;
    border-radius: 28px;
  }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { background: rgba(244, 241, 234, 0.1); }
  .shot:hover img { transform: scale(1.035); }
}

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 40px;
  }
}

@keyframes settle {
  from { scale: 1.14; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise-in 900ms var(--ease) both;
  }

  .hero-copy > :nth-child(2) { animation-delay: 140ms; }
  .hero-copy > :nth-child(3) { animation-delay: 280ms; }
  .hero-copy > :nth-child(4) { animation-delay: 420ms; }

  .hero-photo img { animation: settle 1400ms var(--ease) both; }

  .pair[open] .pair-body { animation: rise-in 520ms var(--ease) both; }

  dialog[open] { animation: rise-in 420ms var(--ease) both; }

  html.js-motion :is(.section-head, .focus-grid article, .pair, .steps li, .rx-sheet, .filters, .book > div:first-child, .book-card):not(.in) {
    opacity: 0;
    translate: 0 40px;
  }

  html.js-motion :is(.filters, .pair, .book-card):not(.in) { visibility: hidden; }

  html.js-motion :is(.section-head, .focus-grid article, .pair, .steps li, .rx-sheet, .filters, .book > div:first-child, .book-card).in {
    visibility: visible;
    animation: rise-in 800ms var(--ease) both;
  }

  html.js-motion .focus-grid article.in:nth-child(2),
  html.js-motion .steps li.in:nth-child(2) { animation-delay: 90ms; }
  html.js-motion .steps li.in:nth-child(3) { animation-delay: 180ms; }
  html.js-motion .steps li.in:nth-child(4) { animation-delay: 270ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .shot img, .pair summary::after, .pager button, .filters button { transition: none; }
}
