:root {
  --paper: #f4efe4;
  --paper-light: #fbf8f1;
  --ink: #17233a;
  --muted: #66665f;
  --line: #cfc6b5;
  --red: #a83a34;
  --green: #365a4e;
  --gold: #a88548;
  --shadow: 0 18px 45px rgb(23 35 58 / 9%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 7%, rgb(255 255 255 / 72%), transparent 26rem),
    repeating-linear-gradient(90deg, rgb(95 78 46 / 2%) 0 1px, transparent 1px 7px),
    var(--paper);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.65;
  word-break: keep-all;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .17;
  background-image: radial-gradient(#5b4e38 .5px, transparent .6px);
  background-size: 7px 7px;
}

a { color: inherit; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 50;
  padding: .7rem 1rem;
  color: white;
  background: var(--ink);
  transform: translateY(-160%);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 3rem, 1440px);
  min-height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}

.wordmark,
.jigunote-link {
  text-decoration: none;
}

.wordmark {
  display: inline-flex;
  gap: .8rem;
  align-items: center;
  font-size: .98rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.wordmark-mark {
  display: grid;
  width: 31px;
  height: 31px;
  color: var(--paper-light);
  background: var(--red);
  place-items: center;
  font-family: Georgia, serif;
  font-size: 1.28rem;
  line-height: 1;
}

.jigunote-link {
  font-family: Arial, sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .45fr);
  gap: clamp(2rem, 6vw, 8rem);
  width: min(100% - 3rem, 1440px);
  min-height: 680px;
  padding: clamp(5rem, 10vw, 9rem) clamp(1rem, 5vw, 6rem) 7rem;
  margin: 0 auto;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  right: 14%;
  bottom: 3.4rem;
  width: clamp(84px, 9vw, 140px);
  aspect-ratio: 1;
  content: "기억\A 수집";
  color: var(--red);
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: "Noto Serif KR", Batang, serif;
  font-size: clamp(.8rem, 1.1vw, 1rem);
  font-weight: 700;
  line-height: 1.45;
  white-space: pre;
  text-align: center;
  display: grid;
  place-items: center;
  transform: rotate(-8deg);
  opacity: .78;
}

.eyebrow {
  margin: 0 0 1.6rem;
  font-family: Arial, sans-serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: "Iowan Old Style", "Noto Serif KR", Batang, serif;
  font-size: clamp(4.3rem, 9.2vw, 9.6rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.07em;
}

.hero h1 em {
  color: var(--red);
  font-weight: inherit;
}

.hero-description {
  max-width: 550px;
  margin: 3rem 0 2rem;
  color: #424640;
  font-size: clamp(1rem, 1.25vw, 1.22rem);
}

.hero-cta {
  display: inline-flex;
  gap: 2.2rem;
  align-items: center;
  padding: .55rem 0;
  border-bottom: 1px solid var(--ink);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.hero-note {
  align-self: center;
  padding: 2.2rem 0 6.5rem;
  border-top: 1px solid var(--ink);
}

.hero-note-number {
  display: inline-block;
  margin-right: 1rem;
  font-family: Georgia, serif;
  font-size: clamp(4rem, 7vw, 7.5rem);
  line-height: 1;
}

.hero-note-label {
  display: inline-block;
  color: var(--red);
  font-size: .72rem;
  font-weight: 750;
  line-height: 1.45;
}

.hero-note p {
  max-width: 290px;
  padding-top: 1.3rem;
  margin-top: 1.4rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .9rem;
}

.vertical-label {
  position: absolute;
  top: 50%;
  right: 1rem;
  margin: 0;
  color: var(--muted);
  font-size: .67rem;
  letter-spacing: .25em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.manifesto {
  display: grid;
  grid-template-columns: .7fr 1.5fr 1fr;
  gap: 3rem;
  align-items: end;
  padding: clamp(5rem, 8vw, 9rem) max(1.5rem, calc((100vw - 1340px) / 2));
  color: var(--paper-light);
  background: var(--ink);
}

.manifesto-index {
  align-self: start;
  margin: 0;
  color: #b8b7b0;
  font-size: .76rem;
  letter-spacing: .12em;
}

.manifesto blockquote {
  margin: 0;
  font-family: "Iowan Old Style", "Noto Serif KR", Batang, serif;
  font-size: clamp(2.25rem, 4.4vw, 5.2rem);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -.055em;
}

.manifesto-copy {
  max-width: 340px;
  margin: 0;
  color: #c7c6bf;
  font-size: .92rem;
}

.collection {
  width: min(100% - 3rem, 1340px);
  padding: clamp(5rem, 8vw, 9rem) 0;
  margin: 0 auto;
}

.collection-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--ink);
}

.collection-heading .eyebrow { margin-bottom: .75rem; }

.collection h2,
.future-note h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Noto Serif KR", Batang, serif;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.06em;
}

.result-summary {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .85rem;
}

.catalog-tools {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 2rem 0 1.2rem;
}

.search-field {
  display: flex;
  flex: 1;
  gap: .8rem;
  align-items: center;
  max-width: 560px;
  padding: .75rem 0;
  border-bottom: 1px solid var(--ink);
}

.search-icon {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  line-height: 1;
}

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

