.gallery-exhibition {
  padding-block: clamp(46px, 7vw, 104px) clamp(24px, 4vw, 58px);
}

.gallery-exhibition-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 45px;
  padding-block-end: clamp(26px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}

.gallery-exhibition-heading h2 {
  max-width: 24ch;
  color: var(--brand-ink);
  font-size: clamp(29px, 4vw, 53px);
  line-height: 1.22;
  text-wrap: balance;
  word-break: keep-all;
}

.gallery-exhibition-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 13px;
  margin: 0 0 13px;
  color: var(--green-ink);
  font-size: 14px;
  font-weight: 600;
}

.gallery-exhibition-meta span {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 13px;
  color: var(--muted);
  font-weight: 400;
}

.gallery-exhibition-description,
.gallery-works-heading p {
  color: var(--muted);
  line-height: 1.75;
  word-break: keep-all;
}

.gallery-exhibition-description {
  max-width: 48em;
  margin: 14px 0 0;
}

.gallery-exhibition-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.gallery-works {
  margin-block: clamp(24px, 4vw, 48px) 0;
}

.news-article-body > .gallery-works {
  margin-block-end: clamp(25px, 4vw, 48px);
}

.gallery-works-heading {
  margin-block-end: clamp(17px, 3vw, 31px);
}

.gallery-works-heading h2 {
  margin: 0;
  color: var(--brand-ink);
}

.gallery-works-heading p {
  margin: 7px 0 0;
  font-size: 15px;
}

.gallery-work-list {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: clamp(22px, 3vw, 38px) clamp(14px, 2vw, 26px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.gallery-work-list > li {
  flex: var(--work-ratio, 1) 1 calc(235px * var(--work-ratio, 1));
  min-width: 0;
}

.gallery-work {
  background: transparent;
}

.gallery-work-frame {
  display: block;
  width: 100%;
}

.gallery-work-frame img, body[data-page="gallery"] .room-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
}

.gallery-work-caption {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 7px;
  padding: 9px 0 0;
  min-height: 4.5em;
  color: var(--brand-ink);
  font-size: 14px;
  line-height: 1.5;
  word-break: keep-all;
}

.gallery-work-enlarge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  font-size: 17px;
  line-height: 1;
}

.gallery-work:hover .gallery-work-caption > :first-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}



.refinement .gallery-jump-nav {
  margin-top: 0;
  padding-block: 0 clamp(8px, 2vw, 22px);
  border-bottom: 1px solid var(--line);
}

.refinement .gallery-exhibition,
.refinement .gallery-past,
.refinement .gallery-cultural-records,
.refinement .gallery-bhutan {
  padding-block: clamp(32px, 4.5vw, 65px);
}

.gallery-past,
.gallery-cultural-records,
.gallery-bhutan { border-top: 1px solid var(--line); }

.gallery-past-heading,
.gallery-bhutan-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.gallery-past-heading h2,
.gallery-bhutan-heading h2 {
  margin: 0;
  color: var(--brand-ink);
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.4;
}

.past-exhibition-photos,
.gallery-bhutan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(21px, 3vw, 36px) clamp(14px, 2vw, 26px);
}

.past-exhibition-photos figure,
.gallery-bhutan-grid figure {
  min-width: 0;
  margin: 0;
}

.gallery-past-photo,
.gallery-bhutan-photo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-past-photo img,
.gallery-bhutan-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.past-exhibition-photos figcaption,
.gallery-bhutan-grid figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-align: start;
  word-break: keep-all;
}

.gallery-past-notes,
.gallery-cooperation-record {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 26px;
}

.gallery-past-notes h3,
.gallery-event-grid h3,
.gallery-cooperation-record h3 {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.45;
  color: var(--brand-ink);
}

.gallery-past-notes p,
.gallery-event-grid p,
.gallery-cooperation-record p,
.gallery-bhutan-heading p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
  word-break: keep-all;
}

.gallery-past-notes p,
.gallery-event-date { font-size: 14px; }

.gallery-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 38px);
}

.gallery-event-grid article { min-width: 0; }
.gallery-event-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery-event-image img { width: 100%; height: 100%; object-fit: cover; }
.gallery-event-grid .gallery-event-date { margin-block: 14px 6px; }
.gallery-event-grid .room-link { margin-top: 9px; }
.gallery-cooperation-record { padding-top: 24px; border-top: 1px solid var(--line); }
.gallery-cooperation-record .gallery-event-date { margin-block: 0 5px; }
.gallery-bhutan-heading > div { max-width: 48em; }
.gallery-bhutan-heading p { max-width: 45em; }
.gallery-bhutan-photo:focus-visible { outline-offset: 4px; }

