:root {
  color-scheme: dark;
  --ink: #f4f0e8;
  --ink-soft: rgba(244, 240, 232, .66);
  --ink-faint: rgba(244, 240, 232, .38);
  --museum: #071421;
  --museum-deep: #030b12;
  --museum-blue: #0d2638;
  --ivory: #f5f1e8;
  --paper: #e9e1d3;
  --charcoal: #172027;
  --brass: #b89455;
  --brass-light: #d8bd80;
  --line: rgba(216, 189, 128, .24);
  --shadow: 0 36px 90px rgba(0, 0, 0, .46);
  --ease-gallery: cubic-bezier(.22, .78, .23, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--museum);
}

body {
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

img,
a {
  -webkit-user-drag: none;
}

button,
input {
  font: inherit;
}

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

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  transform: translateY(-140%);
  border-radius: 100px;
  background: var(--ivory);
  color: var(--charcoal);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient,
.museum-grain {
  position: fixed;
  pointer-events: none;
}

.ambient {
  border-radius: 50%;
  filter: blur(120px);
  opacity: .34;
}

.ambient-one {
  top: -22vh;
  left: 36vw;
  width: 58vw;
  height: 46vh;
  background: rgba(43, 93, 126, .6);
}

.ambient-two {
  right: -15vw;
  bottom: -32vh;
  width: 48vw;
  height: 50vh;
  background: rgba(83, 67, 38, .34);
}

.museum-grain {
  z-index: 30;
  inset: 0;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.app-shell {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100vh;
  grid-template-rows: 112px minmax(0, 1fr) 54px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px) 0 0 / 12.5vw 100%,
    radial-gradient(circle at 64% 32%, rgba(31, 74, 101, .22), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,.015), transparent 42%),
    var(--museum);
}

.museum-header {
  position: relative;
  z-index: 60;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(340px, 1fr) auto minmax(340px, 1fr);
  gap: 32px;
  padding: 24px clamp(28px, 3.2vw, 64px) 16px;
}

.collection-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.arrow-pair {
  display: flex;
  gap: 8px;
}

.circle-button,
.close-button,
.back-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.circle-button {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
}

.circle-button svg {
  width: 20px;
}

.circle-button:hover,
.circle-button:focus-visible,
.close-button:hover,
.close-button:focus-visible {
  border-color: rgba(216, 189, 128, .66);
  background: rgba(216, 189, 128, .1);
  outline: none;
}

.circle-button:active {
  transform: scale(.94);
}

