:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.55;
  color: #f3f2e9;
  background: #131211;
  --muted: #c4beb3;
  --rule: #37312a;
  --focus: #e4d0a6;
  --lamp: #f6ead0;
}

* { box-sizing: border-box; }
body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100vh;
  height: 100dvh;
  margin: 0;
}
.site-content {
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.site-content > .shell {
  flex: none;
  margin-block: auto;
  padding-block: .5rem clamp(.5rem, 9dvh - 3.5rem, 2.8rem);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { color: #282117; background: #e9d9bb; }
img { display: block; }
h1, h2, p { margin: 0; }
.shell { width: min(68rem, calc(100% - 5rem)); margin-inline: auto; }
[id] { scroll-margin-top: 1.25rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 3;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  color: #282117;
  background: var(--focus);
  transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus { transform: none; }

.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .95rem;
  min-height: 4.5rem;
}
.site-header {
  border-bottom: 1px solid var(--rule);
}
.site-header .language-switch:not([hidden]) {
  --language-border: rgb(148 163 184 / 36%);
  --language-hover: #94a3b8;
  --language-active-text: #fff;
  --language-active-fill: transparent;
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  height: 36px;
  padding: 2px;
  border-radius: 999px;
  color: var(--language-hover);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1;
  transition: border-color .15s;
}
.site-header .language-switch:hover { border-color: var(--language-hover); }
.site-header .language-switch:focus-visible {
  outline: 2px solid var(--language-hover);
  outline-offset: 2px;
}
.site-header .language-switch::before {
  content: "";
  grid-area: 1 / 1;
  border-radius: inherit;
  background-color: rgb(4 6 9 / 82%);
  box-shadow:
    inset 0 1px 1px rgb(255 255 255 / 45%),
    inset 0 0 0 .5px rgb(255 255 255 / 36%),
    inset 0 -1px 2px rgb(0 0 0 / 24%),
    0 1px 3px rgb(0 0 0 / 28%);
  backdrop-filter: blur(4px) brightness(1.03);
  pointer-events: none;
  transition: transform .2s ease-out;
}
html[lang="ko"] .site-header .language-switch::before { transform: translateX(100%); }
.site-header .language-switch span {
  position: relative;
  grid-row: 1;
  min-inline-size: 0;
  min-block-size: 0;
  padding-inline: .58em;
  transition: color .15s;
}
.site-header .language-switch [lang="en"] { grid-column: 1; }
.site-header .language-switch [lang="ko"] { grid-column: 2; }
@media (max-width: 767px) {
  .site-header .language-switch:not([hidden]) {
    height: 28px;
    font-size: clamp(.72rem, 2.8vw, .86rem);
  }
  .site-header .language-switch::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block: calc((100% - 44px) / 2);
  }
}
@media (max-width: 360px) {
  .site-header .language-switch:not([hidden]) { font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header .language-switch::before { transition: none; }
}
.site-brand {
  display: flex;
  gap: .6rem;
  align-items: center;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.site-brand img { border-radius: .55rem; }
.site-footer a {
  color: var(--muted);
  font-size: .91rem;
  font-weight: 600;
  text-decoration: none;
}
.site-footer a:hover {
  color: #f3f2e9;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.site-footer a [aria-hidden="true"] { margin-left: .24em; }

.spotlight {
  --platform-line-height: 1rem;
  --exhibit-icon: clamp(6.65rem, min(13vw, 16dvh), 10rem);
  --exhibit-height: calc(var(--exhibit-icon) + clamp(3.65rem, 8.3dvh, 7.25rem));
  --exhibit-floor: calc(clamp(1.35rem, 3.3dvh, 2.05rem) - var(--platform-line-height));
  --light-rise: clamp(.875rem, 5.5dvh - 1.85rem, 1.7rem);
  color: var(--lamp);
  position: relative;
  isolation: isolate;
  scroll-margin-top: var(--light-rise);
  touch-action: pan-y pinch-zoom;
}
.spotlight[tabindex] { cursor: grab; }
.spotlight[data-dragging] { cursor: grabbing; user-select: none; }
.stage-light {
  --light-source-top: .85rem;
  position: absolute;
  z-index: -1;
  inset: calc(0px - var(--light-rise)) 0 auto;
  height: calc(var(--exhibit-height) + var(--light-rise) + 1rem);
  pointer-events: none;
}
.stage-light::before {
  content: "";
  position: absolute;
  inset: var(--light-source-top) 0 0;
  background: conic-gradient(from 132deg at 50% 0,
    transparent 0deg,
    rgb(230 211 181 / .06) 10deg,
    rgb(245 231 207 / .25) 28deg,
    rgb(255 244 223 / .46) 48deg,
    rgb(245 231 207 / .25) 68deg,
    rgb(230 211 181 / .06) 86deg,
    transparent 96deg);
  mask-image: linear-gradient(#000, #000b 26%, #0006 61%, transparent 100%);
}
.stage-light span {
  position: absolute;
  top: var(--light-source-top);
  left: 50%;
  width: clamp(1.35rem, 3.6vw, 2.25rem);
  height: .11rem;
  border-radius: 50%;
  background: #fff3dc;
  transform: translate(-50%, -50%);
  box-shadow: 0 .15rem .5rem rgb(255 235 197 / .64), 0 .35rem 1.2rem rgb(241 216 177 / .32);
}

.spotlight-panels {
  display: grid;
  overflow: clip;
}
.spotlight-panel {
  grid-area: 1 / 1;
  min-width: 0;
  color: #f3f2e9;
  text-align: center;
}
.spotlight-panel[aria-hidden="true"] { visibility: hidden; pointer-events: none; }
.spotlight-panel[data-departing] { visibility: visible; }
.exhibit {
  position: relative;
  display: grid;
  align-items: end;
  justify-items: center;
  height: calc(var(--exhibit-height) - var(--platform-line-height));
  padding-bottom: var(--exhibit-floor);
}
.exhibit::before {
  content: "";
  position: absolute;
  left: 50%;
  /* Each icon has a transparent inset equal to 1/16 of its canvas. */
  bottom: calc(var(--exhibit-floor) + var(--exhibit-icon) / 16);
  width: calc(var(--exhibit-icon) * 1.42);
  height: calc(var(--exhibit-icon) * .24);
  transform: translate(-50%, 68%);
  background:
    radial-gradient(ellipse 37% 31% at 50% 37%, #090705d9, #0907058c 40%, transparent 100%),
    radial-gradient(ellipse 50% 47% at 50% 54%, #09070599, #09070542 55%, transparent 100%);
  pointer-events: none;
}
.exhibit img {
  position: relative;
  width: var(--exhibit-icon);
  height: var(--exhibit-icon);
  object-fit: contain;
  filter: drop-shadow(0 .43rem .64rem rgb(8 6 4 / .36));
}
.spotlight-copy { padding: .35rem 1rem clamp(.65rem, 1.9dvh, 1.55rem); }
.spotlight-copy h2 {
  font-size: clamp(2rem, min(5vw, 6dvh), 4.3rem);
  font-weight: 730;
  letter-spacing: -.038em;
  line-height: 1.07;
  text-wrap: balance;
}
.spotlight-platform {
  margin-top: .15rem;
  color: #b8a78d;
  font-size: .75rem;
  font-weight: 620;
  line-height: var(--platform-line-height);
}
.spotlight-description {
  max-width: 38rem;
  margin: .45rem auto 0;
  color: var(--muted);
  font-size: clamp(.91rem, 1.65vw, 1.09rem);
  text-wrap: balance;
  word-break: keep-all;
}
.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-top: .75rem;
}
.spotlight-action {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .3rem .8rem;
  border: 1px solid color-mix(in srgb, var(--lamp) 37%, transparent);
  border-radius: .5rem;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 680;
  text-decoration: none;
}
.spotlight-primary {
  border-color: transparent;
  color: #282117;
  background: var(--lamp);
}
.spotlight-primary:hover { background: #fff4df; }
.details-link { color: var(--lamp); }
.details-link:hover { background: color-mix(in srgb, var(--lamp) 11%, transparent); }

.collection {
  display: grid;
  gap: clamp(.7rem, 6dvh - 1.875rem, 2rem);
  padding-top: clamp(.9rem, 8dvh - 2.625rem, 2.5rem);
}
.shelf {
  --icon-size: clamp(3rem, min(6.3vw, 7.8dvh), 4.35rem);
  --wood-face: clamp(.52rem, .95vw, .72rem);
  --wood-top: clamp(.95rem, 2.4vw, 1.38rem);
  --wood-chamfer: calc(var(--wood-top) * .82);
  --wood-grain: url("shelf-walnut.webp");
  --grain-top: 32%;
  --grain-front: 46%;
  --ledge-top: calc(var(--icon-size) + .22rem);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0 clamp(.12rem, 2vw, 1.35rem);
  list-style: none;
}
.shelf:nth-child(even) {
  --grain-top: 68%;
  --grain-front: 82%;
}
.shelf::before, .shelf::after {
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  content: "";
  pointer-events: none;
}
.shelf::before {
  top: calc(var(--ledge-top) - var(--wood-top));
  height: var(--wood-top);
  clip-path: polygon(var(--wood-chamfer) 0, calc(100% - var(--wood-chamfer)) 0, 100% 100%, 0 100%);
  background:
    linear-gradient(to bottom, rgb(10 7 5 / .44), transparent 55%, rgb(198 151 109 / .14)),
    radial-gradient(ellipse at 50% 100%, rgb(221 187 146 / .09), transparent 75%),
    var(--wood-grain) center var(--grain-top) / 100% auto no-repeat #38291f;
}
.shelf::after {
  top: var(--ledge-top);
  height: var(--wood-face);
  border-radius: 0 0 .2rem .2rem;
  background:
    linear-gradient(to bottom, rgb(206 166 122 / .29), transparent 2px, rgb(11 8 6 / .62)),
    var(--wood-grain) center var(--grain-front) / 100% auto no-repeat #291e17;
  box-shadow: 0 .42rem .7rem rgb(7 5 4 / .64);
}
.shelf li { min-width: 0; }
.shelf-link {
  position: relative;
  display: grid;
  grid-template-rows: var(--icon-size) auto;
  justify-items: center;
  gap: calc(var(--wood-face) + .58rem);
  margin-inline: .4rem;
  padding-inline: .18rem;
  border-radius: .35rem;
  text-align: center;
  text-decoration: none;
}
.shelf-link::before {
  position: absolute;
  top: calc(var(--icon-size) - .18rem);
  width: calc(var(--icon-size) * .78);
  height: .42rem;
  border-radius: 50%;
  background: rgb(8 5 4 / .65);
  filter: blur(2px);
  content: "";
  pointer-events: none;
}
.shelf-link img {
  position: relative;
  width: var(--icon-size);
  height: var(--icon-size);
  object-fit: contain;
  filter: drop-shadow(0 .22rem .28rem #140c08a8);
}
.shelf-link span {
  align-self: start;
  font-size: clamp(.81rem, 2.5vw, .99rem);
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.shelf-link:hover span { color: var(--lamp); }
.shelf-link[aria-current="true"] span {
  color: var(--lamp);
  text-decoration: underline;
  text-underline-offset: .28em;
}

.site-footer {
  min-height: 4.7rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .88rem;
}

@media (max-width: 740px) {
  .shell { width: calc(100% - 3rem); }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 1.75rem); }
  .site-header, .site-footer { min-height: 3.7rem; }
  .site-brand { gap: .42rem; font-size: .92rem; }
  .site-brand img { width: 1.7rem; height: 1.7rem; }
  .spotlight-copy { padding-inline: .85rem; }
  .shelf { padding-inline: .3rem; }
  .shelf-link {
    margin-inline: .16rem;
    padding-inline: 0;
  }
}

/* The embedding page sizes the frame to this content, so scale from its width. */
.catalog-embed { display: block; height: auto; }
.catalog-embed .site-content { display: block; overflow: visible; }
.catalog-embed .site-content > .shell { margin-block: 0; padding-block: 1.75rem 1.5rem; }
.catalog-embed .spotlight {
  --exhibit-icon: clamp(6rem, 16vw, 9rem);
  --exhibit-height: calc(var(--exhibit-icon) + clamp(2.75rem, 7vw, 4.75rem));
  --exhibit-floor: .55rem;
  --light-rise: 1.5rem;
}
.catalog-embed .spotlight-copy { padding-bottom: .65rem; }
.catalog-embed .spotlight-copy h2 { font-size: clamp(2rem, 5.5vw, 3.65rem); }
.catalog-embed .collection { gap: clamp(.7rem, 3vw, 1.65rem); padding-top: clamp(1rem, 3.85vw, 2rem); }
.catalog-embed .shelf { --icon-size: clamp(2.65rem, 7vw, 4.35rem); }
@media (max-width: 320px) {
  .catalog-embed .site-content > .shell { width: calc(100% - 1rem); }
  .catalog-embed .shelf-link { margin-inline: .1rem; }
  .catalog-embed .shelf-link span { font-size: .75rem; }
}