.refinement .gallery-visit-information { padding-top: 0; }
.gallery-visit-information .information-panel dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.gallery-visit-information .information-panel h2 { margin-bottom: 16px; }

@media (max-width: 720px) {
  .gallery-work-list > li { flex-basis: calc(145px * var(--work-ratio, 1)); }
  .gallery-work-list { gap: 22px 12px; }
  .gallery-work-caption { min-height: 4.5em; }
  .past-exhibition-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .past-exhibition-photos figure:first-child { grid-column: 1 / -1; }
  .gallery-bhutan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .gallery-exhibition-heading { align-items: start; }
  .gallery-exhibition-heading h2 { max-width: none; font-size: clamp(26px, 6.5vw, 40px); }
}

@media (max-width: 520px) {
  .gallery-event-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .gallery-visit-information .information-panel dl { grid-template-columns: minmax(0, 1fr); }
  .gallery-bhutan-heading,
  .gallery-past-heading { display: block; }
  .gallery-bhutan-heading > .room-link,
  .gallery-past-heading > .room-link { margin-top: 8px; }
}

:is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport {
  --past-photo-width: clamp(260px, 34vw, 440px);
  --past-photo-gap: clamp(14px, 2vw, 26px);
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-x pan-y;
}
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport::-webkit-scrollbar { display: none; }
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport[data-dragging] { cursor: grabbing; user-select: none; }
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 5px; }
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-track { position: relative; display: flex; width: max-content; }
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-photos {
  display: flex;
  flex: none;
  gap: var(--past-photo-gap);
  padding-inline-end: var(--past-photo-gap);
}
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-photos figure { flex: none; width: var(--past-photo-width); }
:is(.gallery-past, .deokun-photo-reel) .gallery-past-photo { aspect-ratio: 3 / 2; }
:is(.gallery-past, .deokun-photo-reel) .past-exhibition-photos figcaption { min-height: 3.2em; }
.deokun-reel-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin: 0 0 1rem;
  color: var(--brand-ink);
}
.deokun-reel-count {
  margin: 0 auto 0 0;
  color: var(--muted);
  font: 400 .9375rem/1.5 var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.deokun-reel-tools label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .65rem;
  max-width: 100%;
  font: 400 .9375rem/1.5 var(--font-sans);
}
#deokun-photo-filter {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  appearance: none;
  padding: .5rem 2.25rem .5rem .8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--green-ink);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2343564d' stroke-width='1.5' d='m3 6 5 5 5-5'/%3E%3C/svg%3E") right .7rem center / .85rem no-repeat;
  font: inherit;
  cursor: pointer;
}
#deokun-photo-filter:focus-visible {
  outline: 2px solid var(--green-ink);
  outline-offset: 3px;
}
.deokun-photo-reel .past-exhibition-photos figcaption {
  color: var(--brand-ink);
  font-size: 1rem;
}
.deokun-reel-meta {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .875rem;
}

.gallery-past-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}
.gallery-past-controls button {
  min-height: 44px;
  padding: 4px 0;
  color: var(--green-ink);
  background: transparent;
  border: 0;
  font: 14px / 1.5 var(--font-sans);
  cursor: pointer;
}
.gallery-past-controls [role="group"] { display: flex; gap: 20px; }
.gallery-past-controls [data-gallery-past-step] { min-width: 44px; font-size: 22px; }
.gallery-past-controls button:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 620px) {
  :is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport { --past-photo-width: 80vw; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.gallery-past, .deokun-photo-reel) .past-exhibition-viewport { scroll-behavior: auto; }
  :is(.gallery-past, .deokun-photo-reel) .past-exhibition-photos[data-gallery-past-copy],
  :is(.gallery-past, .deokun-photo-reel) .gallery-flow-control { display: none; }
}

.room-photo .photo-credit { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.room-photo .photo-credit a { text-decoration: underline; text-underline-offset: 3px; }
.gallery-bhutan-location {
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(32px, 5vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.gallery-bhutan-location figure { margin: 0; }
.gallery-bhutan-location-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; }
.gallery-bhutan-location-photo img { display: block; width: 100%; height: auto; }
.gallery-bhutan-location h3 { margin: 0 0 14px; font: 400 clamp(23px, 2.5vw, 32px) / 1.5 var(--font-serif); color: var(--brand-ink); }
.gallery-bhutan-location p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.9; }
.gallery-bhutan-location figcaption { text-align: start; }
@media (max-width: 620px) {
  .gallery-bhutan-location { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .gallery-bhutan-location figure { max-width: 240px; }
}