.category-trigger {
  min-width: 190px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.eyebrow {
  display: block;
  margin: 0 0 7px;
  color: var(--brass-light);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .22em;
  line-height: 1.2;
}

.category-trigger-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-trigger strong {
  max-width: 190px;
  overflow: hidden;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 21px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-trigger svg {
  width: 18px;
  transition: transform .25s ease;
}

.category-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 144px;
  height: 48px;
  object-fit: contain;
}

.brand-rule {
  width: 1px;
  height: 32px;
  background: var(--line);
}

.brand-title {
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 16px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.search-bubble {
  justify-self: end;
  display: flex;
  width: clamp(300px, 24vw, 430px);
  min-height: 58px;
  align-items: center;
  gap: 13px;
  padding: 0 18px 0 21px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 999px;
  background: rgba(249, 247, 242, .96);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  color: #17242c;
  transition: box-shadow .25s ease, transform .25s ease;
}

.search-bubble:focus-within {
  box-shadow: 0 16px 44px rgba(0,0,0,.28), 0 0 0 4px rgba(216,189,128,.16);
  transform: translateY(-1px);
}

.search-bubble svg {
  width: 22px;
  flex: none;
}

.search-bubble input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17242c;
  font-size: 15px;
}

.search-bubble input::placeholder {
  color: #6f787d;
}

.search-bubble kbd {
  padding: 4px 7px;
  border: 1px solid #d7d5cf;
  border-radius: 7px;
  background: #ebe8e1;
  color: #777d80;
  font: 11px/1.2 sans-serif;
  white-space: nowrap;
}

.museum-main {
  position: relative;
  min-height: 0;
}

.gallery-view {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(270px, 23vw) minmax(0, 1fr);
  align-items: center;
  padding: 0 clamp(28px, 3.2vw, 64px);
  transition: transform .72s var(--ease-gallery), opacity .55s ease, filter .55s ease;
  transform-origin: left center;
}

.detail-open .gallery-view {
  transform: translate3d(-34vw, 0, 0) scale(.88);
  opacity: .35;
  filter: saturate(.6);
  pointer-events: none;
}

.exhibition-copy {
  position: relative;
  z-index: 4;
  align-self: center;
  padding-bottom: 4vh;
}

.exhibition-copy h1 {
  margin: 0;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: clamp(38px, 4vw, 74px);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: 1.22;
}

.exhibition-copy h1 em {
  color: var(--brass-light);
  font-style: normal;
}

.exhibition-note {
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: clamp(13px, .92vw, 17px);
  line-height: 1.9;
}

.carousel-zone {
  position: relative;
  min-width: 0;
  height: 100%;
}

.carousel-viewport {
  position: absolute;
  inset: 0 0 56px;
  overflow: hidden;
  perspective: 1700px;
  perspective-origin: 52% 45%;
  cursor: grab;
  outline: none;
  overscroll-behavior-x: contain;
  touch-action: pan-y pinch-zoom;
}

.carousel-track {
  position: absolute;
  top: 48%;
  left: 52%;
  width: 0;
  height: 0;
  transform: translate3d(var(--drag-x, 0px), 0, 0);
  transform-style: preserve-3d;
  transition: transform .72s var(--ease-gallery);
  will-change: transform;
}

.carousel-viewport.is-dragging {
  cursor: grabbing;
}

.carousel-viewport.is-dragging .carousel-track,
.carousel-viewport.is-dragging .exhibit-card {
  transition: none;
}

.carousel-viewport.is-dragging .exhibit-card {
  cursor: grabbing;
}

.carousel-viewport.is-settling .exhibit-card {
  pointer-events: none;
}

.carousel-floor {
  position: absolute;
  right: 3%;
  bottom: 2.8%;
  left: 2%;
  height: 24%;
  transform: rotateX(68deg);
  transform-origin: bottom;
  border-top: 1px solid rgba(216,189,128,.13);
  background: radial-gradient(ellipse at center, rgba(0,0,0,.35), transparent 68%);
  opacity: .75;
}

.exhibit-card {
  --card-w: clamp(260px, 19vw, 362px);
  --card-h: clamp(430px, 65vh, 690px);
  position: absolute;
  z-index: var(--z, 1);
  top: calc(var(--card-h) / -2);
  left: calc(var(--card-w) / -2);
  width: var(--card-w);
  height: var(--card-h);
  padding: 0;
  transform: var(--transform);
  transform-style: preserve-3d;
  border: 0;
  background: transparent;
  opacity: var(--opacity, 1);
  filter: brightness(var(--brightness, 1)) saturate(var(--saturation, 1));
  cursor: pointer;
  transition: transform .72s var(--ease-gallery), opacity .6s ease, filter .6s ease;
  will-change: transform;
}

.exhibit-card[data-position="-3"] {
  --transform: translate3d(-780px, 24px, -560px) rotateY(48deg) scale(.77);
  --opacity: .08;
  --brightness: .52;
  --saturation: .55;
  --z: 1;
}

.exhibit-card[data-position="-2"] {
  --transform: translate3d(-565px, 18px, -390px) rotateY(41deg) scale(.82);
  --opacity: .24;
  --brightness: .62;
  --saturation: .66;
  --z: 2;
}

.exhibit-card[data-position="-1"] {
  --transform: translate3d(-330px, 9px, -205px) rotateY(31deg) scale(.9);
  --opacity: .66;
  --brightness: .76;
  --saturation: .8;
  --z: 4;
}

.exhibit-card[data-position="0"] {
  --transform: translate3d(0, -6px, 50px) rotateY(0deg) scale(1);
  --opacity: 1;
  --brightness: 1;
  --saturation: 1;
  --z: 8;
}

.exhibit-card[data-position="1"] {
  --transform: translate3d(330px, 9px, -205px) rotateY(-31deg) scale(.9);
  --opacity: .66;
  --brightness: .76;
  --saturation: .8;
  --z: 4;
}

.exhibit-card[data-position="2"] {
  --transform: translate3d(565px, 18px, -390px) rotateY(-41deg) scale(.82);
  --opacity: .24;
  --brightness: .62;
  --saturation: .66;
  --z: 2;
}

.exhibit-card[data-position="3"] {
  --transform: translate3d(780px, 24px, -560px) rotateY(-48deg) scale(.77);
  --opacity: .08;
  --brightness: .52;
  --saturation: .55;
  --z: 1;
}

.exhibit-card[data-position="-4"] {
  --transform: translate3d(-980px, 30px, -720px) rotateY(54deg) scale(.7);
  --opacity: 0;
  --brightness: .48;
  --saturation: .5;
  --z: 0;
}

.exhibit-card[data-position="4"] {
  --transform: translate3d(980px, 30px, -720px) rotateY(-54deg) scale(.7);
  --opacity: 0;
  --brightness: .48;
  --saturation: .5;
  --z: 0;
}

.frame-outer {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  padding: 9px;
  border: 1px solid #d6bd82;
  background: linear-gradient(135deg, #6f552e, #d2b16d 26%, #785d35 56%, #c7a463 82%, #604726);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.32);
}

.frame-outer::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(49,33,12,.6);
  content: "";
  pointer-events: none;
}

.frame-mat {
  position: relative;
  display: grid;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(18px, 1.35vw, 28px);
  background: var(--ivory);
  box-shadow: inset 0 0 20px rgba(92, 75, 49, .11);
  color: var(--charcoal);
}

.portrait-window {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(88, 71, 45, .22);
  background:
    linear-gradient(180deg, rgba(255,255,255,.46), transparent 24%),
    #d8d3c9;
  box-shadow: inset 0 0 32px rgba(39, 35, 28, .18);
}

.portrait-window::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(18,25,29,.08));
  content: "";
  pointer-events: none;
}

