body.gallery-page {
  --gallery-ink: #20201e;
  --gallery-ink-soft: #5e5c56;
  --gallery-paper: #eee9de;
  --gallery-paper-light: #fbf8f0;
  --gallery-paper-deep: #e2dccf;
  --gallery-line: #b8b0a2;
  --gallery-blue: #2853a6;
  --gallery-blue-dark: #183d7d;
  --gallery-blue-wash: #dfe8f7;
  --gallery-white: #fffef9;
  --gallery-shadow: 0 15px 34px rgba(42, 39, 32, 0.09);
  --gallery-content: min(1440px, calc(100vw - 48px));
  margin: 0;
  color: var(--gallery-ink);
  background:
    linear-gradient(rgba(32, 32, 30, 0.022) 1px, transparent 1px),
    var(--gallery-paper);
  background-size: 100% 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.gallery-page *,
body.gallery-page *::before,
body.gallery-page *::after {
  box-sizing: border-box;
}

body.gallery-page a {
  color: inherit;
}

body.gallery-page button {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 14px;
  padding: 10px 14px;
  border: 2px solid var(--gallery-ink);
  color: var(--gallery-ink);
  background: var(--gallery-white);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  transform: translateY(-180%);
}

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

body.gallery-page :focus-visible {
  outline: 3px solid var(--gallery-blue);
  outline-offset: 3px;
}

.site-bar {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--gallery-ink);
  background: rgba(238, 233, 222, 0.96);
  backdrop-filter: blur(14px);
}

.bar-inner {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  gap: 24px;
  align-items: center;
  width: var(--gallery-content);
  min-height: 76px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  width: max-content;
  min-height: 44px;
  color: var(--gallery-ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.back-link::before {
  content: "\2190";
  color: var(--gallery-blue);
  font-size: 1.15rem;
  line-height: 1;
}

.back-link:hover {
  color: var(--gallery-blue-dark);
}

.brand-block {
  display: grid;
  justify-items: center;
  text-align: center;
  text-decoration: none;
}

.brand-eyebrow {
  color: var(--gallery-blue);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}

.sidebar-toggle {
  display: none;
  gap: 7px;
  min-height: 42px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--gallery-ink);
  color: var(--gallery-blue-dark);
  background: var(--gallery-paper-light);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
}

.sidebar-toggle span {
  font-size: 1rem;
  line-height: 1;
}

.lang-switch {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--gallery-ink);
  background: var(--gallery-paper-light);
}

.lang-button {
  min-width: 46px;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  color: var(--gallery-ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.lang-button + .lang-button {
  border-left: 1px solid var(--gallery-ink);
}

.lang-button[aria-pressed="true"],
.lang-button[aria-current="true"] {
  color: var(--gallery-white);
  background: var(--gallery-blue-dark);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: clamp(30px, 4vw, 62px);
  align-items: start;
  width: var(--gallery-content);
  margin: 0 auto;
}

.archive-sidebar {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 118px);
  margin-top: clamp(54px, 8vw, 108px);
  overflow: auto;
  border-top: 1px solid var(--gallery-ink);
  border-bottom: 1px solid var(--gallery-ink);
  background: rgba(251, 248, 240, 0.72);
}

.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--gallery-line);
  color: var(--gallery-blue);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--gallery-ink);
  color: var(--gallery-ink);
  background: var(--gallery-paper-light);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.sidebar-nav {
  display: grid;
}

