@font-face {
  font-family: "Ma Shan Zheng";
  src: url("../fonts/mashanzheng.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("../fonts/notoserifsc.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../fonts/notosanssc.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #fbf7ef;
  --paper-deep: #f0e7d9;
  --ink: #24221f;
  --ink-soft: #6e675f;
  --red: #a93643;
  --ochre: #b48834;
  --river: #5e858b;
  --green: #68775d;
  --line: rgba(36, 34, 31, 0.18);
  --hand-font: "HanziPen SC", "Hannotate SC", "STYuanti-SC-Regular", "Yuanti SC", "Ma Shan Zheng", cursive;
  --body-font: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif-font: "Songti SC", "STSong", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  font-family: var(--body-font);
  line-height: 1.55;
  overflow-x: hidden;
}

body[data-view="browse"] { overflow: hidden; }
body.dialog-open { overflow: hidden; }

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--river);
  outline-offset: 4px;
}

[hidden] { display: none !important; }

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.23;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(circle, rgba(36, 34, 31, 0.13) 0 0.4px, transparent 0.65px),
    repeating-linear-gradient(3deg, transparent 0 9px, rgba(180, 136, 52, 0.025) 10px 11px);
  background-size: 7px 7px, auto;
}

.intro-screen,
.transition-layer {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  place-items: center;
  color: var(--ink);
  background: var(--paper);
  text-align: center;
  pointer-events: none;
}

.intro-screen {
  z-index: 1500;
  animation: intro-curtain 1.65s ease forwards;
}

.intro-screen p,
.intro-screen span {
  margin: 0;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 14px;
  letter-spacing: 0.12em;
  animation: intro-copy 1.25s ease both;
}