.search-field input::placeholder { color: #858178; }

.search-clear {
  padding: .5rem .7rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.theme-row {
  display: flex;
  gap: .55rem;
  padding: .6rem 0 2.2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.theme-button {
  flex: 0 0 auto;
  padding: .56rem 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: .78rem;
}

.theme-button:hover,
.theme-button[aria-pressed="true"] {
  color: var(--paper-light);
  background: var(--ink);
  border-color: var(--ink);
}

.catalog-status {
  padding: 1rem 0;
  color: var(--muted);
  font-size: .9rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4rem 1.45rem;
}

.magnet-card {
  min-width: 0;
}

.card-image-link {
  position: relative;
  display: grid;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e8e1d4;
  place-items: center;
}

.card-image-link::after {
  position: absolute;
  inset: 0;
  content: "";
  border: 1px solid rgb(23 35 58 / 9%);
  pointer-events: none;
}

.card-index,
.card-source {
  position: absolute;
  z-index: 2;
  top: .85rem;
  font-family: Arial, sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.card-index { left: .9rem; }
.card-source { right: .9rem; }

.card-image {
  width: 100%;
  height: 100%;
  padding: clamp(.8rem, 2vw, 1.4rem);
  object-fit: contain;
  transition: transform .55s cubic-bezier(.2, .6, .2, 1);
}

.card-image-link:hover .card-image,
.card-image-link:focus-visible .card-image {
  transform: scale(1.035);
}

.card-body { padding-top: 1.25rem; }

.card-theme {
  margin: 0 0 .55rem;
  color: var(--red);
  font-family: Arial, sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .13em;
}

.card-title {
  min-height: 2.7em;
  margin: 0;
  font-family: "Iowan Old Style", "Noto Serif KR", Batang, serif;
  font-size: clamp(1.25rem, 1.65vw, 1.65rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.035em;
}

.card-description {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 1rem 0 1.15rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .86rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-link {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  padding-bottom: .2rem;
  border-bottom: 1px solid var(--ink);
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  justify-content: center;
  padding-top: 5rem;
}

.page-button {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 .7rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: .78rem;
  place-items: center;
}

.page-button:hover,
.page-button[aria-current="page"] {
  color: var(--paper-light);
  background: var(--red);
  border-color: var(--red);
}

.page-button:disabled {
  cursor: default;
  opacity: .35;
}

.empty-state {
  padding: 6rem 1rem;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.empty-state > span {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 1.5rem;
  color: var(--paper-light);
  background: var(--red);
  place-items: center;
  font-family: Georgia, serif;
  font-size: 2rem;
}

.empty-state h3 { margin: 0; }
.empty-state p { color: var(--muted); }

.empty-state button {
  padding: .7rem 1rem;
  color: var(--paper-light);
  background: var(--ink);
  border: 0;
  cursor: pointer;
}

.future-note {
  display: grid;
  grid-template-columns: .7fr 1.6fr .9fr;
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
  padding: clamp(5rem, 9vw, 10rem) max(1.5rem, calc((100vw - 1340px) / 2));
  color: var(--paper-light);
  background: var(--red);
}

.future-note .eyebrow { margin-top: .6rem; }

.future-note > p:last-child {
  max-width: 340px;
  margin-top: .8rem;
  color: #f2dcd4;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 4rem max(1.5rem, calc((100vw - 1340px) / 2));
  color: #c9c8c3;
  background: #111a2b;
  font-size: .78rem;
}

.site-footer p { margin: .2rem 0; }

.footer-title {
  color: white;
  font-family: "Noto Serif KR", Batang, serif;
  font-size: 1.15rem;
}

.footer-meta { text-align: right; }

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 20;
  padding: 1rem;
  color: white;
  background: var(--red);
  text-align: center;
}

:focus-visible {
  outline: 3px solid #df9e2f;
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-note {
    max-width: 440px;
    padding-bottom: 2rem;
  }

  .hero::after { right: 3.5rem; }

  .manifesto,
  .future-note {
    grid-template-columns: 1fr 1.7fr;
  }

  .manifesto-copy,
  .future-note > p:last-child {
    grid-column: 2;
  }

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

@media (max-width: 640px) {
  html { scroll-padding-top: 1rem; }

  .site-header,
  .hero,
  .collection {
    width: min(100% - 2rem, 1440px);
  }

  .site-header { min-height: 70px; }
  .jigunote-link { letter-spacing: .13em; }

  .hero {
    padding: 4.5rem 1rem 6rem;
    border: 0;
  }

  .hero h1 { font-size: clamp(3.7rem, 18vw, 5.6rem); }
  .hero-description { margin-top: 2.1rem; }
  .hero::after { right: 1rem; bottom: 1.4rem; }
  .vertical-label { display: none; }

  .manifesto,
  .future-note {
    grid-template-columns: 1fr;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .manifesto blockquote,
  .manifesto-copy,
  .future-note > p:last-child {
    grid-column: 1;
  }

  .collection-heading { align-items: start; }
  .result-summary { margin-top: .6rem; }

  .catalog-tools { align-items: end; }
  .catalog-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .card-title { min-height: 0; }
  .card-description { min-height: 0; }

  .pagination { justify-content: flex-start; }

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

  .footer-meta { text-align: left; }
}

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