.sidebar-nav a {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 43px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(184, 176, 162, 0.65);
  color: var(--gallery-ink-soft);
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.is-active {
  color: var(--gallery-white);
  background: var(--gallery-blue-dark);
}

.sidebar-nav a.is-active {
  padding-left: 16px;
}

.sidebar-nav a.sidebar-sub {
  padding-left: 23px;
}

.sidebar-nav a.sidebar-sub.is-active {
  padding-left: 27px;
}

.sidebar-nav span {
  color: var(--gallery-blue);
  font: 900 0.58rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.07em;
}

.sidebar-nav a:hover span,
.sidebar-nav a.is-active span {
  color: #bdd2ff;
}

.sidebar-nav strong {
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 17px 12px;
  color: var(--gallery-ink-soft);
}

.sidebar-summary strong {
  color: var(--gallery-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.sidebar-summary span {
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.35;
}

.sidebar-backdrop {
  display: none;
}

.gallery-main {
  min-width: 0;
  width: 100%;
  padding: clamp(54px, 8vw, 108px) 0 88px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.42fr);
  gap: clamp(38px, 7vw, 112px);
  align-items: end;
  padding-bottom: clamp(38px, 5vw, 70px);
  border-bottom: 1px solid var(--gallery-ink);
  scroll-margin-top: 96px;
}

#gallery-heading,
.ledger-panel {
  scroll-margin-top: 104px;
}

.intro-heading {
  min-width: 0;
}

.intro-kicker {
  margin: 0 0 17px;
  color: var(--gallery-blue);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 950px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7.6vw, 7.2rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.intro-copy {
  max-width: 650px;
  margin: 27px 0 0;
  color: var(--gallery-ink-soft);
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
}

.page-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.page-jumps a,
.era-jumps a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border: 1px solid var(--gallery-ink);
  color: var(--gallery-blue-dark);
  background: var(--gallery-paper-light);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-decoration: none;
}

.page-jumps a:first-child,
.page-jumps a:hover,
.era-jumps a:hover {
  color: var(--gallery-white);
  background: var(--gallery-blue-dark);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--gallery-ink);
  border-left: 1px solid var(--gallery-ink);
  background: var(--gallery-paper-light);
}

.stat {
  min-height: 112px;
  padding: 20px;
  border-right: 1px solid var(--gallery-ink);
  border-bottom: 1px solid var(--gallery-ink);
}

.stat strong {
  display: block;
  color: var(--gallery-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 400;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 9px;
  color: var(--gallery-ink-soft);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.history-section {
  margin-top: clamp(54px, 8vw, 104px);
  scroll-margin-top: 100px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.7fr);
  gap: clamp(30px, 6vw, 92px);
  align-items: end;
}

.section-heading h2 {
  max-width: 850px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5vw, 5.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.section-heading > p {
  max-width: 64ch;
  margin: 0;
  color: var(--gallery-ink-soft);
}

.era-jumps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: clamp(34px, 5vw, 62px);
  border-top: 1px solid var(--gallery-ink);
  border-left: 1px solid var(--gallery-ink);
}

.era-jumps a {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--gallery-ink);
  border-bottom: 1px solid var(--gallery-ink);
  background: var(--gallery-paper-light);
}

.history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
}

