/* Layouts after ImageExpansionTypography by Codrops (MIT). The inline image is a real
   part of each line box; ScrollTrigger/Flip measure the two sets of typesetting. */
/* ScrollTrigger temporarily scrolls to zero to measure the layout. Native smoothing
   must not delay that measurement when a visitor arrives midway through the exhibition. */
html:has(#type-exhibition) {scroll-behavior: auto !important;}
@font-face {
  font-family: 'Coconat Exhibition';
  src: url('assets/codrops/Coconat-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.type-exhibition {
  --te-edge: clamp(18px, 2.5vw, 46px);
  --te-img: 33vw;
  --te-display: 'Coconat Exhibition', 'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Noto Serif SC', 'SimSun', Georgia, serif;
  position: relative;
  overflow: clip;
  overflow-anchor: none;
  isolation: isolate;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.type-exhibition:focus {outline: 0;}
.type-loading-screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.type-loading-screen::before {
  content: '';
  position: sticky;
  top: calc(50svh - 30px);
  display: block;
  width: 60px;
  height: 60px;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--ink);
  animation: type-loading-pulse .7s ease-in-out infinite alternate;
}
@keyframes type-loading-pulse {
  from {opacity: .4; transform: scale(.5);}
  to {opacity: .8; transform: scale(1);}
}
@media (prefers-reduced-motion: reduce) {
  .type-loading-screen::before {animation: none; opacity: .6;}
}
.type-exhibition :is(a,button,summary) {color: inherit; text-decoration: none;}
.type-exhibition :is(a,button,summary):hover {text-decoration: underline; text-underline-offset: .3em;}
.type-exhibition :is(a,button,summary):focus-visible {outline: 2px solid currentColor; outline-offset: 3px;}
.type-frame {
  display: flex;
  align-items: baseline;
  gap: 1.2rem clamp(22px, 4vw, 70px);
  padding: 22px var(--te-edge);
  font: 400 12px/1.6 var(--sans);
  margin-bottom: clamp(94px, 29svh, 340px);
}
.type-frame h2 {font: inherit; font-weight: 600; white-space: nowrap;}
.type-frame h2 i {margin-left: .4em; font: 400 16px/1 'Coconat Exhibition', Georgia, serif; white-space: nowrap;}
.type-frame nav {display: flex; flex-wrap: wrap; gap: 2px clamp(18px, 2.5vw, 44px);}
.type-frame a {display: inline-flex; align-items: center; min-height: 36px;}
.type-frame p {max-width: 27em; margin: 0 0 0 auto; text-wrap: pretty;}
.type-exhibition .content {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'meta' 'type' 'block';
  gap: clamp(20px, 2.4vw, 37px);
  padding: 0 var(--te-edge);
  margin: 0 0 clamp(104px, 30svh, 340px);
}
.type-exhibition .content:last-of-type {margin-bottom: clamp(84px, 22svh, 270px);}
.type-exhibition .meta {
  grid-area: meta;
  display: flex;
  align-items: baseline;
  gap: .95em;
  margin: 0 0 clamp(14px, 4svh, 50px);
  font: 400 12px/1.5 var(--sans);
  letter-spacing: .045em;
}
.type-exhibition .meta::before {content: '—'; margin-right: -.55em;}
.type-exhibition .type {
  grid-area: type;
  min-width: 0;
  margin: 0;
  align-self: start;
  font: 400 clamp(32px, 4.75vw, 80px)/1.16 var(--te-display);
  letter-spacing: -.04em;
  line-break: strict;
  font-kerning: normal;
}
.type-exhibition .type__expand {
  display: inline-grid;
  grid-template-columns: min-content;
  vertical-align: top;
}
.type-exhibition .type__expand--inline {
  grid-template-columns: auto auto;
  align-items: start;
  gap: .08em;
}
.type-exhibition .type__expand--center {
  grid-template-columns: max-content auto max-content;
  gap: .14em;
  align-items: start;
}
.type-exhibition .type--open :is(.type__expand--inline,.type__expand--center) {gap: clamp(8px, 1.6vw, 26px);}
.type-exhibition .type__expand--full {display: block; width: 100%;}
.type-exhibition .type__expand--stack {
  grid-template-columns: max-content;
  justify-items: center;
  vertical-align: bottom;
}
.type-exhibition .type__expand--stack:has(.type__expand-img:first-child) {vertical-align: top;}
.type-exhibition .type--open .type__expand--stack {gap: .5rem; padding-bottom: 1rem;}
.type-exhibition .type--open .type__expand--stack:has(.type__expand-img:first-child) {padding: 1rem 0 0;}
.type-exhibition .type__expand--mini {padding: 0 .125em; vertical-align: middle;}
.type-exhibition .type__expand-img {
  display: block;
  position: relative;
  overflow: hidden;
  width: 0;
  aspect-ratio: 16 / 9;
  border-radius: 4rem;
}
.type-exhibition .type__expand-img-inner {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.type-exhibition .type__expand--reveal .type__expand-img-inner {width: var(--te-img); height: calc(var(--te-img) * .5625);}
.type-exhibition .type--open .type__expand--reveal .type__expand-img {width: var(--te-img);}
.type-exhibition .type__expand--full .type__expand-img {margin-left: auto;}
.type-exhibition .type--open .type__expand--full .type__expand-img {width: 100%;}
.type-exhibition .type__expand-img--small {aspect-ratio: 1;}
.type-exhibition .type__expand-img--tiny {aspect-ratio: 25 / 9;}
.type-exhibition .type--open .type__expand-img--small {width: 3.25em;}
.type-exhibition .type--open .type__expand-img--tiny {width: 2em;}
.type-exhibition .anim {display: inline-block; white-space: nowrap;}
.type-exhibition .type--open .skewed {transform: skewX(-20deg);}
.type-exhibition .type--open .rotated {transform: skewX(-5deg) rotate(-10deg);}
.type-exhibition .block {
  grid-area: block;
  width: min(100%, 400px);
  min-width: 0;
  font: 400 clamp(14px, 1vw, 16px)/1.8 var(--sans);
}
.type-exhibition-prose {text-wrap: pretty;}
.type-reading-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 1.4em;
  margin-top: 14px;
  font: 400 12px/1.6 var(--sans);
}
.type-reading-actions :is(a,button,summary) {min-height: 38px; display: inline-flex; align-items: center; gap: .4em;}
.type-reading-actions span[aria-hidden] {font-family: Arial, sans-serif;}
.type-poem summary {cursor: pointer; list-style: none;}
.type-poem summary::-webkit-details-marker {display: none;}
.type-poem summary::after {content: '＋';}
.type-poem[open] {flex-basis: 100%;}
.type-poem[open] summary::after {content: '−';}
.type-poem-sheet {padding: 18px 0; border-block: 1px solid var(--rule); font: 400 17px/1.9 var(--te-display);}
.type-poem-sheet h4 {margin: 0 0 .8em; font-size: inherit;}
.type-poem-sheet span {display: block;}
.type-poem-sheet span:nth-of-type(5), .type-poem-sheet span:nth-of-type(9), .type-poem-sheet span:nth-of-type(12) {margin-top: .65em;}
.type-poem-sheet p {margin-top: 1em; font: 12px/1.8 var(--sans);}

@media (min-width: 53em) {
  .type-exhibition .content--left, .type-exhibition .content--justify {
    grid-template-columns: minmax(0,1fr) 42%;
    grid-template-areas: 'meta meta' 'type type' '. block';
  }
  .type-exhibition .content--left {grid-template-rows: auto minmax(20vw, auto) auto;}
  .type-exhibition .content--center {
    text-align: center;
    justify-items: center;
    grid-template-rows: auto minmax(40vw, auto) auto;
  }
  .content--center .type-reading-actions {justify-content: center;}
  .type-exhibition .content--right {
    grid-template-columns: minmax(0,1fr) minmax(0,45%);
    column-gap: 10vw;
    grid-template-areas: 'block meta' 'block type';
    grid-template-rows: auto minmax(49vw, auto);
    text-align: right;
  }
  .content--right .meta, .content--right .type-reading-actions {justify-content: flex-end;}
  .type-exhibition .content--right .block {justify-self: end; margin-top: 40svh;}
  .type-exhibition .content--justify {max-width: 1200px; grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(35vw, auto) auto;}
  .type-exhibition .content--justify .block {text-align: right;}
  .content--justify .type-reading-actions {justify-content: flex-end;}
  .type-exhibition .content--line {grid-template-rows: auto minmax(30vw, auto) auto;}
}

@media (max-width: 52.99em) {
  .type-exhibition {--te-img: 38vw;}
  .type-frame {display: grid; grid-template-columns: 1fr auto; gap: 12px 18px; margin-bottom: 14svh;}
  .type-frame p {grid-column: 1 / -1; margin-left: 0;}
  .type-exhibition .type {font-size: clamp(31px, 5.35vw, 46px);}
  .type-exhibition .content {row-gap: 1.15rem; margin-bottom: 20svh;}
  .type-exhibition .content .block {margin-top: clamp(34px, 8svh, 80px);}
  .type-exhibition .content--center {text-align: center; justify-items: center;}
  .content--center .type-reading-actions {justify-content: center;}
  .type-exhibition .content--right {text-align: right; justify-items: end;}
  .content--right .type-reading-actions {justify-content: flex-end;}
  .type-exhibition .content--right .type {width: min(100%, 12em);}
  .type-exhibition .type__expand-img {border-radius: 2rem;}
}
@media (max-width: 550px) {
  .type-frame {grid-template-columns: minmax(0,1fr); gap: 3px;}
  .type-frame nav {gap: 1.5em;}
  .type-frame p {margin-top: 10px;}
  .type-exhibition .type {font-size: clamp(24px, 6.85vw, 38px); line-height: 1.24;}
  .type-exhibition .type--open .type__expand-img--small {width: 2.8em;}
  .type-exhibition .content--line .type {font-size: clamp(18px, 5.7vw, 32px);}
  .type-exhibition .content--right .type {width: min(100%, 10.5em);}
  .type-exhibition .type--open .type__expand--stack {gap: .2rem; padding-bottom: .5rem;}
  .type-exhibition .type--open .type__expand--stack:has(.type__expand-img:first-child) {padding-top: .5rem;}
}
