:root {
  --ink: #201c17;
  --muted: #756b5d;
  --paper: #eee2ca;
  --paper-light: #faf4e8;
  --red: #a52e28;
  --jade: #335f54;
  --line: rgba(51, 39, 26, .17);
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #e8dfd0;
  font-family: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
}
button { color: inherit; font: inherit; }
a { color: inherit; }
img, svg { max-width: 100%; }
noscript { display: block; padding: 18px; background: #201c17; color: #faf4e8; text-align: center; font: 700 13px/1.6 var(--sans); }

.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(255,255,255,.78), transparent 23%),
    radial-gradient(circle at 94% 88%, rgba(89,65,36,.10), transparent 28%),
    #e8dfd0;
}
.site-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: repeating-linear-gradient(90deg, transparent 0 3px, rgba(66,48,29,.08) 3px 4px);
  mix-blend-mode: multiply;
}

.topbar {
  height: 82px;
  padding: 0 clamp(20px, 4.2vw, 68px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.wordmark {
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.wordmark-seal {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 3px;
  color: #f9ead2; background: var(--red);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.17);
  font-size: 21px; font-weight: 800;
}
.wordmark b { display: block; font-size: 19px; letter-spacing: .2em; }
.wordmark small { display: block; margin-top: 3px; color: var(--muted); font: 600 9px/1.2 var(--sans); letter-spacing: .1em; }
.topbar-meta { display: flex; align-items: center; gap: 10px; color: #877d6f; font: 700 10px/1 var(--sans); letter-spacing: .07em; }
.topbar-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--red); }

.global-nav {
  min-height: 58px;
  padding: 8px clamp(16px, 3vw, 48px);
  display: grid;
  grid-template-columns: auto minmax(300px, .65fr) minmax(320px, 1.35fr);
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(51,39,26,.22);
  background: rgba(238,226,202,.96);
  box-shadow: 0 8px 20px rgba(48,34,18,.07);
  backdrop-filter: blur(12px);
}
.toc-home { padding: 8px 12px; border: 0; background: var(--ink); color: #f8edd9; font: 800 10px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.toc-home span { margin-right: 7px; color: #df7b73; }
.search-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.search-selects label { min-width: 0; height: 36px; padding: 0 9px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 7px; border: 1px solid rgba(51,39,26,.18); background: rgba(255,255,255,.35); }
.search-selects label > span { color: var(--red); font: 800 8px/1 var(--sans); letter-spacing: .08em; }
.search-selects select { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 700 10px/1 var(--sans); cursor: pointer; }
.toc-timeline { min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.toc-timeline button { flex: 0 0 auto; padding: 8px 10px; border: 1px solid rgba(51,39,26,.16); background: transparent; color: #6d6357; font: 700 9px/1 var(--sans); cursor: pointer; white-space: nowrap; }
.toc-timeline button:hover, .toc-timeline button.is-active { border-color: var(--red); color: var(--red); background: rgba(165,46,40,.06); }

.archive-reader {
  width: min(1600px, 100%);
  min-height: calc(100vh - 140px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(560px, 1.22fr);
  position: relative;
}
.question-side {
  min-height: calc(100vh - 140px);
  padding: clamp(48px, 6vh, 78px) clamp(28px, 5vw, 82px);
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}
.content-side { min-width: 0; padding: clamp(36px, 5vw, 72px); }
.kicker { margin: 0 0 18px; color: var(--red); font: 800 10px/1.45 var(--sans); letter-spacing: .15em; }

.intro-title { position: relative; animation: fadeUp .55s ease both; }
.intro-title h1 { margin: 0; font-size: clamp(56px, 6vw, 98px); line-height: 1.04; letter-spacing: -.075em; font-weight: 500; }
.intro-title h1 em { color: var(--red); font-style: normal; }
.intro-title > p:last-of-type { max-width: 460px; margin: 30px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; word-break: keep-all; }
.intro-stamp { position: absolute; right: 0; bottom: -92px; width: 70px; height: 70px; display: grid; place-items: center; border: 2px solid rgba(165,46,40,.22); color: rgba(165,46,40,.28); font-size: 37px; transform: rotate(-7deg); }

.catalog { animation: fadeUp .55s .08s ease both; }
.catalog-heading { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 42px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.catalog-heading h2 { margin: 0; font-size: clamp(38px, 4.3vw, 66px); line-height: 1.08; letter-spacing: -.06em; font-weight: 500; }
.catalog-heading > p { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.8; word-break: keep-all; }
.category-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0; }
.category-filter button { padding: 9px 13px; border: 1px solid rgba(51,39,26,.18); border-radius: 999px; background: rgba(255,255,255,.22); color: #6d6357; font: 700 10px/1 var(--sans); cursor: pointer; transition: .2s ease; }
.category-filter button:hover, .category-filter button.is-active { border-color: var(--ink); background: var(--ink); color: #f7edda; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.case-card {
  min-height: 340px;
  padding: 23px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51,39,26,.18);
  background: linear-gradient(145deg, rgba(251,246,236,.9), rgba(235,222,197,.86));
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(48,34,18,.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.case-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(61,44,26,.09); pointer-events: none; }
.case-card:hover { transform: translateY(-5px); border-color: rgba(165,46,40,.5); box-shadow: 0 24px 46px rgba(48,34,18,.12); }
.case-card.is-featured { background: linear-gradient(145deg, #fff8ea, #e8d5b5); border-color: rgba(165,46,40,.33); }
.featured-label { position: absolute; right: 18px; top: 16px; padding: 6px 8px; border-radius: 999px; background: var(--red); color: #fff0dc; font: 800 8px/1 var(--sans); letter-spacing: .05em; }
.case-card.is-featured .case-number { top: 49px; }
.case-number { position: absolute; right: 20px; top: 19px; color: #aaa092; font: 700 10px/1 var(--sans); }
.case-category { color: var(--red); font: 800 9px/1.4 var(--sans); letter-spacing: .13em; }
.case-card strong { margin-top: 17px; padding-right: 30px; font-size: clamp(24px, 2.1vw, 31px); line-height: 1.25; letter-spacing: -.04em; word-break: keep-all; }
.case-question { margin-top: 13px; color: #665d51; font-size: 12px; line-height: 1.7; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.case-card dl { margin: auto 0 0; padding-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(51,39,26,.13); }
.case-card dl div { min-width: 0; }
.case-card dt { color: #9a9083; font: 700 8px/1.2 var(--sans); letter-spacing: .08em; }
.case-card dd { margin: 5px 0 0; overflow: hidden; color: #40392f; font-size: 11px; line-height: 1.35; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.case-winners { margin-top: 14px; padding-right: 22px; color: var(--jade); font-size: 10px; line-height: 1.5; font-weight: 700; word-break: keep-all; }
.open-label { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .06em; }
.open-label b { font-size: 15px; }
.editor-note { margin: 22px 0 0; padding-left: 15px; border-left: 2px solid rgba(165,46,40,.45); color: #82786b; font-size: 11px; line-height: 1.7; word-break: keep-all; }

.question-shelf { margin-top: 58px; }
.shelf-heading { padding-bottom: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: end; border-bottom: 2px solid var(--ink); }
.shelf-heading span { color: var(--red); font: 800 8px/1 var(--sans); letter-spacing: .13em; }
.shelf-heading h3 { margin: 7px 0 0; font-size: 24px; }
.shelf-heading > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; word-break: keep-all; }
.shelf-list { display: grid; }
.shelf-list a { padding: 17px 3px; display: grid; grid-template-columns: 46px 90px 1fr 142px 52px; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); text-decoration: none; }
.shelf-list a:hover strong, .shelf-list a:hover > b { color: var(--red); }
.shelf-year { color: var(--red); font: 800 10px/1 var(--sans); }
.shelf-meta { color: #8b8175; font: 700 9px/1.4 var(--sans); }
.shelf-list strong { font-size: 11px; line-height: 1.6; word-break: keep-all; }
.shelf-list small { color: var(--jade); font-size: 9px; line-height: 1.5; font-weight: 700; word-break: keep-all; }
.shelf-list a > b { text-align: right; font: 800 8px/1 var(--sans); }

.question-sheet { width: 100%; animation: fadeUp .45s ease both; }
.back-button { margin-bottom: clamp(30px, 5vh, 58px); padding: 0 0 7px; border: 0; border-bottom: 1px solid rgba(51,39,26,.25); background: transparent; color: var(--muted); font: 700 10px/1 var(--sans); cursor: pointer; }
.back-button:hover { color: var(--red); border-color: var(--red); }
.case-ident { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.case-ident span { color: var(--red); font: 800 10px/1 var(--sans); letter-spacing: .14em; }
.case-ident b { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--red); color: var(--red); font-size: 13px; }
.exam-meta { margin: 22px 0 38px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.exam-meta div { min-width: 0; }
.exam-meta dt { color: #998f82; font: 800 8px/1 var(--sans); letter-spacing: .1em; }
.exam-meta dd { margin: 7px 0 0; font-size: 13px; line-height: 1.35; font-weight: 700; }
.exam-meta small { display: block; margin-top: 3px; color: var(--muted); font: 600 9px/1.3 var(--sans); }
.question-label { margin: 0 0 14px; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .12em; }
.question-sheet h1 { margin: 0; font-size: clamp(31px, 3.2vw, 52px); line-height: 1.34; letter-spacing: -.045em; font-weight: 600; word-break: keep-all; }
.han-question { margin-top: 32px; padding: 21px 0 0 20px; position: relative; border-top: 1px solid var(--line); border-left: 3px solid var(--red); }
.han-question > span { color: var(--red); font: 800 8px/1 var(--sans); letter-spacing: .14em; }
.han-question p { margin: 10px 0 0; font-size: clamp(19px, 1.8vw, 27px); line-height: 1.72; letter-spacing: .05em; }
.han-question small { display: block; margin-top: 10px; color: #968c7f; font: 600 9px/1.5 var(--sans); }
.record-note { margin-top: 27px; padding: 14px 16px; background: rgba(51,95,84,.08); border: 1px solid rgba(51,95,84,.16); }
.record-note span { color: var(--jade); font: 800 8px/1 var(--sans); letter-spacing: .1em; }
.record-note p { margin: 6px 0 0; color: #4f5d55; font-size: 11px; line-height: 1.6; font-weight: 700; word-break: keep-all; }

.answer-reader { width: min(820px, 100%); margin: 0 auto; animation: pageIn .45s ease both; }
.answer-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.person-title { display: flex; align-items: baseline; gap: 15px; }
.person-title h2 { margin: 0; font-size: clamp(48px, 5.2vw, 76px); line-height: 1; letter-spacing: -.07em; font-weight: 500; }
.person-title span { color: #91877a; font-size: 17px; letter-spacing: .12em; }
.result-badge { width: fit-content; margin: 17px 0 0; padding: 8px 11px 7px; border: 1px solid rgba(165,46,40,.32); border-radius: 999px; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .05em; }
.answer-seal { width: 54px; height: 54px; display: grid; place-items: center; border: 2px solid var(--red); color: var(--red); font-size: 27px; transform: rotate(4deg); }
.person-tabs { display: flex; margin: 22px 0; border-bottom: 1px solid var(--line); }
.person-tabs button { flex: 1; padding: 13px 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8a8073; font-size: 12px; cursor: pointer; }
.person-tabs button span { margin-right: 7px; color: #aaa094; font: 700 8px/1 var(--sans); }
.person-tabs button:hover, .person-tabs button.is-active { border-color: var(--red); color: var(--ink); font-weight: 700; }
.person-tabs button.is-active span { color: var(--red); }
.thesis-card { margin-top: 26px; padding: clamp(24px, 3vw, 36px); position: relative; background: linear-gradient(145deg, #faf4e8, #eadcc3); border: 1px solid rgba(51,39,26,.17); box-shadow: 0 18px 45px rgba(48,34,18,.08); }
.thesis-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(51,39,26,.09); pointer-events: none; }
.thesis-card > span { position: relative; z-index: 1; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .13em; }
.thesis-card h3 { position: relative; z-index: 1; margin: 15px 0 0; font-size: clamp(26px, 3vw, 38px); line-height: 1.25; letter-spacing: -.045em; }
.thesis-card p { position: relative; z-index: 1; margin: 14px 0 0; max-width: 670px; color: #5e554a; font-size: 13px; line-height: 1.85; word-break: keep-all; }
.summary-section { margin-top: 48px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 17px; border-bottom: 2px solid var(--ink); }
.section-heading span { color: var(--red); font: 800 8px/1 var(--sans); letter-spacing: .13em; }
.section-heading h3 { margin: 7px 0 0; font-size: 24px; letter-spacing: -.035em; }
.section-heading > b { color: #968b7e; font: 800 10px/1 var(--sans); }
.summary-note { margin: 12px 0 0; color: #887e71; font-size: 10px; line-height: 1.65; }
.summary-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.summary-list li { min-height: 73px; display: grid; grid-template-columns: 32px 1fr; gap: 9px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.summary-list li > span { padding-top: 3px; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .04em; }
.summary-list p { margin: 0; font-size: 12px; line-height: 1.67; font-weight: 600; word-break: keep-all; }
.today-section { margin-top: 48px; padding: clamp(25px, 3.6vw, 40px); background: var(--ink); color: #f3ead9; }
.section-heading.light { border-color: rgba(255,255,255,.35); }
.section-heading.light span { color: #dd7971; }
.section-heading.light > b { color: #dd7971; font-family: serif; font-size: 22px; }
.today-section ul { margin: 7px 0 0; padding: 0; list-style: none; }
.today-section li { padding: 17px 0 17px 28px; position: relative; border-bottom: 1px solid rgba(255,255,255,.13); color: #d7cdbd; font-size: 13px; line-height: 1.7; word-break: keep-all; }
.today-section li::before { content: "→"; position: absolute; left: 0; color: #dd7971; font: 700 12px/1.7 var(--sans); }
.source-section { margin-top: 40px; padding-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 38px; border-top: 1px solid var(--line); }
.source-section > div > span, .source-links > p { margin: 0; color: var(--red); font: 800 9px/1 var(--sans); letter-spacing: .1em; }
.source-section > div > p:not(.source-links > p) { margin: 11px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; word-break: keep-all; }
.source-links { display: grid; align-content: start; gap: 0; }
.source-links > p { margin-bottom: 7px; }
.source-links a { padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); color: #655c50; font-size: 10px; line-height: 1.35; text-decoration: none; }
.source-links a:hover { color: var(--red); }
.source-links a span { font-family: var(--sans); }
.case-controls { margin-top: 46px; padding-top: 18px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.case-controls button { padding: 10px 0; border: 0; background: transparent; color: #665d51; font: 800 10px/1 var(--sans); cursor: pointer; }
.case-controls button:last-child { text-align: right; }
.case-controls button:hover { color: var(--red); }
.case-controls span { color: #968b7e; font: 800 9px/1 var(--sans); letter-spacing: .08em; }

.site-footer { min-height: 76px; padding: 0 clamp(20px, 4.2vw, 68px); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); color: #8a8073; font: 700 9px/1.4 var(--sans); letter-spacing: .05em; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: none; } }
@keyframes pageIn { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; scroll-behavior: auto !important; } }

@media (max-width: 1040px) {
  .archive-reader { grid-template-columns: minmax(310px, .75fr) minmax(470px, 1.25fr); }
  .question-side { padding: 44px 34px; }
  .content-side { padding: 44px 32px; }
  .catalog-heading { grid-template-columns: 1fr; gap: 20px; }
  .catalog-heading > p { max-width: 540px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-card { min-height: 310px; }
  .summary-list { grid-template-columns: 1fr; }
  .summary-list li { min-height: 0; }
  .shelf-list a { grid-template-columns: 44px 82px 1fr 44px; }
  .shelf-list small { display: none; }
}

@media (max-width: 760px) {
  .topbar { height: 70px; }
  .topbar-meta { display: none; }
  .global-nav { min-height: 0; padding: 8px 12px; grid-template-columns: auto 1fr; gap: 8px; }
  .toc-home { height: 36px; padding-inline: 10px; }
  .toc-home span { display: none; }
  .search-selects { min-width: 0; }
  .search-selects label { height: 36px; }
  .toc-timeline { grid-column: 1 / -1; padding-bottom: 2px; }
  .toc-timeline button { padding: 7px 9px; }
  .archive-reader { min-height: auto; display: block; }
  .question-side { min-height: auto; padding: 46px 20px; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .archive-reader.is-intro .question-side { min-height: 54vh; }
  .archive-reader.is-reading .question-side { min-height: 0; }
  .content-side { padding: 38px max(18px, env(safe-area-inset-right)) calc(60px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .intro-title h1 { font-size: clamp(58px, 16vw, 84px); }
  .intro-stamp { right: 12px; bottom: -65px; }
  .question-sheet h1 { font-size: clamp(30px, 8.4vw, 43px); }
  .back-button { margin-bottom: 35px; }
  .answer-reader { max-width: 620px; }
  .person-title h2 { font-size: 52px; }
  .source-section { grid-template-columns: 1fr; gap: 28px; }
  .shelf-heading { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 16px; }
  .wordmark small { display: none; }
  .wordmark-seal { width: 36px; height: 36px; }
  .global-nav { padding-inline: 8px; }
  .toc-home { font-size: 9px; }
  .search-selects label { padding-inline: 6px; }
  .search-selects label > span { display: none; }
  .search-selects select { font-size: 9px; }
  .intro-title > p:last-of-type { font-size: 13px; }
  .catalog-heading h2 { font-size: 41px; }
  .case-card { min-height: 325px; padding: 22px; }
  .exam-meta { gap: 8px; }
  .exam-meta dd { font-size: 11px; }
  .question-side { padding: 38px 18px; }
  .question-sheet h1 { font-size: 30px; }
  .han-question { padding-left: 15px; }
  .han-question p { font-size: 19px; }
  .content-side { padding-inline: 14px; }
  .answer-header { padding-inline: 6px; }
  .answer-seal { width: 44px; height: 44px; font-size: 22px; }
  .person-title { gap: 10px; }
  .person-title h2 { font-size: 45px; }
  .person-tabs button { font-size: 11px; }
  .thesis-card { padding: 27px 22px; }
  .summary-section { padding-inline: 6px; }
  .today-section { padding: 27px 22px; }
  .shelf-list a { grid-template-columns: 42px 1fr 40px; gap: 7px; }
  .shelf-list .shelf-meta { display: none; }
  .shelf-list strong { font-size: 10px; }
  .site-footer { padding: 19px 16px; flex-direction: column; align-items: flex-start; }
}

@media (min-width: 761px) {
  .question-side { top: 58px; max-height: calc(100vh - 58px); overflow-y: auto; scrollbar-width: thin; }
}

@media (hover: none) {
  .case-card:hover { transform: none; box-shadow: 0 12px 32px rgba(48,34,18,.06); }
}