.history-kind {
  display: inline-flex;
  width: max-content;
  min-height: 25px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.history-kind[data-kind="technology"] {
  color: #155a4b;
  background: #dceee8;
}

.history-kind[data-kind="movement"] {
  color: #744212;
  background: #f4e5cb;
}

.history-kind[data-kind="media"] {
  color: #6e2f51;
  background: #f0dce7;
}

.history-kind[data-kind="society"] {
  color: #2853a6;
  background: #dfe8f7;
}

.history-kind[data-kind="debate"] {
  color: #692a23;
  background: #f1ddd8;
}

.history-reading-note {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  margin: 24px 0 clamp(36px, 6vw, 72px);
  padding: 22px 24px;
  border: 1px solid var(--gallery-line);
  border-left: 6px solid var(--gallery-blue);
  background: var(--gallery-blue-wash);
}

.history-reading-note strong {
  color: var(--gallery-blue-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-reading-note p {
  max-width: 100ch;
  margin: 0;
  color: #34405a;
  font-size: 0.86rem;
}

.timeline-eras {
  border-top: 1px solid var(--gallery-ink);
}

.history-era {
  display: grid;
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 74px);
  padding: clamp(44px, 7vw, 86px) 0;
  border-bottom: 1px solid var(--gallery-ink);
  scroll-margin-top: 96px;
}

.era-heading {
  align-self: start;
}

.era-heading > p {
  margin: 0 0 14px;
  color: var(--gallery-blue);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.era-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.era-heading > span {
  display: block;
  max-width: 37ch;
  margin-top: 19px;
  color: var(--gallery-ink-soft);
  font-size: 0.82rem;
}

.history-list {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0 0 0 26px;
  border-left: 1px solid var(--gallery-line);
  list-style: none;
}

.history-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(82px, 0.18fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 38px);
  padding: 0 0 34px;
}

.history-entry + .history-entry {
  padding-top: 34px;
  border-top: 1px solid var(--gallery-line);
}

.history-entry::before {
  position: absolute;
  top: 8px;
  left: -32px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gallery-paper);
  border-radius: 50%;
  background: var(--gallery-blue);
  box-shadow: 0 0 0 1px var(--gallery-blue);
  content: "";
}

.history-entry + .history-entry::before {
  top: 42px;
}

.history-date {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.history-date > time {
  color: var(--gallery-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.04rem, 1.5vw, 1.3rem);
  font-weight: 700;
  line-height: 1.25;
}

.history-thumb {
  display: block;
  width: min(100%, 116px);
  color: var(--gallery-blue-dark);
  text-decoration: none;
}

.history-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid color-mix(in srgb, var(--gallery-blue-dark) 52%, var(--gallery-line));
  background: var(--gallery-paper-light);
  box-shadow: 0 5px 14px rgba(17, 30, 53, 0.12);
  filter: saturate(0.86) contrast(1.025);
  object-fit: cover;
  object-position: center;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.history-thumb[data-fit="contain"] img {
  padding: 7px;
  background: #fff;
  object-fit: contain;
}

.history-thumb-label {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 0.48rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  line-height: 1.25;
}

.history-thumb:hover img {
  box-shadow: 0 8px 18px rgba(17, 30, 53, 0.18);
  filter: saturate(1) contrast(1.04);
  transform: translateY(-2px);
}

.history-thumb:focus-visible {
  border-radius: 2px;
  outline: 3px solid var(--gallery-blue);
  outline-offset: 4px;
}

.history-entry h4 {
  margin: 10px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.history-entry p {
  max-width: 79ch;
  margin: 12px 0 0;
  color: var(--gallery-ink-soft);
  font-size: 0.9rem;
}

.history-entry .history-names {
  color: var(--gallery-ink);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.015em;
}

.history-names a {
  color: var(--gallery-blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

[data-history-source] {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--gallery-blue-dark);
  font-size: 0.7rem;
  font-weight: 900;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

[data-history-source]::after {
  content: "\2197";
  font-size: 0.88rem;
}

.korea-track {
  display: grid;
  grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 84px);
  margin-top: clamp(56px, 8vw, 100px);
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--gallery-ink);
  border-top: 10px solid var(--gallery-blue-dark);
  background: var(--gallery-paper-light);
  box-shadow: var(--gallery-shadow);
  scroll-margin-top: 96px;
}

.korea-track-heading h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.8vw, 3.8rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.korea-track-heading > p:last-child {
  margin: 22px 0 0;
  color: var(--gallery-ink-soft);
  font-size: 0.87rem;
}

.korea-dates {
  margin: 0;
  padding: 0;
  list-style: none;
}

.korea-dates li {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--gallery-line);
}

.korea-dates li:first-child {
  padding-top: 0;
}

.korea-dates time {
  color: var(--gallery-blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.korea-dates p {
  margin: 0;
  color: var(--gallery-ink-soft);
  font-size: 0.84rem;
}

.korea-sources {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 9px 18px;
  padding-top: 22px;
  border-top: 1px solid var(--gallery-ink);
}

.korea-sources a {
  color: var(--gallery-blue-dark);
  font-size: 0.72rem;
  font-weight: 850;
}

.gallery-heading {
  margin-top: clamp(72px, 10vw, 126px);
  scroll-margin-top: 96px;
}

.disclosure {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 26px 0 clamp(38px, 5vw, 68px);
  padding: 19px 22px;
  border: 1px solid var(--gallery-line);
  border-left: 5px solid var(--gallery-blue);
  background: var(--gallery-blue-wash);
  color: #24334e;
  font-size: 0.86rem;
}

.disclosure-mark {
  display: grid;
  min-width: 48px;
  min-height: 48px;
  padding: 6px;
  place-items: center;
  border: 1px solid currentColor;
  color: var(--gallery-blue-dark);
  background: rgba(255, 255, 255, 0.46);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

.disclosure > :first-child {
  margin-top: 0;
}

.disclosure > :last-child {
  margin-bottom: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 2.7vw, 38px);
  align-items: stretch;
}

.work-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gallery-ink);
  background: var(--gallery-paper-light);
  box-shadow: var(--gallery-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.work-card:hover {
  box-shadow: 0 19px 42px rgba(42, 39, 32, 0.13);
  transform: translateY(-3px);
}

.work-figure {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: clamp(15px, 2.2vw, 28px);
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--gallery-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 42%),
    #292a29;
}

.work-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: #1f201f;
}

.work-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: clamp(21px, 2.6vw, 30px);
}

.artist-label {
  margin: 0 0 7px;
  color: var(--gallery-blue);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.artist-name {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.artist-original {
  margin: 8px 0 0;
  color: var(--gallery-ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.45;
}

.work-title {
  margin: 18px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.4;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  margin: 7px 0 0;
  color: var(--gallery-ink-soft);
  font-size: 0.78rem;
  line-height: 1.55;
}

.work-meta > * + *::before {
  content: "·";
  margin-right: 8px;
  color: var(--gallery-line);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 19px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 9px;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  color: var(--gallery-ink-soft);
  background: var(--gallery-white);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-decoration: none;
}

.tag:first-child {
  border-color: #8da7d5;
  color: var(--gallery-blue-dark);
  background: var(--gallery-blue-wash);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 24px;
}

.source-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--gallery-ink);
  color: var(--gallery-white);
  background: var(--gallery-blue-dark);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.source-link::after {
  content: "\2197";
  font-size: 0.95rem;
  line-height: 1;
}

.source-link:hover {
  color: var(--gallery-blue-dark);
  background: var(--gallery-white);
}

.context-note,
.ledger-panel {
  margin-top: clamp(48px, 7vw, 88px);
  border: 1px solid var(--gallery-ink);
  background: var(--gallery-paper-light);
}

.context-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  max-width: 920px;
  padding: clamp(24px, 4vw, 42px);
  border-left: 8px solid var(--gallery-blue);
}

.context-note > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--gallery-blue);
  color: var(--gallery-blue-dark);
  font-weight: 900;
}