.portrait-window img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.portrait-window img.transparent-portrait {
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 14px rgba(12,17,20,.22));
}

.logo-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(184,148,85,.12), transparent 38%),
    linear-gradient(140deg, #17293a, #091725);
}

.logo-placeholder img {
  width: 72%;
  height: auto;
  max-height: 40%;
  object-fit: contain;
  opacity: .9;
}

.portrait-index {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(7,20,33,.62);
  color: var(--ivory);
  font-size: 10px;
  letter-spacing: .14em;
  backdrop-filter: blur(8px);
}

.plaque {
  padding: clamp(16px, 1.25vw, 24px) 4px 0;
  text-align: left;
}

.plaque small {
  display: block;
  margin-bottom: 7px;
  color: #8c7245;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}

.plaque h2 {
  margin: 0;
  overflow: hidden;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: clamp(24px, 1.85vw, 34px);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaque h2.has-qualifier {
  white-space: normal;
}

.name-primary,
.name-qualifier {
  display: block;
}

.plaque .name-primary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plaque .name-qualifier {
  margin-top: 5px;
  font-size: .5em;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.plaque p {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 9px 0 0;
  overflow: hidden;
  color: #58636a;
  font-size: clamp(11px, .74vw, 14px);
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.exhibit-card[data-position="0"] .frame-outer {
  box-shadow: 0 42px 110px rgba(0,0,0,.56), 0 0 48px rgba(216,189,128,.08), inset 0 0 0 1px rgba(255,255,255,.32);
}

.exhibit-card:focus-visible {
  outline: none;
}

.exhibit-card:focus-visible .frame-outer {
  box-shadow: 0 0 0 4px rgba(216,189,128,.5), var(--shadow);
}

.exhibit-card[data-position="0"]:hover {
  --transform: translate3d(0, -14px, 70px) rotateY(0deg) scale(1.015);
}

.carousel-meta {
  position: absolute;
  right: 3vw;
  bottom: 18px;
  left: 5%;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  align-items: center;
  gap: 20px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: .16em;
}

.carousel-meta strong {
  color: var(--brass-light);
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 24px;
  font-weight: 400;
}

.meta-line {
  height: 1px;
  background: var(--line);
}

.empty-state {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  gap: 20px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state span {
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 28px;
}

.empty-state button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  cursor: pointer;
}

.detail-panel {
  position: absolute;
  z-index: 40;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(62vw, 1080px);
  min-width: 660px;
  overflow: hidden;
  transform: translate3d(104%, 0, 0);
  border-left: 1px solid rgba(216,189,128,.25);
  background: rgba(245, 241, 232, .985);
  box-shadow: -34px 0 100px rgba(0,0,0,.36);
  color: var(--charcoal);
  transition: transform .72s var(--ease-gallery);
}

.detail-open .detail-panel {
  transform: translate3d(0, 0, 0);
}

.back-button {
  position: absolute;
  z-index: 4;
  top: 26px;
  left: 34px;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 16px 0 13px;
  border-color: rgba(23,32,39,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  color: var(--charcoal);
  backdrop-filter: blur(10px);
}

.back-button svg {
  width: 19px;
}

.back-button:hover,
.back-button:focus-visible {
  border-color: rgba(123,90,40,.5);
  background: #fff;
  outline: none;
}

.detail-scroll {
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(130,103,58,.34) transparent;
  scrollbar-width: thin;
}

.detail-hero {
  display: grid;
  min-height: 58vh;
  grid-template-columns: minmax(220px, .82fr) 1.18fr;
  align-items: end;
  gap: clamp(34px, 4vw, 74px);
  padding: 112px clamp(38px, 5vw, 86px) 64px;
  background:
    linear-gradient(90deg, rgba(17,37,53,.05) 1px, transparent 1px) 0 0 / 25% 100%,
    linear-gradient(180deg, #ece7dc, #f7f4ed);
}

.detail-portrait {
  position: relative;
  display: grid;
  min-height: 380px;
  padding: 8px;
  background: linear-gradient(135deg, #6c512d, #d2b572 34%, #72572f 62%, #c9a663);
  box-shadow: 0 28px 60px rgba(47,37,22,.22);
}

.detail-portrait .portrait-window {
  min-height: 0;
  border: 18px solid #f6f0e4;
}

.detail-portrait .logo-placeholder img {
  width: min(68%, 230px);
  max-height: 62%;
}

.detail-identity {
  padding-bottom: 12px;
}

.detail-identity .eyebrow {
  color: #927039;
}

.detail-identity h2 {
  margin: 0;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: clamp(48px, 5vw, 84px);
  font-weight: 500;
  letter-spacing: -.07em;
  line-height: 1.05;
}

.detail-identity h2.has-qualifier {
  letter-spacing: -.055em;
}

.detail-identity .name-qualifier {
  margin-top: 10px;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.detail-role {
  max-width: 33ch;
  margin: 20px 0 0;
  color: #4f5b62;
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.6;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.detail-facts span {
  padding: 8px 12px;
  border: 1px solid rgba(87,69,41,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.48);
  color: #6f5a39;
  font-size: 12px;
}

.detail-section {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 30px;
  padding: 68px clamp(38px, 5vw, 86px);
  border-top: 1px solid rgba(66,55,37,.13);
}

.detail-section[hidden] {
  display: none;
}

.section-number {
  margin: 7px 0 0;
  color: #a48754;
  font: 12px/1.2 "Times New Roman", serif;
  letter-spacing: .18em;
}

.detail-section h3 {
  margin: 0 0 24px;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.03em;
}

.lead-copy {
  max-width: 48ch;
  margin: 0;
  color: #2c3940;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: clamp(19px, 1.55vw, 27px);
  line-height: 1.85;
}

.story-copy {
  max-width: 64ch;
  color: #455159;
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-line;
}

.story-copy.is-collapsed {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 12;
}

.read-more-button {
  min-height: 44px;
  margin-top: 22px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #9b7a43;
  background: transparent;
  color: #765b2e;
  cursor: pointer;
}

.section-wide {
  min-width: 0;
}

.archive-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.archive-item {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(74,59,36,.14);
  background: #ded9cf;
  cursor: zoom-in;
}

.archive-item:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
  min-height: 360px;
}

.archive-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.archive-item span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(7,20,33,.76);
  color: #fff;
  font-size: 10px;
}

.missing-assets {
  margin: 18px 0 0;
  color: #8a6433;
  font-size: 12px;
}

.source-links {
  display: grid;
  gap: 8px;
}

.source-links a {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(74,59,36,.14);
  color: #334149;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.source-links a::after {
  content: "↗";
  color: #9b7a43;
}

.source-links a:hover,
.source-links a:focus-visible {
  border-color: rgba(155,122,67,.5);
  background: rgba(184,148,85,.07);
  outline: none;
}

.museum-footer {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(28px, 3.2vw, 64px);
  border-top: 1px solid rgba(216,189,128,.12);
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .12em;
}

.museum-footer p {
  margin: 0;
}

.footer-center {
  text-align: center;
}

.footer-credit {
  justify-self: end;
  font-size: 9px;
  letter-spacing: .08em;
  opacity: .72;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #7aa989;
  box-shadow: 0 0 10px rgba(122,169,137,.65);
}

.category-popover {
  position: fixed;
  z-index: 100;
  top: 96px;
  left: clamp(28px, 3.2vw, 64px);
  width: min(440px, calc(100vw - 56px));
  max-height: calc(100vh - 142px);
  padding: 28px;
  overflow: auto;
  border: 1px solid rgba(216,189,128,.3);
  background: rgba(9, 26, 40, .98);
  box-shadow: 0 30px 90px rgba(0,0,0,.52);
  backdrop-filter: blur(24px);
}

.category-popover[hidden] {
  display: none;
}

.popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.popover-head h2 {
  margin: 0;
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 28px;
  font-weight: 500;
}

.close-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-size: 25px;
}

.popover-search {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  margin: 26px 0 18px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.popover-search svg {
  width: 20px;
}

.popover-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.category-list {
  display: grid;
  gap: 4px;
}

.category-option {
  display: grid;
  min-height: 54px;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.category-option:hover,
.category-option:focus-visible,
.category-option.is-active {
  background: rgba(216,189,128,.09);
  outline: none;
}

.category-option .option-number {
  color: var(--brass-light);
  font: 11px/1 "Times New Roman", serif;
}

.category-option strong {
  font-family: "Noto Serif KR", "Batang", serif;
  font-size: 16px;
  font-weight: 500;
}

.category-option small {
  color: var(--ink-faint);
}

.loading-curtain {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 30px;
  background: var(--museum-deep);
  text-align: center;
  transition: opacity .7s ease, visibility .7s ease;
}

.loading-curtain.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.loading-mark img {
  width: 220px;
}

.loading-mark span {
  width: 180px;
  height: 1px;
  overflow: hidden;
  background: rgba(255,255,255,.12);
}

.loading-mark span::after {
  display: block;
  width: 48%;
  height: 1px;
  background: var(--brass-light);
  animation: loading-line 1.4s ease-in-out infinite;
  content: "";
}

.loading-curtain p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Noto Serif KR", "Batang", serif;
  letter-spacing: .12em;
}

@keyframes loading-line {
  from { transform: translateX(-110%); }
  to { transform: translateX(320%); }
}

.toast {
  position: fixed;
  z-index: 200;
  bottom: 74px;
  left: 50%;
  max-width: min(520px, calc(100vw - 40px));
  padding: 12px 18px;
  transform: translate(-50%, 18px);
  border: 1px solid rgba(216,189,128,.25);
  border-radius: 999px;
  background: rgba(5,15,24,.92);
  color: var(--ivory);
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.image-lightbox {
  width: min(92vw, 1280px);
  height: min(90vh, 900px);
  padding: 58px 24px 24px;
  overflow: hidden;
  border: 1px solid rgba(216,189,128,.38);
  background: rgba(4,12,19,.97);
  box-shadow: 0 40px 140px rgba(0,0,0,.7);
}

.image-lightbox::backdrop {
  background: rgba(2,8,13,.82);
  backdrop-filter: blur(12px);
}

.image-lightbox img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--ivory);
  cursor: pointer;
}

@media (max-width: 1280px) {
  .museum-header {
    grid-template-columns: minmax(300px, 1fr) auto minmax(300px, 1fr);
  }

  .brand-title,
  .brand-rule {
    display: none;
  }

  .gallery-view {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .exhibit-card[data-position="-2"] { --transform: translate3d(-470px, 18px, -390px) rotateY(41deg) scale(.82); }
  .exhibit-card[data-position="-1"] { --transform: translate3d(-280px, 9px, -205px) rotateY(31deg) scale(.9); }
  .exhibit-card[data-position="1"] { --transform: translate3d(280px, 9px, -205px) rotateY(-31deg) scale(.9); }
  .exhibit-card[data-position="2"] { --transform: translate3d(470px, 18px, -390px) rotateY(-41deg) scale(.82); }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
    grid-template-rows: auto minmax(720px, 1fr) 54px;
  }

  .museum-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand controls"
      "search search";
    gap: 16px;
    padding-top: 18px;
  }

  .collection-controls {
    grid-area: controls;
    justify-self: end;
  }

  .category-trigger .eyebrow,
  .arrow-pair {
    display: none;
  }

  .category-trigger {
    min-width: auto;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
  }

  .category-trigger strong {
    font-family: inherit;
    font-size: 14px;
  }

  .brand {
    grid-area: brand;
  }

  .search-bubble {
    grid-area: search;
    justify-self: stretch;
    width: 100%;
  }

  .search-bubble kbd {
    display: none;
  }

  .museum-main {
    min-height: 720px;
  }

  .gallery-view {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    padding-top: 28px;
  }

  .exhibition-copy {
    text-align: center;
  }

  .exhibition-copy h1 {
    font-size: clamp(33px, 8vw, 48px);
  }

  .exhibition-note {
    display: none;
  }

  .carousel-track {
    left: 50%;
  }

  .exhibit-card {
    --card-w: min(68vw, 330px);
    --card-h: min(54vh, 540px);
  }

  .exhibit-card[data-position="-2"],
  .exhibit-card[data-position="2"],
  .exhibit-card[data-position="-3"],
  .exhibit-card[data-position="3"] {
    --opacity: 0;
    pointer-events: none;
  }

  .exhibit-card[data-position="-1"] { --transform: translate3d(-55vw, 10px, -230px) rotateY(32deg) scale(.86); }
  .exhibit-card[data-position="1"] { --transform: translate3d(55vw, 10px, -230px) rotateY(-32deg) scale(.86); }

  .detail-open .gallery-view {
    transform: translate3d(-100%,0,0);
    opacity: 0;
  }

  .detail-panel {
    position: fixed;
    z-index: 80;
    width: 100%;
    min-width: 0;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 96px;
    text-align: center;
  }

  .detail-portrait {
    width: min(340px, 82vw);
    min-height: 380px;
    margin: 0 auto;
  }

  .detail-role {
    margin-right: auto;
    margin-left: auto;
  }

  .detail-facts {
    justify-content: center;
  }

  .category-popover {
    top: 82px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    grid-template-rows: auto minmax(650px, 1fr) 48px;
  }

  .museum-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand img {
    width: 116px;
    height: 40px;
  }

  .category-trigger {
    max-width: 180px;
  }

  .gallery-view {
    padding-right: 16px;
    padding-left: 16px;
  }

  .exhibit-card {
    --card-w: min(76vw, 310px);
    --card-h: min(52vh, 500px);
  }

  .carousel-meta {
    right: 6px;
    left: 6px;
  }

  .museum-footer {
    padding: 0 16px;
  }

  .footer-center {
    display: none;
  }

  .museum-footer {
    grid-template-columns: 1fr auto;
  }

  .detail-section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 48px 24px;
  }

  .section-number {
    margin: 0;
  }

  .detail-hero {
    padding-right: 24px;
    padding-left: 24px;
  }

  .detail-identity h2 {
    font-size: 48px;
  }

  .archive-gallery {
    grid-template-columns: 1fr;
  }

  .archive-item:first-child:nth-last-child(odd) {
    grid-column: auto;
    min-height: 250px;
  }

  .category-popover {
    right: 16px;
    left: 16px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