.intro-screen h1 {
  margin: 17px 0 14px;
  color: var(--red);
  font-family: var(--hand-font);
  font-size: clamp(62px, 10vw, 112px);
  font-weight: 600;
  line-height: 0.94;
  transform: rotate(-1deg);
  animation: intro-title 1.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-screen i,
.transition-layer i {
  width: 150px;
  height: 3px;
  display: block;
  margin-top: 24px;
  background: var(--river);
  transform-origin: left center;
  animation: line-draw 1.05s 0.18s ease both;
}

.transition-layer {
  z-index: 1600;
  visibility: hidden;
  opacity: 0;
}

.transition-layer.playing {
  visibility: visible;
  animation: transition-curtain 680ms ease both;
}

.transition-layer span {
  position: absolute;
  color: color-mix(in srgb, var(--red) 15%, transparent);
  font-size: min(48vw, 520px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.1em;
}

.transition-layer strong {
  position: relative;
  z-index: 1;
  color: var(--red);
  font-family: var(--hand-font);
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 600;
  animation: transition-title 680ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.transition-layer i {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  background: var(--ochre);
}

.topbar {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  height: 84px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 22px 0;
  pointer-events: none;
  animation: chrome-enter 520ms 1.12s ease both;
}

.topbar button { pointer-events: auto; }

.brand-button {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-button strong {
  font-family: var(--hand-font);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
}

.brand-button span {
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 12px;
}

.view-switch {
  display: flex;
  gap: 13px;
}

.view-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: rgba(36, 34, 31, 0.26);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.view-button.active { color: var(--ink); }
.view-button:active { transform: scale(0.92); }
.view-label { display: none; }

.single-icon,
.grid-icon {
  position: relative;
  width: 25px;
  height: 19px;
  display: block;
  border: 1.8px solid currentColor;
}

.exhibition-icon {
  width: 25px;
  height: 19px;
  display: block;
  position: relative;
  border: 1.8px solid currentColor;
}

.exhibition-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid currentColor;
}

.single-icon::before,
.single-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 7px;
  border: 1.6px solid currentColor;
  transform: translateY(-50%);
}

.single-icon::before { left: -5px; border-right: 0; }
.single-icon::after { right: -5px; border-left: 0; }

.grid-icon {
  background:
    linear-gradient(currentColor, currentColor) 4px 4px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 4px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 18px 4px / 3px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 4px 11px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 11px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 18px 11px / 3px 4px no-repeat;
}

.app-shell {
  min-height: 100svh;
  position: relative;
}

.browse-view {
  min-height: 100svh;
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 84px 40px 104px;
  overflow: hidden;
  animation: view-in 420ms ease both;
}

.number-rail {
  position: absolute;
  z-index: 1;
  top: 43%;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4.7vw, 72px);
  padding: 0 42vw;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  transform: translateY(-50%);
  animation: rail-enter 620ms 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.number-rail::-webkit-scrollbar { display: none; }

.number-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: transparent;
  background: transparent;
  font-family: var(--body-font);
  font-size: clamp(52px, 7.5vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 1.2px rgba(36, 34, 31, 0.28);
  cursor: pointer;
  transition: color 240ms ease, -webkit-text-stroke 240ms ease, transform 240ms ease;
}

.number-button.active {
  color: var(--red);
  -webkit-text-stroke-color: var(--red);
  transform: scale(1.13);
}

.activity-stage {
  position: relative;
  z-index: 3;
  align-self: center;
  justify-self: center;
  width: min(43vw, 520px);
  aspect-ratio: 1.25;
  display: grid;
  place-items: center;
  touch-action: pan-y;
  animation: stage-enter 650ms 1.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.activity-stage.changing .main-artwork {
  animation: artwork-change 320ms ease;
}

.sketch-orbit {
  position: absolute;
  border: 3px solid var(--ochre);
  border-radius: 50%;
  opacity: 0.13;
  pointer-events: none;
  filter: url(#roughen);
}

.orbit-one {
  width: 88%;
  height: 56%;
  transform: rotate(-8deg);
}

.orbit-two {
  width: 66%;
  height: 83%;
  border-color: var(--river);
  transform: rotate(11deg);
}

.main-artwork {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.artwork-plate {
  --tone: var(--ochre);
  position: relative;
  width: min(72%, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--tone);
}

.tone-red { --tone: var(--red); }
.tone-ochre { --tone: var(--ochre); }
.tone-river { --tone: var(--river); }
.tone-green { --tone: var(--green); }
.tone-wood { --tone: var(--ochre); }
.tone-clay { --tone: var(--red); }
.tone-ink { --tone: var(--river); }
.tone-moss { --tone: var(--green); }

.artwork-plate::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 46% 54% 51% 49% / 54% 43% 57% 46%;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--tone) 45%, transparent) 0 0.9px, transparent 1.1px);
  background-size: 7px 7px;
  opacity: 0.34;
  transform: rotate(-4deg);
  -webkit-mask-image: radial-gradient(circle, #000 0 56%, transparent 73%);
  mask-image: radial-gradient(circle, #000 0 56%, transparent 73%);
}

.artwork-plate > svg {
  position: relative;
  z-index: 2;
  width: 68%;
  height: 68%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

.artwork-stroke {
  position: absolute;
  z-index: 1;
  width: 92%;
  height: 38%;
  border: 5px solid var(--tone);
  border-width: 5px 0 0;
  border-radius: 50%;
  opacity: 0.7;
}

.stroke-one { transform: rotate(-12deg); }
.stroke-two { transform: rotate(17deg) translateY(18px); opacity: 0.28; }

.artwork-note {
  position: absolute;
  z-index: 4;
  right: -5%;
  bottom: 8%;
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 14px;
  transform: rotate(-7deg);
}

.activity-caption {
  position: relative;
  z-index: 5;
  width: min(650px, 80vw);
  justify-self: center;
  padding-bottom: 8px;
  text-align: center;
  animation: caption-enter 520ms 1.4s ease both;
}

.caption-kicker {
  margin: 0 0 4px;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 13px;
}

.activity-caption h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--hand-font);
  font-size: clamp(35px, 4.3vw, 58px);
  font-weight: 600;
  line-height: 1.1;
}

.caption-meta {
  max-width: 48em;
  margin: 8px auto 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.caption-meta span {
  margin: 0 8px;
  color: var(--red);
}

.swipe-hint { display: none; }

.caption-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 13px;
}

.primary-action {
  min-height: 40px;
  padding: 8px 17px;
  border: 1.8px solid var(--red);
  background: transparent;
  font-family: var(--hand-font);
  font-size: 13px;
  cursor: pointer;
}

.primary-action {
  color: var(--paper);
  background: var(--red);
  clip-path: polygon(2% 3%, 98% 0, 100% 94%, 96% 100%, 0 97%);
}

.carousel-arrow {
  position: absolute;
  z-index: 8;
  top: 45%;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: rgba(251, 247, 239, 0.78);
  font-size: 23px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: transform 160ms ease, background 160ms ease;
}

.carousel-arrow:hover { background: var(--paper); transform: scale(1.05); }
.carousel-arrow-left { left: 22px; }
.carousel-arrow-right { right: 22px; }

.utility-bar {
  position: fixed;
  z-index: 70;
  left: 22px;
  right: 22px;
  bottom: max(17px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
  animation: chrome-enter 520ms 1.5s ease both;
}

.utility-links,
.seating-clock { pointer-events: auto; }

.utility-links {
  display: flex;
  align-items: center;
  gap: 8px 15px;
  flex-wrap: wrap;
}

.utility-links button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  color: var(--ink);
  background: transparent;
  font-family: var(--hand-font);
  font-size: 12px;
  cursor: pointer;
}

.utility-links button:nth-child(2) { color: var(--river); }
.utility-links button:nth-child(3) { color: var(--red); }

.seating-clock {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-soft);
  text-align: right;
}

.seating-clock span {
  font-family: var(--hand-font);
  font-size: 11px;
}

.seating-clock strong {
  color: var(--red);
  font-family: var(--hand-font);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.directory-view {
  min-height: 100svh;
  padding: 118px clamp(20px, 7vw, 104px) 110px;
  animation: view-in 420ms ease both;
}

.directory-heading {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(260px, 1.6fr) minmax(150px, 0.65fr);
  align-items: end;
  gap: 28px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--ink);
}

.directory-heading p,
.directory-heading span {
  margin: 0;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 13px;
}

.directory-heading h1 {
  margin: 0;
  font-family: var(--hand-font);
  font-size: clamp(48px, 6.5vw, 86px);
  font-weight: 600;
  line-height: 0.95;
}

.directory-heading span {
  justify-self: end;
  color: var(--river);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.directory-item {
  --tone: var(--ochre);
  min-height: 245px;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto auto;
  align-items: start;
  gap: 9px 14px;
  padding: 22px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 180ms ease;
}

.directory-item:hover {
  background: color-mix(in srgb, var(--tone) 7%, transparent);
}

.directory-number {
  color: transparent;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  -webkit-text-stroke: 1px var(--tone);
}

.directory-icon {
  justify-self: end;
  color: var(--tone);
}

.directory-icon svg {
  width: 39px;
  height: 39px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

.directory-item strong {
  grid-column: 1 / -1;
  align-self: end;
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 25px;
  font-weight: 500;
}

.directory-item small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 11px;
}

.full-dialog {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  overflow: auto;
}

.full-dialog[open] {
  animation: dialog-in 430ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.full-dialog::backdrop {
  background: var(--paper);
}

.dialog-back {
  position: fixed;
  z-index: 20;
  top: max(20px, env(safe-area-inset-top));
  left: 22px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: rgba(251, 247, 239, 0.86);
  font-size: 21px;
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.detail-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.detail-number {
  --tone: var(--red);
  display: grid;
  place-items: center;
  border-right: 1px solid var(--ink);
  color: var(--tone);
  font-size: clamp(180px, 31vw, 470px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.11em;
}

.detail-main {
  --tone: var(--red);
  min-width: 0;
  position: relative;
  padding: 28px clamp(30px, 5vw, 78px) 72px;
}

.detail-kicker {
  max-width: calc(100% - 50px);
  margin: 0;
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 13px;
}

.detail-main h2 {
  max-width: calc(100% - 35px);
  margin: 4px 0 5px;
  font-family: var(--hand-font);
  font-size: clamp(45px, 5vw, 74px);
  font-weight: 600;
  line-height: 1.02;
}

.detail-artwork {
  height: min(40vh, 360px);
  display: grid;
  place-items: center;
  color: var(--tone);
}

.detail-artwork svg {
  width: min(56%, 270px);
  height: min(56%, 270px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

.detail-description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1px;
  margin: 25px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.detail-meta div {
  padding: 12px;
  background: var(--paper);
}

.detail-meta dt {
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 11px;
}

.detail-meta dd {
  margin: 3px 0 0;
  font-size: 12px;
}

.detail-rule {
  margin: 20px 0;
  padding: 18px;
  border-left: 3px solid var(--tone);
  background: color-mix(in srgb, var(--tone) 7%, transparent);
}

.detail-rule span {
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 12px;
}

.detail-rule p {
  margin: 7px 0 0;
  font-size: 14px;
}

.dialog-heading {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  padding: 105px 0 43px;
  border-bottom: 2px solid var(--ochre);
}

.dialog-heading p {
  margin: 0 0 8px;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 14px;
}

.dialog-heading h2 {
  margin: 0;
  color: var(--red);
  font-family: var(--hand-font);
  font-size: clamp(48px, 7vw, 86px);
  font-weight: 600;
  line-height: 0.98;
}

.collection-grid {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 80px;
  border-left: 1px solid var(--line);
}

.collection-item {
  --tone: var(--ochre);
  min-height: 380px;
  display: grid;
  grid-template-columns: 54px 150px 1fr;
  align-items: center;
  gap: 18px;
  padding: 30px 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.collection-number {
  align-self: start;
  color: var(--tone);
  font-size: 20px;
  font-weight: 700;
}

.collection-artwork {
  color: var(--tone);
}

.collection-artwork svg {
  width: 130px;
  height: 130px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

.collection-item h3 {
  margin: 0;
  color: var(--tone);
  font-family: var(--hand-font);
  font-size: 27px;
  font-weight: 500;
}

.collection-item p {
  color: var(--ink-soft);
  font-size: 12px;
}

.collection-item details {
  margin-top: 16px;
  font-size: 12px;
}

.collection-item summary {
  width: max-content;
  padding-bottom: 2px;
  border-bottom: 1px dashed var(--tone);
  color: var(--tone);
  font-family: var(--hand-font);
  cursor: pointer;
}

.guide-layout {
  width: min(1120px, calc(100% - 44px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 50px 0 90px;
}

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 22px;
  left: 5px;
  width: 3px;
  background: var(--river);
  transform: rotate(-0.6deg);
}

.timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 15px;
  padding: 13px 0 20px;
}

.timeline > div::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 18px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--river);
  border-radius: 50%;
  background: var(--paper);
}

.timeline time {
  color: var(--river);
  font-family: var(--hand-font);
}

.timeline p { margin: 0; }
.timeline strong, .timeline span { display: block; }
.timeline strong { font-family: var(--hand-font); font-size: 18px; font-weight: 500; }
.timeline span { margin-top: 2px; color: var(--ink-soft); font-size: 11px; }
.timeline .important::before { border-color: var(--red); }
.timeline .important time, .timeline .important strong { color: var(--red); }

.points-note {
  align-self: start;
  padding: 27px;
  border: 2px solid var(--ochre);
}

.points-note > p {
  margin: 0;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 13px;
}

.points-note h3 {
  margin: 6px 0 18px;
  color: var(--red);
  font-family: var(--hand-font);
  font-size: 29px;
  font-weight: 500;
}

.points-note ul {
  margin: 0;
  padding-left: 1.25em;
  color: var(--ink-soft);
  font-size: 13px;
}

.points-note li + li { margin-top: 8px; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes artwork-change {
  0% { opacity: 1; transform: scale(1); }
  45% { opacity: 0; transform: scale(0.92) rotate(-3deg); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes intro-curtain {
  0%, 72% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes intro-title {
  0% { opacity: 0; transform: translateY(22px) rotate(-2deg); }
  38%, 82% { opacity: 1; transform: translateY(0) rotate(-1deg); }
  100% { opacity: 0; transform: translateY(-8px) rotate(-1deg); }
}

@keyframes intro-copy {
  0% { opacity: 0; transform: translateY(8px); }
  30%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; }
}

@keyframes line-draw {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes chrome-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rail-enter {
  from { opacity: 0; transform: translateY(-50%) translateX(50px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

@keyframes stage-enter {
  from { opacity: 0; transform: scale(0.86) rotate(-4deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes caption-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes transition-curtain {
  0% { opacity: 0; visibility: visible; }
  12%, 72% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes transition-title {
  0% { opacity: 0; transform: translateY(18px) scale(0.96); }
  22%, 70% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-10px) scale(1.02); }
}

@media (max-width: 900px) {
  .directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .collection-item { grid-template-columns: 44px 100px 1fr; }
  .collection-artwork svg { width: 90px; height: 90px; }
}

@media (max-width: 680px) {
  body[data-view="browse"] { overflow: hidden; }

  .topbar {
    height: 70px;
    align-items: center;
    padding: max(10px, env(safe-area-inset-top)) 15px 6px;
    background: linear-gradient(var(--paper) 72%, transparent);
  }

  .brand-button strong { font-size: 30px; }
  .brand-button span { font-size: 10px; }

  .view-switch {
    gap: 0;
    padding: 3px;
    border: 1px solid rgba(36, 34, 31, 0.28);
    background: rgba(251, 247, 239, 0.82);
  }

  .view-button {
    width: auto;
    height: 34px;
    display: flex;
    grid-template: none;
    gap: 6px;
    padding: 0 10px;
  }

  .view-button.active {
    color: var(--paper);
    background: var(--ink);
  }

  .view-label {
    display: inline;
    font-family: var(--hand-font);
    font-size: 12px;
  }

  .single-icon,
  .grid-icon {
    width: 18px;
    height: 14px;
    border-width: 1.4px;
  }

  .single-icon::before,
  .single-icon::after { display: none; }

  .grid-icon {
    background:
      linear-gradient(currentColor, currentColor) 3px 3px / 3px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 8px 3px / 3px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 13px 3px / 2px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 3px 8px / 3px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 8px 8px / 3px 3px no-repeat,
      linear-gradient(currentColor, currentColor) 13px 8px / 2px 3px no-repeat;
  }

  .browse-view {
    grid-template-rows: minmax(280px, 47dvh) auto;
    align-content: start;
    padding: 70px 18px 126px;
  }

  .number-rail {
    top: 30%;
    gap: 20px;
    padding-inline: 39vw;
  }

  .number-button {
    font-size: 45px;
    -webkit-text-stroke-width: 1px;
  }

  .number-button.active { transform: scale(1.18); }

  .activity-stage {
    align-self: center;
    width: min(90vw, 390px);
    aspect-ratio: 1.2;
    margin: 0;
  }

  .artwork-plate { width: 66%; }
  .artwork-note { right: -12%; bottom: 2%; font-size: 11px; }

  .activity-caption {
    width: 100%;
    padding: 14px 0 0;
    border-top: 1px solid rgba(36, 34, 31, 0.22);
    text-align: left;
  }

  .caption-kicker { font-size: 12px; }
  .activity-caption h1 { font-size: 42px; }

  .caption-meta {
    max-width: none;
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .swipe-hint {
    display: block;
    position: absolute;
    top: 15px;
    right: 0;
    margin: 0;
    color: var(--river);
    font-family: var(--hand-font);
    font-size: 10px;
  }

  .caption-actions {
    display: block;
    margin-top: 13px;
  }

  .caption-actions .primary-action {
    width: 100%;
    min-height: 47px;
    font-size: 15px;
  }

  .carousel-arrow { display: none; }

  .utility-bar {
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 5px;
    padding: 7px 14px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(36, 34, 31, 0.2);
    background: rgba(251, 247, 239, 0.96);
    backdrop-filter: blur(10px);
  }

  .seating-clock {
    order: -1;
    display: flex;
    justify-content: space-between;
    padding-bottom: 4px;
    border-bottom: 1px dashed rgba(169, 54, 67, 0.28);
  }

  .seating-clock span { font-size: 10px; }
  .seating-clock strong { font-size: 14px; }

  .utility-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .utility-links button {
    min-height: 32px;
    padding: 4px 3px;
    border: 0;
    border-right: 1px solid rgba(36, 34, 31, 0.14);
    font-size: 12px;
  }

  .utility-links button:last-child { border-right: 0; }

  .directory-view { padding: 86px 16px 112px; }

  .directory-heading {
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding-bottom: 20px;
  }

  .directory-heading p { grid-column: 1 / -1; }
  .directory-heading h1 { font-size: 46px; }
  .directory-heading span { align-self: end; font-size: 11px; }

  .directory-grid {
    grid-template-columns: 1fr;
    border-left: 0;
  }

  .directory-item {
    min-height: 98px;
    grid-template-columns: 46px 48px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    padding: 12px 4px;
    border-right: 0;
  }

  .directory-number {
    grid-column: 1;
    grid-row: 1 / 3;
    font-size: 27px;
  }

  .directory-icon {
    grid-column: 2;
    grid-row: 1 / 3;
    justify-self: center;
  }

  .directory-icon svg { width: 36px; height: 36px; }

  .directory-item strong {
    grid-column: 3;
    align-self: end;
    font-size: 23px;
  }

  .directory-item small {
    grid-column: 3;
    align-self: start;
    line-height: 1.35;
  }

  .dialog-back {
    top: max(14px, env(safe-area-inset-top));
    left: 15px;
    width: 40px;
    height: 40px;
  }

  .detail-shell {
    min-height: 100dvh;
    display: block;
    position: relative;
  }

  .detail-number {
    min-height: 0;
    position: absolute;
    z-index: 0;
    top: 60px;
    right: 16px;
    display: block;
    border: 0;
    color: color-mix(in srgb, var(--tone) 13%, transparent);
    font-size: 104px;
    letter-spacing: -0.08em;
    pointer-events: none;
  }

  .detail-main {
    min-height: 100dvh;
    position: relative;
    z-index: 1;
    padding: 78px 20px 55px;
  }

  .detail-kicker { font-size: 12px; }
  .detail-main h2 { max-width: 74%; font-size: 50px; }
  .detail-artwork { height: 190px; }
  .detail-artwork svg { width: 55%; height: 55%; }
  .detail-description { font-size: 14px; }
  .detail-meta { grid-template-columns: 1fr 1fr; margin: 18px 0; }
  .detail-meta div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .detail-rule { margin-bottom: 0; }

  .dialog-heading {
    width: calc(100% - 34px);
    padding: 79px 0 26px;
  }

  .dialog-heading h2 { font-size: 49px; }

  .collection-grid {
    width: calc(100% - 34px);
    display: block;
  }

  .collection-item {
    min-height: 245px;
    grid-template-columns: 37px 72px 1fr;
    gap: 9px;
    padding: 22px 5px;
    border-left: 0;
  }

  .collection-artwork svg { width: 65px; height: 65px; }
  .collection-item h3 { font-size: 22px; }

  .guide-layout {
    width: calc(100% - 34px);
    display: block;
    padding: 34px 0 65px;
  }

  .points-note { margin-top: 30px; padding: 21px 17px; }
}

@media (max-height: 720px) and (min-width: 681px) {
  .activity-stage { width: min(34vw, 390px); }
  .number-rail { top: 42%; }
  .activity-caption h1 { font-size: 38px; }
  .caption-meta { margin-top: 4px; }
  .caption-actions { margin-top: 8px; }
}

/* Standalone home */
body[data-view="home"] {
  overflow-y: auto;
}

body[data-view="home"] .view-switch {
  display: none;
}

.home-top-time {
  display: none;
}

body[data-view="home"] .home-top-time {
  display: grid;
  justify-items: end;
  gap: 2px;
  padding: 0;
  border: 0;
  color: var(--river);
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.home-top-time small {
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.home-top-time span {
  font-family: var(--hand-font);
  font-size: 14px;
}

body[data-view="home"] .utility-bar {
  display: none;
}

.home-view {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(560px, 1.28fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 26px clamp(45px, 7vw, 110px);
  padding: 110px clamp(28px, 7vw, 104px) 125px;
  overflow: hidden;
  animation: view-in 420ms ease both;
}

.home-view::after {
  content: "";
  min-height: 65px;
  grid-column: 2;
}

.home-intro {
  grid-row: 1 / 3;
  align-self: center;
  position: relative;
}

.home-intro::after {
  content: "";
  width: 92px;
  height: 3px;
  display: block;
  margin-top: 34px;
  background: var(--river);
  transform: rotate(-2deg);
}

.home-intro p {
  margin: 0 0 16px;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.home-intro h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--hand-font);
  font-size: clamp(62px, 7vw, 102px);
  font-weight: 600;
  line-height: 0.92;
  transform: rotate(-1deg);
}

.home-intro > span {
  max-width: 29em;
  display: block;
  margin-top: 25px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.home-entries {
  min-width: 0;
  align-self: end;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  grid-template-rows: repeat(3, minmax(118px, 1fr));
  gap: 12px;
}

.home-entry {
  min-width: 0;
  min-height: 180px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  padding: 23px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.home-entry:hover {
  transform: translateY(-4px) rotate(-0.35deg);
  box-shadow: 6px 7px 0 rgba(36, 34, 31, 0.11);
}

.home-entry-garden {
  grid-row: 1 / 4;
  min-height: 378px;
  background: color-mix(in srgb, var(--red) 9%, var(--paper));
}

.home-entry-exhibition {
  color: #171816;
  background: #e5e6e1;
}

.home-entry-directory {
  background: color-mix(in srgb, var(--ochre) 10%, var(--paper));
}

.home-entry-objects {
  background: color-mix(in srgb, var(--green) 10%, var(--paper));
}

.home-entry:not(.home-entry-garden) {
  min-height: 118px;
  padding: 16px 18px;
}

.home-entry:not(.home-entry-garden) h2 {
  font-size: 32px;
}

.home-entry:not(.home-entry-garden) p {
  margin-top: 5px;
}

.home-entry-number {
  position: absolute;
  top: 14px;
  left: 16px;
  color: currentColor;
  font-size: 10px;
  letter-spacing: 0.13em;
  opacity: 0.64;
}

.home-entry > i {
  position: absolute;
  right: 17px;
  bottom: 18px;
  font-family: var(--body-font);
  font-size: 20px;
  font-style: normal;
  transition: transform 180ms ease;
}

.home-entry:hover > i { transform: rotate(45deg); }

.home-entry > div:last-of-type {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 30px);
}

.home-entry small {
  display: block;
  margin-bottom: 5px;
  font-size: 7px;
  letter-spacing: 0.16em;
}

.home-entry h2 {
  margin: 0;
  font-family: var(--hand-font);
  font-size: 39px;
  font-weight: 500;
  line-height: 1;
}

.home-entry p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.home-entry p b {
  color: var(--red);
  font-family: var(--hand-font);
  font-size: 15px;
  font-weight: 500;
}

.home-entry-art {
  position: absolute;
  top: 11%;
  left: 50%;
  width: 78%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--red);
  border: 2px solid color-mix(in srgb, var(--red) 28%, transparent);
  border-radius: 49% 51% 43% 57% / 54% 44% 56% 46%;
  transform: translateX(-50%) rotate(-7deg);
}

.home-entry-art::after {
  content: "";
  position: absolute;
  inset: 13%;
  border: 1px dashed color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: 50%;
}

.home-entry-art svg {
  width: 46%;
  height: 46%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

.home-entry-frame {
  top: 13px;
  right: 15px;
  left: auto;
  width: 55px;
  height: 64px;
  aspect-ratio: auto;
  border: 1px solid #292a28;
  border-radius: 0;
  color: #292a28;
  background: #f4f4f0;
  transform: rotate(3deg);
}

.home-entry-frame::after { display: none; }

.home-entry-frame span {
  font-family: var(--serif-font);
  font-size: 20px;
  line-height: 0.92;
}

.home-entry-list {
  position: absolute;
  top: 24px;
  right: 20px;
  width: 66px;
  display: grid;
  gap: 9px;
}

.home-entry-list span {
  height: 1px;
  display: block;
  background: var(--ochre);
}

.home-entry-list span:nth-child(2) { width: 78%; }
.home-entry-list span:nth-child(3) { width: 45%; }

.home-entry-object-art {
  position: absolute;
  top: 15px;
  right: 19px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--green);
  border: 1px dashed color-mix(in srgb, var(--green) 55%, transparent);
  border-radius: 50%;
  transform: rotate(7deg);
}

.home-entry-object-art svg {
  width: 68%;
  height: 68%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#roughen);
}

@media (max-width: 860px) {
  .home-view {
    grid-template-columns: minmax(210px, 0.65fr) minmax(440px, 1.35fr);
    gap: 25px;
    padding-inline: 28px;
  }
}

@media (max-width: 680px) {
  .home-view {
    min-height: 100svh;
    display: block;
    padding: 88px 14px 128px;
    overflow: visible;
  }

  .home-intro {
    padding: 2px 4px 27px;
  }

  .home-intro::after {
    width: 64px;
    margin-top: 20px;
  }

  .home-intro p { margin-bottom: 10px; font-size: 10px; }
  .home-intro h1 { font-size: 53px; }
  .home-intro > span { max-width: 24em; margin-top: 15px; font-size: 10px; }

  .home-entries {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 230px 164px 112px;
    gap: 9px;
  }

  .home-entry {
    min-height: 0;
    padding: 15px;
  }

  .home-entry-garden {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 230px;
  }

  .home-entry-exhibition,
  .home-entry-objects {
    grid-row: 2;
  }

  .home-entry-directory {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .home-entry-number { top: 9px; left: 10px; font-size: 8px; }
  .home-entry > i { right: 11px; bottom: 12px; font-size: 15px; }
  .home-entry h2 { font-size: 31px; }
  .home-entry p { max-width: 15em; font-size: 8px; line-height: 1.5; }
  .home-entry small { font-size: 6px; }

  .home-entry-art {
    top: -20%;
    left: 60%;
    width: 60%;
  }

  .home-entry-frame {
    top: 11px;
    right: 10px;
    left: auto;
    width: 49px;
    height: 57px;
  }

  .home-entry-frame span { font-size: 18px; }
  .home-entry-list { top: 19px; right: 12px; width: 45px; gap: 7px; }

  .home-entry-object-art {
    top: 13px;
    right: 11px;
    width: 48px;
    height: 48px;
  }

}

/* Photography exhibition */
.exhibition-view {
  min-height: 100svh;
  padding: 118px clamp(22px, 7vw, 104px) 130px;
  background: #f5f5f1;
  animation: view-in 420ms ease both;
}

.exhibition-hero {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(45px, 8vw, 120px);
  margin: 0 auto;
  padding-bottom: 55px;
  border-bottom: 1px solid #20211f;
}

.exhibition-identity p,
.exhibition-detail-heading span,
.exhibition-curatorial-copy > span {
  margin: 0 0 18px;
  color: #70726e;
  font-size: 10px;
  letter-spacing: 0.17em;
}

.exhibition-identity h1 {
  margin: 0;
  color: #171816;
  font-family: var(--serif-font);
  font-size: clamp(62px, 8vw, 112px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.exhibition-identity h2 {
  max-width: 36em;
  margin: 24px 0 0;
  color: #444642;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.exhibition-intro {
  align-self: end;
  color: #4e504c;
  font-size: 12px;
  line-height: 1.9;
}

.exhibition-intro p { margin: 0; }
.exhibition-intro p + p { margin-top: 10px; }
.exhibition-intro p:first-child { color: #171816; font-size: 15px; }

.viewing-note {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: auto repeat(3, auto) 1fr;
  align-items: center;
  gap: 12px 24px;
  margin: 0 auto;
  padding: 18px 0;
  border-bottom: 1px solid #d2d3ce;
  color: #666864;
  font-size: 10px;
}

.viewing-note strong {
  color: #171816;
  font-size: 11px;
  font-weight: 600;
}

.viewing-note span {
  padding-left: 12px;
  border-left: 1px solid #c8c9c4;
  white-space: nowrap;
}

.viewing-note p {
  justify-self: end;
  margin: 0;
  text-align: right;
}

.exhibition-units {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
  margin: 55px auto 0;
}

.exhibition-unit {
  min-width: 0;
  padding: 0 0 46px;
  border: 0;
  color: #171816;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.unit-preview {
  position: relative;
  overflow: hidden;
  background: #dedfda;
}

.unit-open {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f5f5f1;
  background: rgba(23, 24, 22, 0.82);
  font-size: 15px;
  transition: transform 180ms ease;
}

.exhibition-unit:hover .unit-open { transform: rotate(45deg); }
.exhibition-unit:hover .exhibition-photo-media { filter: contrast(1.05); }

.exhibition-photo {
  min-width: 0;
  margin: 0;
}

.exhibition-photo-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  color: #6c6e69;
  background:
    linear-gradient(135deg, transparent 49.8%, rgba(68, 70, 66, 0.12) 50%, transparent 50.2%),
    linear-gradient(45deg, transparent 49.8%, rgba(68, 70, 66, 0.12) 50%, transparent 50.2%),
    #dedfda;
  transition: filter 180ms ease;
}

.exhibition-photo-media img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}

.photo-placeholder-number {
  position: absolute;
  top: 13px;
  left: 15px;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.photo-placeholder-label {
  position: absolute;
  left: 15px;
  bottom: 13px;
  max-width: calc(100% - 30px);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.exhibition-photo figcaption {
  margin-top: 8px;
  color: #70726e;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.exhibition-photo-preview figcaption { display: none; }

.unit-copy {
  position: relative;
  min-height: 185px;
  padding: 18px 0 0 52px;
  border-top: 1px solid #20211f;
}

.unit-number {
  position: absolute;
  top: 20px;
  left: 0;
  color: #6e706c;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.unit-copy p {
  margin: 0 0 22px;
  color: #868883;
  font-size: 8px;
  letter-spacing: 0.17em;
}

.unit-copy h3 {
  margin: 0;
  font-family: var(--serif-font);
  font-size: 25px;
  font-weight: 400;
}

.unit-copy h4 {
  margin: 6px 0 19px;
  color: #686a66;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.unit-copy small {
  color: #777974;
  font-size: 9px;
}

.exhibition-dialog {
  background: #f5f5f1;
}

.exhibition-detail {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 105px 0 100px;
}

.exhibition-detail-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding-bottom: 35px;
  border-bottom: 1px solid #20211f;
}

.exhibition-detail-heading span {
  display: block;
  margin-bottom: 17px;
}

.exhibition-detail-heading h2 {
  margin: 0;
  font-family: var(--serif-font);
  font-size: clamp(52px, 7vw, 90px);
  font-weight: 400;
  line-height: 1;
}

.exhibition-detail-heading h3 {
  margin: 13px 0 0;
  color: #686a66;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.exhibition-detail-heading > p {
  margin: 0;
  color: #696b67;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.exhibition-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 18px;
  margin-top: 48px;
}

.exhibition-gallery-1 { grid-template-columns: minmax(0, 0.7fr); }
.exhibition-gallery-3 .exhibition-photo:first-child { grid-row: span 2; }
.exhibition-gallery-3 .exhibition-photo:first-child .exhibition-photo-media { height: calc(100% - 17px); aspect-ratio: auto; }

.exhibition-curatorial-copy {
  display: grid;
  grid-template-columns: 180px minmax(0, 650px);
  gap: 40px;
  margin-top: 70px;
  padding-top: 28px;
  border-top: 1px solid #cfd0cb;
}

.exhibition-curatorial-copy p {
  margin: 0;
  color: #424440;
  font-family: var(--serif-font);
  font-size: 17px;
  line-height: 2;
}

@media (max-width: 860px) {
  .exhibition-units { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewing-note { grid-template-columns: auto repeat(3, auto); }
  .viewing-note p { grid-column: 1 / -1; justify-self: start; text-align: left; }
}

@media (max-width: 680px) {
  .exhibition-icon { display: none; }

  .exhibition-view {
    padding: 90px 16px 120px;
  }

  .exhibition-hero {
    display: block;
    padding-bottom: 31px;
  }

  .exhibition-identity p { margin-bottom: 12px; font-size: 8px; }
  .exhibition-identity h1 { font-size: 57px; }
  .exhibition-identity h2 { margin-top: 16px; font-size: 11px; line-height: 1.7; }

  .exhibition-intro {
    margin-top: 31px;
    padding-left: 22px;
    border-left: 1px solid #20211f;
    font-size: 11px;
  }

  .exhibition-intro p:first-child { font-size: 13px; }

  .viewing-note {
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
    padding: 15px 0;
  }

  .viewing-note strong { grid-column: 1 / -1; }
  .viewing-note span { padding-left: 0; border-left: 0; }
  .viewing-note span:last-of-type { grid-column: 1 / -1; }
  .viewing-note p { margin-top: 5px; line-height: 1.7; }

  .exhibition-units {
    display: block;
    margin-top: 31px;
  }

  .exhibition-unit {
    width: 100%;
    display: grid;
    grid-template-columns: 42% 58%;
    padding-bottom: 22px;
  }

  .unit-preview { align-self: start; }
  .unit-copy { min-height: 0; padding: 12px 0 9px 42px; }
  .unit-number { top: 13px; font-size: 8px; }
  .unit-copy p { margin-bottom: 15px; font-size: 7px; }
  .unit-copy h3 { font-size: 21px; }
  .unit-copy h4 { margin: 4px 0 11px; font-size: 9px; }
  .unit-copy small { display: block; font-size: 8px; line-height: 1.5; }
  .unit-open { right: 7px; bottom: 7px; width: 26px; height: 26px; font-size: 12px; }

  .photo-placeholder-number { top: 8px; left: 9px; font-size: 8px; }
  .photo-placeholder-label { left: 9px; bottom: 8px; font-size: 8px; }

  .exhibition-detail {
    width: calc(100% - 32px);
    padding: 80px 0 70px;
  }

  .exhibition-detail-heading { display: block; padding-bottom: 24px; }
  .exhibition-detail-heading h2 { font-size: 49px; }
  .exhibition-detail-heading h3 { font-size: 11px; }
  .exhibition-detail-heading > p { margin-top: 24px; line-height: 1.6; }

  .exhibition-gallery,
  .exhibition-gallery-1 {
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 30px;
  }

  .exhibition-gallery-3 .exhibition-photo:first-child { grid-row: auto; }
  .exhibition-gallery-3 .exhibition-photo:first-child .exhibition-photo-media { height: auto; aspect-ratio: 4 / 3; }

  .exhibition-curatorial-copy {
    display: block;
    margin-top: 45px;
  }

  .exhibition-curatorial-copy p { margin-top: 14px; font-size: 15px; }
}

/*
 * Field-notebook composition
 * The browse screen is intentionally one composed object: time strip, activity
 * card, and a quiet index. This keeps the handmade detail without visual noise.
 */
body[data-view="browse"] {
  overflow-y: auto;
}

.topbar {
  height: 76px;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 24px 8px;
  border-bottom: 1px solid rgba(36, 34, 31, 0.14);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
}

.brand-button {
  align-items: center;
  gap: 12px;
}

.brand-button strong {
  color: var(--red);
  font-size: 28px;
  transform: rotate(-2deg);
}

.brand-button span {
  padding-left: 11px;
  border-left: 1px solid var(--ochre);
  color: var(--ink-soft);
  font-family: var(--body-font);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.brand-button span i {
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 15px;
  font-style: normal;
}

.browse-view {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 96px 24px 116px;
  overflow: hidden;
}

.browse-view::before {
  content: "";
  position: fixed;
  z-index: -1;
  width: min(72vw, 940px);
  height: min(72vw, 940px);
  top: 46%;
  left: 50%;
  border: 1px solid rgba(94, 133, 139, 0.13);
  border-radius: 47% 53% 44% 56% / 52% 42% 58% 48%;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.day-strip {
  width: min(820px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: var(--ink-soft);
  font-family: var(--hand-font);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.day-strip b {
  margin-right: 4px;
  color: var(--red);
  font-size: 14px;
  font-weight: 500;
}

.day-strip i {
  width: min(190px, 22vw);
  height: 1px;
  position: relative;
  background: var(--ochre);
}

.day-strip i::before,
.day-strip i::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border: 1px solid var(--ochre);
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
}

.day-strip i::before { left: 0; }
.day-strip i::after { right: 0; }

.activity-card {
  width: min(820px, 100%);
  min-height: 480px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  grid-template-rows: 38px 1fr;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 8px 0 rgba(94, 133, 139, 0.13);
}

.activity-card::before,
.activity-card::after {
  content: "";
  position: absolute;
  z-index: 10;
  width: 60px;
  height: 18px;
  background: rgba(206, 178, 121, 0.34);
  pointer-events: none;
}

.activity-card::before {
  top: -8px;
  left: 25px;
  transform: rotate(-3deg);
}

.activity-card::after {
  right: 22px;
  bottom: -8px;
  transform: rotate(4deg);
}

.card-eyebrow {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.card-eyebrow span:last-child {
  color: var(--river);
  font-family: var(--hand-font);
  letter-spacing: 0.04em;
}

.activity-stage {
  --stage-tone: var(--ochre);
  width: auto;
  height: 100%;
  min-height: 440px;
  aspect-ratio: auto;
  position: relative;
  align-self: stretch;
  overflow: hidden;
  border-right: 1px solid var(--ink);
  background: color-mix(in srgb, var(--stage-tone) 11%, var(--paper));
}

.activity-stage[data-tone="red"] { --stage-tone: var(--red); }
.activity-stage[data-tone="river"] { --stage-tone: var(--river); }
.activity-stage[data-tone="green"] { --stage-tone: var(--green); }

.activity-stage::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  top: 50%;
  left: 50%;
  border-radius: 48% 52% 43% 57% / 53% 45% 55% 47%;
  background: color-mix(in srgb, var(--stage-tone) 10%, transparent);
  transform: translate(-50%, -50%) rotate(-8deg);
}

.activity-stage::after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px dashed color-mix(in srgb, var(--stage-tone) 35%, transparent);
  clip-path: polygon(0 0, 62% 0, 62% 1px, 100% 1px, 100% 100%, 38% 100%, 38% calc(100% - 1px), 0 calc(100% - 1px));
  pointer-events: none;
}

.main-artwork {
  overflow: hidden;
}

.artwork-index {
  position: absolute;
  z-index: 0;
  top: -0.09em;
  left: -0.08em;
  color: color-mix(in srgb, var(--stage-tone) 13%, transparent);
  font-size: clamp(150px, 21vw, 255px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.13em;
}

.artwork-plate {
  width: min(72%, 315px);
}

.artwork-plate > svg {
  width: 64%;
  height: 64%;
  stroke-width: 1.8;
}

.artwork-code {
  position: absolute;
  left: -12%;
  bottom: 7%;
  color: var(--ink-soft);
  font-family: var(--body-font);
  font-size: 8px;
  letter-spacing: 0.14em;
  transform: rotate(-90deg);
  transform-origin: left bottom;
}

.activity-caption {
  width: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 33px 30px 28px;
  border: 0;
  text-align: left;
}

.caption-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 11px;
}

.caption-kicker i {
  padding: 2px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--river);
  font-size: 9px;
  font-style: normal;
}

.activity-caption h1 {
  max-width: 6em;
  font-size: clamp(45px, 5vw, 66px);
  line-height: 0.98;
}

.caption-description {
  margin: 17px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.caption-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.caption-facts span {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.caption-facts small {
  display: block;
  margin-bottom: 2px;
  color: var(--ochre);
  font-family: var(--hand-font);
  font-size: 9px;
}

.caption-actions {
  display: block;
  margin-top: 19px;
}

.primary-action {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  clip-path: none;
  border: 1.5px solid var(--red);
  background: var(--red);
  font-size: 14px;
}

.primary-action b {
  font-family: var(--body-font);
  font-size: 18px;
  font-weight: 400;
}

.number-rail {
  width: min(820px, 100%);
  position: static;
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 5px 0 0;
  overflow: visible;
  transform: none;
}

.number-button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink-soft);
  font-family: var(--hand-font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  -webkit-text-stroke: 0;
}

.number-button.active {
  border-color: var(--red);
  color: var(--paper);
  background: var(--red);
  transform: rotate(-5deg);
}

.carousel-arrow {
  top: 50%;
  width: 38px;
  height: 38px;
  border-color: var(--ink);
  background: var(--paper);
  font-size: 18px;
}

.carousel-arrow-left { left: -52px; }
.carousel-arrow-right { right: -52px; }

.utility-bar {
  width: min(820px, calc(100% - 32px));
  left: 50%;
  right: auto;
  bottom: max(12px, env(safe-area-inset-bottom));
  padding: 8px 11px;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  box-shadow: 4px 4px 0 rgba(180, 136, 52, 0.12);
  transform: translateX(-50%);
  animation: none;
  backdrop-filter: blur(10px);
}

.utility-links button {
  min-height: 27px;
  padding: 3px 10px;
  border: 0;
  border-right: 1px solid var(--line);
  font-size: 11px;
}

.utility-links button:last-child { border-right: 0; }

@media (max-width: 680px) {
  .topbar {
    height: 68px;
    padding: max(8px, env(safe-area-inset-top)) 14px 5px;
  }

  .brand-button { gap: 8px; }
  .brand-button strong { font-size: 23px; }
  .brand-button span { padding-left: 8px; font-size: 8px; }
  .brand-button span i { font-size: 12px; }

  .view-switch {
    border: 0;
    background: transparent;
  }

  .view-button {
    height: 30px;
    padding: 0 8px;
  }

  .view-button.active {
    color: var(--ink);
    background: transparent;
    box-shadow: inset 0 -2px var(--red);
  }

  .view-button .single-icon,
  .view-button .grid-icon { display: none; }

  .browse-view {
    min-height: 100svh;
    justify-content: flex-start;
    gap: 10px;
    padding: 82px 14px 132px;
    overflow: visible;
  }

  .browse-view::before {
    width: 110vw;
    height: 110vw;
    top: 35%;
  }

  .day-strip {
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px;
    font-size: 9px;
  }

  .day-strip b { font-size: 12px; }
  .day-strip i { flex: 1; width: auto; }

  .activity-card {
    min-height: 0;
    display: block;
    box-shadow: 5px 6px 0 rgba(94, 133, 139, 0.13);
  }

  .activity-card::before { left: 18px; }
  .activity-card::after { right: 16px; }

  .card-eyebrow {
    height: 33px;
    padding-inline: 10px;
    font-size: 7px;
  }

  .card-eyebrow span:last-child { font-size: 9px; }

  .activity-stage {
    width: 100%;
    height: clamp(230px, 35svh, 300px);
    min-height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .activity-stage::after { inset: 12px; }

  .artwork-index {
    font-size: clamp(128px, 41vw, 170px);
  }

  .artwork-plate { width: min(59%, 205px); }
  .artwork-note { right: -19%; bottom: 1%; }
  .artwork-code { left: -18%; }

  .activity-caption {
    min-height: 0;
    display: block;
    padding: 18px 17px 17px;
  }

  .caption-kicker {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .activity-caption h1 {
    max-width: none;
    font-size: 43px;
  }

  .caption-description {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.65;
  }

  .caption-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 13px;
  }

  .caption-facts span { padding: 7px 8px; font-size: 9px; }
  .caption-facts small { font-size: 8px; }
  .caption-actions { margin-top: 12px; }
  .primary-action { min-height: 43px; font-size: 13px; }

  .number-rail {
    justify-content: flex-start;
    gap: 4px;
    padding: 3px 2px;
    overflow-x: auto;
    scroll-padding-inline: 45%;
  }

  .number-button {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    font-size: 9px;
  }

  .utility-bar {
    width: auto;
    left: 8px;
    right: 8px;
    bottom: max(7px, env(safe-area-inset-bottom));
    gap: 4px;
    padding: 6px 8px;
    transform: none;
  }

  .seating-clock {
    padding: 0 2px 4px;
  }

  .utility-links button {
    min-height: 30px;
    font-size: 11px;
  }

  .directory-view { padding-top: 82px; }
}

.browse-view,
.exhibition-view,
.directory-view {
  scroll-margin-top: 68px;
}

/* Responsive containment: the viewport never pans horizontally. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

.app-shell,
.home-view,
.browse-view,
.exhibition-view,
.directory-view,
.full-dialog,
.detail-shell,
.exhibition-detail {
  max-width: 100%;
}

img,
svg {
  max-width: 100%;
}

.full-dialog {
  overflow-x: hidden;
}

@media (max-width: 680px) {
  body[data-view="home"] {
    overflow: hidden;
  }

  .home-view::after {
    width: 100%;
    min-height: 0;
    flex: 0 0 55px;
  }

  .home-view {
    width: 100%;
    height: 100svh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: max(70px, calc(env(safe-area-inset-top) + 58px)) 10px max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .home-intro {
    flex: 0 0 auto;
    width: 100%;
    padding: 0 3px 12px;
  }

  .home-intro::after {
    display: none;
  }

  .home-intro p {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .home-intro h1 {
    font-size: clamp(38px, 11vw, 46px);
    line-height: 0.88;
  }

  .home-intro > span {
    max-width: none;
    margin-top: 8px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-entries {
    display: grid;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.56fr);
    grid-template-areas:
      "garden garden"
      "exhibition objects"
      "directory directory";
    gap: 7px;
  }

  .home-entry,
  .home-entry-garden,
  .home-entry-exhibition,
  .home-entry-objects,
  .home-entry-directory,
  .home-entry:not(.home-entry-garden) {
    min-width: 0;
    min-height: 0;
    grid-column: auto;
    grid-row: auto;
    padding: 12px;
  }

  .home-entry > div:last-of-type {
    max-width: calc(100% - 16px);
  }

  body[data-view="home"] .home-entry-garden { grid-area: garden; }

  body[data-view="home"] .home-entry-exhibition { grid-area: exhibition; }
  body[data-view="home"] .home-entry-objects { grid-area: objects; }

  body[data-view="home"] .home-entry-directory { grid-area: directory; }

  .home-entry h2,
  .home-entry:not(.home-entry-garden) h2 {
    font-size: clamp(27px, 8vw, 33px);
  }

  .home-entry p,
  .home-entry:not(.home-entry-garden) p {
    margin-top: 4px;
    font-size: 7px;
    line-height: 1.35;
  }

  .home-entry p b {
    font-size: 11px;
  }

  .home-entry-number {
    top: 7px;
    left: 8px;
    font-size: 7px;
  }

  .home-entry > i {
    right: 8px;
    bottom: 9px;
    font-size: 13px;
  }

  .home-entry-art {
    top: -10%;
    left: 68%;
    width: 72%;
  }

  .home-entry-frame {
    top: 9px;
    right: 8px;
    left: auto;
    width: 43px;
    height: 50px;
  }

  .home-entry-frame span {
    font-size: 16px;
  }

  .home-entry-object-art {
    top: 10px;
    right: 8px;
    width: 42px;
    height: 42px;
  }

  .home-entry-list {
    top: 17px;
    right: 9px;
    width: 40px;
    gap: 6px;
  }

  .number-rail {
    justify-content: center;
    overflow-x: hidden;
    scroll-behavior: auto;
  }

  .directory-heading,
  .directory-grid,
  .exhibition-hero,
  .viewing-note,
  .exhibition-units,
  .guide-layout,
  .collection-grid {
    max-width: 100%;
  }
}

@media (max-width: 680px) and (max-height: 700px) {
  .home-intro {
    padding-bottom: 8px;
  }

  .home-intro > span,
  .home-entry p {
    display: none;
  }

  .home-view::after {
    flex-basis: 51px;
  }

}

/* Page-to-page motion */
.topbar,
.app-shell,
.utility-bar {
  transition:
    opacity 180ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.view-changing {
  pointer-events: none;
}

body.view-leaving .topbar,
body.view-leaving .app-shell,
body.view-leaving .utility-bar,
body.view-entering .topbar,
body.view-entering .app-shell,
body.view-entering .utility-bar {
  opacity: 0;
  transform: translateY(8px);
}

@media (prefers-reduced-motion: reduce) {
  .intro-screen,
  .transition-layer {
    display: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