.context-note h2,
.ledger-panel h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.7vw, 2.35rem);
  font-weight: 500;
  line-height: 1.12;
}

.context-note p,
.ledger-panel p {
  max-width: 78ch;
  margin: 0;
  color: var(--gallery-ink-soft);
}

.ledger-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(25px, 4vw, 46px);
  background:
    linear-gradient(90deg, var(--gallery-blue) 0 9px, transparent 9px),
    var(--gallery-paper-light);
}

.ledger-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 11px 18px;
  border: 1px solid var(--gallery-ink);
  color: var(--gallery-white);
  background: var(--gallery-blue-dark);
  font-size: 0.76rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.ledger-link::after {
  content: "\2192";
  font-size: 1rem;
}

.ledger-link:hover {
  color: var(--gallery-blue-dark);
  background: var(--gallery-white);
}

.ledger-panel table {
  width: 100%;
  margin-top: 26px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.ledger-panel th,
.ledger-panel td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--gallery-line);
  text-align: left;
  vertical-align: top;
}

.ledger-panel th {
  color: var(--gallery-blue-dark);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.gallery-page > footer,
.gallery-main + footer {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: end;
  justify-content: space-between;
  padding: 30px max(24px, calc((100vw - 1440px) / 2));
  border-top: 1px solid var(--gallery-ink);
  color: var(--gallery-ink-soft);
  background: var(--gallery-paper-deep);
  font-size: 0.74rem;
}

body.gallery-page > footer strong,
.gallery-main + footer strong,
body.gallery-page > footer span,
.gallery-main + footer span {
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
}

body.gallery-page > footer a,
.gallery-main + footer a {
  color: var(--gallery-blue-dark);
  font-weight: 800;
}

@media (max-width: 1180px) {
  .page-shell {
    display: block;
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .archive-sidebar {
    position: fixed;
    z-index: 70;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(310px, calc(100vw - 46px));
    max-height: none;
    margin: 0;
    padding: 18px;
    border: 0;
    border-right: 1px solid var(--gallery-ink);
    background: var(--gallery-paper-light);
    box-shadow: 24px 0 70px rgba(24, 26, 33, 0.2);
    transform: translateX(-106%);
    transition: transform 220ms ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .archive-sidebar {
    transform: translateX(0);
  }

  .sidebar-heading {
    min-height: 52px;
    padding: 4px 0 13px;
  }

  .sidebar-close {
    display: inline-grid;
    place-items: center;
  }

  .sidebar-nav a {
    min-height: 47px;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: block;
    visibility: hidden;
    border: 0;
    background: rgba(19, 21, 28, 0.38);
    cursor: pointer;
    opacity: 0;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  body.sidebar-open .sidebar-backdrop {
    visibility: visible;
    opacity: 1;
  }
}

@media (max-width: 1040px) {
  body.gallery-page {
    --gallery-content: min(calc(100% - 36px), 980px);
  }

  .bar-inner {
    gap: 16px;
  }

  .intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .era-jumps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-era {
    grid-template-columns: minmax(190px, 0.3fr) minmax(0, 1fr);
    gap: 32px;
  }

  .korea-track {
    grid-template-columns: 1fr;
  }

  .stats {
    max-width: 560px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  body.gallery-page {
    --gallery-content: min(calc(100% - 28px), 620px);
    background-size: 100% 28px;
  }

  .site-bar {
    position: relative;
  }

  .bar-inner {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
    padding: 11px 0;
  }

  .brand-block {
    grid-column: 1 / 3;
    grid-row: 1;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--gallery-line);
  }

  .back-link {
    grid-column: 1;
    grid-row: 2;
  }

  .bar-actions {
    grid-column: 2;
    grid-row: 2;
  }

  .gallery-main {
    padding-top: 48px;
    padding-bottom: 62px;
  }

  .intro h1 {
    font-size: clamp(2.7rem, 15vw, 4.6rem);
  }

  .section-heading h2 {
    font-size: clamp(2.35rem, 12vw, 4.15rem);
  }

  .stats {
    width: 100%;
  }

  .stat {
    min-height: 96px;
    padding: 16px;
  }

  .disclosure {
    grid-template-columns: 1fr;
  }

  .era-jumps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-reading-note {
    grid-template-columns: 1fr;
  }

  .history-era {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 52px 0;
  }

  .history-list {
    padding-left: 21px;
  }

  .history-entry,
  .korea-dates li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-date {
    width: 116px;
  }

  .history-entry::before {
    left: -27px;
  }

  .korea-track {
    padding: 26px 20px;
  }

  .korea-dates li {
    gap: 4px;
  }

  .disclosure-mark {
    width: max-content;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .work-card:hover {
    transform: none;
  }

  .work-figure {
    padding: 18px;
  }

  .ledger-panel {
    grid-template-columns: 1fr;
  }

  .ledger-link {
    justify-self: start;
    white-space: normal;
  }

  .ledger-panel table {
    min-width: 620px;
  }
}

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

@media (forced-colors: active) {
  .site-bar,
  .archive-sidebar,
  .sidebar-toggle,
  .stats,
  .stat,
  .page-jumps a,
  .era-jumps,
  .era-jumps a,
  .history-reading-note,
  .history-kind,
  .history-era,
  .history-list,
  .history-entry,
  .history-thumb,
  .korea-track,
  .disclosure,
  .work-card,
  .work-figure,
  .tag,
  .source-link,
  .context-note,
  .ledger-panel {
    border-color: CanvasText;
    color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  .source-link,
  .lang-button[aria-pressed="true"],
  .lang-button[aria-current="true"] {
    color: Canvas;
    background: CanvasText;
  }

  .page-jumps a:first-child,
  .history-kind[data-kind] {
    color: CanvasText;
    background: Canvas;
  }
}

@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  body.gallery-page {
    --gallery-content: 100%;
    --gallery-ink: #000;
    --gallery-ink-soft: #222;
    --gallery-paper: #fff;
    --gallery-paper-light: #fff;
    --gallery-paper-deep: #fff;
    --gallery-line: #777;
    --gallery-blue: #000;
    --gallery-blue-dark: #000;
    --gallery-blue-wash: #fff;
    --gallery-shadow: none;
    background: #fff;
    color: #000;
    font-size: 9pt;
  }

  .site-bar,
  .archive-sidebar,
  .sidebar-backdrop,
  .sidebar-toggle,
  .lang-switch,
  .card-actions,
  .history-thumb {
    display: none !important;
  }

  .page-shell,
  .gallery-main {
    width: 100%;
    padding: 0;
  }

  .intro {
    display: block;
    padding-bottom: 8mm;
  }

  .page-jumps,
  .era-jumps,
  .history-legend {
    display: none;
  }

  .intro h1 {
    font-size: 34pt;
  }

  .stats {
    display: none;
  }

  .history-section {
    margin-top: 10mm;
  }

  .section-heading,
  .history-era,
  .korea-track {
    display: block;
  }

  .section-heading h2 {
    font-size: 26pt;
  }

  .history-reading-note,
  .history-era,
  .korea-track {
    margin-top: 6mm;
    padding: 5mm 0;
    border: 0;
    border-top: 0.75pt solid #000;
    background: #fff;
    box-shadow: none;
  }

  .history-list {
    margin-top: 5mm;
    padding-left: 5mm;
  }

  .history-entry {
    grid-template-columns: 24mm minmax(0, 1fr);
    gap: 4mm;
    padding-bottom: 4mm;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .history-entry + .history-entry {
    padding-top: 4mm;
  }

  .history-entry::before,
  .history-entry + .history-entry::before {
    top: 2mm;
    left: -6.5mm;
  }

  .history-entry h4 {
    font-size: 12pt;
  }

  .history-entry p,
  .era-heading > span,
  .korea-dates p {
    font-size: 8.5pt;
  }

  [data-history-source] {
    font-size: 7.5pt;
  }

  .history-kind[data-kind] {
    color: #000;
    background: #fff;
  }

  .korea-dates {
    margin-top: 5mm;
  }

  .gallery-heading {
    margin-top: 12mm;
  }

  .disclosure {
    margin: 5mm 0 8mm;
    padding: 4mm;
    border: 1pt solid #000;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7mm;
  }

  .work-card {
    border: 0.75pt solid #000;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .work-figure {
    padding: 4mm;
    border-bottom: 0.75pt solid #000;
    background: #eee;
  }

  .work-image {
    background: #fff;
    print-color-adjust: exact;
  }

  .work-body {
    padding: 5mm;
  }

  .context-note,
  .ledger-panel {
    margin-top: 10mm;
    border: 0.75pt solid #000;
    box-shadow: none;
    break-inside: avoid;
  }

  body.gallery-page > footer,
  .gallery-main + footer {
    margin-top: 10mm;
    padding: 5mm 0 0;
    border-top: 0.75pt solid #000;
    background: #fff;
  }
}
