/* ==========================================================================
   Office Hours — public stylesheet
   Palette: https://coolors.co/3f3535-f9f4e9-394843-c1b9b1-6a645f
   ========================================================================== */

:root {
  --ink: #3f3535;      /* text, dark umber ink */
  --paper: #f9f4e9;    /* sheets of paper */
  --slate: #394843;    /* chalkboard green — accents */
  --stone: #c1b9b1;    /* rules, mats, quiet borders */
  --umber: #6a645f;    /* secondary text */

  --paper-2: #f4eee1;
  --paper-3: #ece4d4;
  --night: #1c1816;
  --rule: rgba(63, 53, 53, 0.16);
  --rule-strong: rgba(63, 53, 53, 0.34);

  --display: "EB Garamond", "Noto Serif KR", "Noto Serif CJK KR", Garamond, Georgia, serif;
  --text: "EB Garamond", "Noto Serif KR", "Noto Serif CJK KR", Garamond, Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --sheet-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 40px 90px -30px rgba(10, 8, 7, 0.7),
    0 12px 30px -12px rgba(10, 8, 7, 0.45);

  /* ornaments, drawn once and reused */
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='16' viewBox='0 0 160 16'%3E%3Cg fill='none' stroke='%23c1b9b1' stroke-width='1'%3E%3Cpath d='M0 8h62M98 8h62'/%3E%3C/g%3E%3Cg fill='%23c1b9b1'%3E%3Ccircle cx='68' cy='8' r='1.6'/%3E%3Ccircle cx='92' cy='8' r='1.6'/%3E%3Cpath d='M80 2l6 6-6 6-6-6z'/%3E%3C/g%3E%3C/svg%3E");
  --ornament-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='16' viewBox='0 0 160 16'%3E%3Cg fill='none' stroke='%23f9f4e9' stroke-opacity='.55' stroke-width='1'%3E%3Cpath d='M0 8h62M98 8h62'/%3E%3C/g%3E%3Cg fill='%23f9f4e9' fill-opacity='.8'%3E%3Ccircle cx='68' cy='8' r='1.6'/%3E%3Ccircle cx='92' cy='8' r='1.6'/%3E%3Cpath d='M80 2l6 6-6 6-6-6z'/%3E%3C/g%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .2 0 0 0 0 .17 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--night);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.7;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;          /* keep Korean words whole */
  overflow-wrap: break-word;
}

/* Korean pages: let Hangul and Latin share one family so line heights match */
:lang(ko) body,
body:lang(ko) {
  --text: "Noto Serif KR", "Noto Serif CJK KR", "EB Garamond", Georgia, serif;
  font-size: 17px;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: rgba(57, 72, 67, 0.85);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--slate);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   The office itself — a fixed backdrop behind everything
   -------------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #2a2422;
  background-image: url("/assets/bg/office-1920.webp");
  background-image: -webkit-image-set(url("/assets/bg/office-1920.webp") 1x, url("/assets/bg/office-2560.webp") 2x);
  background-image: image-set(url("/assets/bg/office-1920.webp") 1x, url("/assets/bg/office-2560.webp") 2x);
  background-size: cover;
  background-position: 58% 40%;
  background-repeat: no-repeat;
}

@media (min-width: 1280px) {
  .backdrop {
    background-image: url("/assets/bg/office-2560.webp");
    background-image: -webkit-image-set(url("/assets/bg/office-2560.webp") 1x, url("/assets/bg/office-3840.webp") 2x);
    background-image: image-set(url("/assets/bg/office-2560.webp") 1x, url("/assets/bg/office-3840.webp") 2x);
  }
}

@media (min-width: 2200px) {
  .backdrop {
    background-image: url("/assets/bg/office-3840.webp");
  }
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 62% 28%, rgba(20, 16, 14, 0) 0%, rgba(20, 16, 14, 0.28) 62%, rgba(20, 16, 14, 0.62) 100%);
  transition: background-color 0.6s ease;
}

.page-entry .backdrop::after,
.page-plain .backdrop::after,
.admin .backdrop::after {
  background-color: rgba(22, 18, 16, 0.5);
}

/* --------------------------------------------------------------------------
   Hero — a chalkboard-green nameplate over the bookshelves
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 5vw, 72px) clamp(20px, 5vw, 72px) clamp(56px, 9vh, 96px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(22, 18, 16, 0.55) 0%, rgba(22, 18, 16, 0.22) 34%, rgba(22, 18, 16, 0) 58%),
    linear-gradient(0deg, rgba(22, 18, 16, 0.5) 0%, rgba(22, 18, 16, 0) 30%);
}

.plaque {
  position: relative;
  max-width: 470px;
  padding: 40px 44px 36px;
  color: var(--paper);
  background:
    var(--grain),
    linear-gradient(160deg, rgba(64, 80, 74, 0.96), rgba(52, 65, 61, 0.96));
  border: 1px solid rgba(20, 26, 24, 0.9);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.65), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.plaque::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(249, 244, 233, 0.38);
  pointer-events: none;
}

.plaque-eyebrow {
  margin: 0 0 14px;
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(249, 244, 233, 0.72);
}

.plaque-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1.02;
  letter-spacing: 0.005em;
}

.plaque-rule {
  display: block;
  height: 16px;
  margin: 18px 0 16px;
  background: var(--ornament-light) left center / 160px 16px no-repeat;
}

.plaque-sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(249, 244, 233, 0.86);
}

.plaque-by {
  margin: 14px 0 0;
  font-family: "EB Garamond", var(--display);
  font-size: 16px;
  font-style: italic;
  color: rgba(249, 244, 233, 0.72);
}

.plaque-by a {
  color: var(--paper);
  text-decoration-color: rgba(249, 244, 233, 0.4);
  text-underline-offset: 3px;
}

.hero-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(249, 244, 233, 0.8);
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  animation: fade 1.4s 0.6s ease both;
}

.hero-cue span {
  width: 1px;
  height: 34px;
  background: linear-gradient(rgba(249, 244, 233, 0.8), rgba(249, 244, 233, 0));
}

.hero-cue:hover {
  color: var(--paper);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Sheets of paper
   -------------------------------------------------------------------------- */

.sheet {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 80px) clamp(20px, 6vw, 88px) clamp(48px, 7vw, 96px);
  background:
    var(--grain),
    radial-gradient(140% 100% at 50% 0%, #fbf8f0 0%, var(--paper) 55%, #f1e9d9 100%);
  box-shadow: var(--sheet-shadow);
}

.sheet--entry {
  max-width: 1120px;
}

.sheet--narrow {
  max-width: 520px;
  margin: 14vh auto 8vh;
}

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

.sheet-head {
  text-align: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.kicker {
  margin: 0;
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--slate);
}

.kicker-sep {
  margin: 0 0.35em;
  color: var(--stone);
}

.sheet-title {
  margin: 10px 0 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  color: var(--ink);
}

.double-rule {
  display: block;
  width: min(280px, 60%);
  height: 4px;
  margin: 0 auto;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.sheet-count {
  margin: 14px 0 0;
  font-family: "EB Garamond", var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--umber);
}

.intro {
  max-width: 640px;
  margin: 0 auto clamp(28px, 4vw, 44px);
  color: var(--ink);
}

.empty {
  text-align: center;
  color: var(--umber);
  margin: 48px auto;
  max-width: 34em;
}

/* --------------------------------------------------------------------------
   Tag filter — quiet text buttons, like index tabs
   -------------------------------------------------------------------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin: 0 auto 8px;
  max-width: 820px;
}

.filter {
  appearance: none;
  border: 1px solid transparent;
  background: none;
  padding: 4px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--umber);
  cursor: pointer;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.filter:hover {
  color: var(--ink);
  border-color: var(--rule);
}

.filter[aria-pressed="true"] {
  color: var(--paper);
  background: var(--slate);
  border-color: var(--slate);
}

/* --------------------------------------------------------------------------
   The shelf — catalogue cards
   -------------------------------------------------------------------------- */

.shelf {
  list-style: none;
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: clamp(36px, 4.5vw, 56px) clamp(20px, 3vw, 36px);
}

.card[hidden] {
  display: none;
}

.card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.plate {
  margin: 0;
  padding: 7px;
  background: #fffdf7;
  border: 1px solid var(--stone);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 14px 26px -16px rgba(40, 30, 25, 0.6), 0 2px 5px rgba(40, 30, 25, 0.07);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.45s ease, border-color 0.3s ease;
}

.plate img,
.plate-empty {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--paper-3);
}

.plate-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--grain), linear-gradient(165deg, #44554f, var(--slate));
  color: var(--paper);
}

.plate-empty::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(249, 244, 233, 0.3);
}

.plate-empty-initial {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  font-weight: 500;
}

.plate-empty-label {
  font-family: "EB Garamond", var(--display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(249, 244, 233, 0.7);
}

.card > a:hover .plate,
.card > a:focus-visible .plate {
  transform: translateY(-5px) rotate(-0.4deg);
  border-color: var(--umber);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 26px 40px -20px rgba(40, 30, 25, 0.7), 0 4px 8px rgba(40, 30, 25, 0.08);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
  font-family: "EB Garamond", var(--display);
  font-size: 15px;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: 0.03em;
  color: var(--umber);
  font-variant-numeric: oldstyle-nums;
}

.card-title {
  margin: 8px 0 4px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.32;
  color: var(--ink);
  transition: color 0.2s;
}

.card > a:hover .card-title {
  color: var(--slate);
}

.card-tagline {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--umber);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Entry page
   -------------------------------------------------------------------------- */

.topbar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 3vw, 8px) 22px;
  color: var(--paper);
}

.topbar-home {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
}

.topbar-back {
  font-family: "EB Garamond", var(--display);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(249, 244, 233, 0.82);
  text-decoration: none;
}

.topbar-back:hover,
.topbar-home:hover {
  color: #fff;
}

.draft-banner {
  margin: calc(-1 * clamp(36px, 6vw, 80px)) calc(-1 * clamp(20px, 6vw, 88px)) 40px;
  padding: 10px 20px;
  background: repeating-linear-gradient(-45deg, var(--paper-3), var(--paper-3) 10px, var(--paper-2) 10px, var(--paper-2) 20px);
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  text-align: center;
  color: var(--umber);
}

.entry {
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}

.entry-aside {
  position: sticky;
  top: 32px;
}

.plate--lg {
  padding: 9px;
}

.facts {
  margin: 22px 0 22px;
  font-size: 15px;
}

.facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}

.facts > div:first-child {
  border-top: 1px solid var(--rule);
}

.facts dt {
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--umber);
  white-space: nowrap;
}

.facts dd {
  margin: 0;
  text-align: right;
  color: var(--ink);
  font-variant-numeric: oldstyle-nums;
}

.tag {
  display: inline-block;
  margin: 2px 0 2px 4px;
  padding: 0 8px;
  font-size: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--ink);
}

.btn-crack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  width: 100%;
  padding: 15px 20px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: var(--grain), var(--slate);
  border: 1px solid #26302d;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.btn-crack::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(249, 244, 233, 0.3);
  pointer-events: none;
}

.btn-crack:hover {
  background-color: #2e3a36;
  background-image: var(--grain);
}

.btn-crack:active {
  transform: translateY(1px);
}

.btn-inline {
  display: inline-flex;
  width: auto;
  padding: 13px 28px;
}

.entry-text {
  max-width: 680px;
  min-width: 0;
}

.entry-title {
  margin: 12px 0 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.entry-tagline {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--umber);
}

.ornament {
  display: block;
  height: 16px;
  margin: 30px 0 34px;
  background: var(--ornament) left center / 160px 16px no-repeat;
}

.entry-end {
  margin: 48px 0 0;
  max-width: 340px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: clamp(48px, 7vw, 88px);
  padding-top: 26px;
  border-top: 4px double var(--rule-strong);
}

.pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.pager-next {
  text-align: right;
}

.pager-dir {
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--umber);
}

.pager-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  transition: color 0.2s;
}

.pager-link:hover .pager-title {
  color: var(--slate);
}

/* --------------------------------------------------------------------------
   Prose — the atogaki itself
   -------------------------------------------------------------------------- */

.prose {
  font-size: 1.04em;
  line-height: 1.9;
  color: var(--ink);
  hanging-punctuation: first;
}

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

.prose p {
  margin: 0 0 1.15em;
}

.prose--atogaki > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.14em 0 0;
  font-family: var(--display);
  font-size: 3.4em;
  line-height: 0.92;
  font-weight: 500;
  color: var(--slate);
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.3;
  margin: 2.1em 0 0.7em;
}

.prose h1 {
  font-size: 1.6em;
  font-weight: 600;
}

.prose h2 {
  font-size: 1.38em;
  font-weight: 600;
}

.prose h2::before {
  content: "§";
  margin-right: 0.45em;
  color: var(--stone);
  font-weight: 400;
}

.prose h3 {
  font-size: 1.14em;
  font-weight: 600;
}

.prose h4 {
  font-size: 1em;
  font-weight: 600;
  color: var(--umber);
}

.prose a {
  color: var(--slate);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(57, 72, 67, 0.4);
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.2s, color 0.2s;
}

.prose a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.prose strong {
  font-weight: 600;
  color: #2f2828;
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 0.3em 0 0.3em 1.4em;
  border-left: 2px solid var(--slate);
  color: #514848;
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose hr {
  height: 16px;
  margin: 2.6em auto;
  border: 0;
  background: var(--ornament) center / 160px 16px no-repeat;
}

.prose ul,
.prose ol {
  margin: 0 0 1.15em;
  padding-left: 1.5em;
}

.prose li {
  margin: 0.3em 0;
}

.prose li::marker {
  color: var(--umber);
}

.prose code {
  font-family: var(--mono);
  font-size: 0.84em;
  padding: 0.1em 0.35em;
  background: var(--paper-3);
  border-radius: 2px;
}

.prose pre {
  margin: 1.6em 0;
  padding: 1em 1.2em;
  overflow-x: auto;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose img {
  display: block;
  height: auto;
  margin: 1.8em auto;
  padding: 7px;
  background: #fffdf7;
  border: 1px solid var(--stone);
}

.prose table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-size: 0.92em;
}

.prose th,
.prose td {
  padding: 0.55em 0.8em;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  border-bottom: 1px solid var(--rule-strong);
}

.prose mark {
  background: linear-gradient(transparent 55%, rgba(193, 185, 177, 0.75) 55%);
  color: inherit;
  padding: 0 0.05em;
}

.prose rt {
  font-size: 0.55em;
  color: var(--umber);
}

.prose details {
  margin: 1.4em 0;
  padding: 0.6em 1em;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.prose summary {
  cursor: pointer;
  color: var(--slate);
}

.prose .fn-ref {
  line-height: 0;
  font-size: 0.72em;
  margin-left: 0.08em;
}

.prose .fn-ref a {
  text-decoration: none;
  padding: 0 0.12em;
  font-family: "EB Garamond", var(--display);
  font-weight: 600;
}

.prose .footnotes {
  margin-top: 3em;
  padding-top: 1.1em;
  font-size: 0.86em;
  line-height: 1.7;
  color: var(--umber);
  position: relative;
}

.prose .footnotes::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 33%;
  border-top: 1px solid var(--rule-strong);
}

.prose .footnotes ol {
  padding-left: 1.4em;
  margin: 0;
}

.prose .footnotes li:target {
  background: rgba(193, 185, 177, 0.28);
}

.prose .fn-back {
  text-decoration: none;
  margin-left: 0.2em;
}

/* --------------------------------------------------------------------------
   Login, plain pages, footer
   -------------------------------------------------------------------------- */

.sheet--login .sheet-title,
.sheet--login .kicker,
.sheet--login .double-rule {
  text-align: center;
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.login-form label {
  font-family: "EB Garamond", var(--display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--umber);
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fffdf7;
  border: 1px solid var(--stone);
  border-radius: 2px;
}

.login-form input:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(57, 72, 67, 0.15);
}

.login-form .btn-crack {
  margin-top: 10px;
}

.login-foot {
  margin: 26px 0 0;
  text-align: center;
  font-size: 15px;
}

.form-error,
.form-notice {
  margin: 24px 0 0;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.55;
  border-left: 2px solid var(--slate);
  background: var(--paper-2);
}

.form-error {
  border-left-color: #8a3b32;
  color: #6d2f28;
}

.form-notice code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--paper-3);
  padding: 0.05em 0.3em;
}

.text-link {
  color: var(--slate);
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(57, 72, 67, 0.4);
}

.colophon {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px 64px;
  text-align: center;
  font-family: "EB Garamond", var(--display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(249, 244, 233, 0.75);
}

.colophon p {
  margin: 4px 0;
}

.colophon a {
  color: rgba(249, 244, 233, 0.9);
  text-decoration-color: rgba(249, 244, 233, 0.35);
  text-underline-offset: 3px;
}

.colophon-mark {
  display: block;
  height: 16px;
  margin: 0 auto 16px;
  width: 160px;
  background: var(--ornament-light) center / 160px 16px no-repeat;
}

.owner-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--slate);
  background: var(--paper);
  border: 2px solid var(--slate);
  box-shadow: 0 0 0 4px rgba(249, 244, 233, 0.35), 0 14px 30px -8px rgba(0, 0, 0, 0.7);
}

.owner-fab::before {
  content: "✎";
  font-size: 1.1em;
}

.owner-fab:hover {
  color: var(--paper);
  background: var(--slate);
}

/* Editor start-up card (lives here so it shows even if admin.css can't load) */

.ad-boot {
  width: min(520px, calc(100% - 32px));
  margin: 16vh auto;
  padding: 36px 40px 30px;
  background: var(--grain), var(--paper);
  box-shadow: var(--sheet-shadow);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.ad-boot p {
  margin: 0 0 12px;
}

.ad-boot-title {
  margin: 6px 0 14px !important;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
}

.ad-boot-detail {
  padding: 10px 14px;
  border-left: 2px solid #8a3b32;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 14px;
  overflow-wrap: anywhere;
}

/* Revealed only if the editor still hasn't replaced this card after 8 s. */
.ad-boot-slow {
  animation: boot-reveal 0s 8s both !important;
  color: var(--umber);
}

@keyframes boot-reveal {
  from {
    visibility: hidden;
    height: 0;
    overflow: hidden;
  }
  to {
    visibility: visible;
  }
}

/* --------------------------------------------------------------------------
   Korean: no synthetic italics (Hangul has none), tighter spacing for labels
   -------------------------------------------------------------------------- */

:lang(ko) .sheet-count,
:lang(ko) .plaque-by,
:lang(ko) .empty {
  font-style: normal;
}

:lang(ko) .hero-cue,
:lang(ko) .topbar-back,
:lang(ko) .pager-dir,
:lang(ko) .facts dt,
:lang(ko) .kicker-local,
:lang(ko) .plate-empty-label {
  letter-spacing: 0.06em;
}

:lang(ko) .hero-cue,
:lang(ko) .topbar-back,
:lang(ko) .facts dt {
  font-size: 14px;
}

.facts dt.dt-no {
  text-transform: none;
  font-style: italic;
  letter-spacing: 0.03em;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-aside {
    position: static;
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .backdrop {
    background-position: 74% 40%;
  }

  .hero {
    padding-bottom: 92px;
  }

  .plaque {
    padding: 30px 26px 26px;
  }

  .plaque-sub {
    font-size: 16px;
  }

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

  .card-title {
    font-size: 17px;
  }

  .card-tagline {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .card-meta {
    font-size: 13.5px;
  }

  .plate {
    padding: 5px;
  }

  .topbar-home {
    font-size: 19px;
  }

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

  .pager-next {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Gallery opener — a little pile of photographs under the cover plate
   -------------------------------------------------------------------------- */

.gallery-open {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 20px 0 0;
  padding: 12px 16px 12px 12px;
  font: inherit;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.55);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.gallery-open:hover {
  border-color: var(--umber);
  background: #fffdf7;
}

.gallery-stack {
  position: relative;
  flex: none;
  width: 78px;
  height: 66px;
}

.gallery-stack img {
  position: absolute;
  top: 4px;
  width: 44px;
  height: 56px;
  object-fit: cover;
  padding: 3px;
  background: #fffdf7;
  border: 1px solid var(--stone);
  box-shadow: 0 6px 12px -6px rgba(40, 30, 25, 0.65);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-stack img:nth-child(1) {
  left: 0;
  z-index: 1;
  transform: rotate(-9deg);
}

.gallery-stack img:nth-child(2) {
  left: 15px;
  z-index: 2;
  transform: rotate(4deg);
}

.gallery-stack img:nth-child(3) {
  left: 30px;
  z-index: 3;
  transform: rotate(-2deg) translateY(2px);
}

.gallery-stack--1 img:nth-child(1) {
  left: 16px;
  transform: rotate(-3deg);
}

.gallery-stack--2 img:nth-child(1) {
  left: 6px;
}

.gallery-stack--2 img:nth-child(2) {
  left: 26px;
}

.gallery-open:hover .gallery-stack img:nth-child(1),
.gallery-open:focus-visible .gallery-stack img:nth-child(1) {
  transform: rotate(-16deg) translate(-6px, 1px);
}

.gallery-open:hover .gallery-stack img:nth-child(2),
.gallery-open:focus-visible .gallery-stack img:nth-child(2) {
  transform: rotate(5deg) translateY(-5px);
}

.gallery-open:hover .gallery-stack img:nth-child(3),
.gallery-open:focus-visible .gallery-stack img:nth-child(3) {
  transform: rotate(13deg) translate(7px, 2px);
}

.gallery-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.gallery-kicker {
  font-family: "EB Garamond", var(--display);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
}

.gallery-count {
  font-size: 16px;
  line-height: 1.35;
}

.gallery-arrow {
  color: var(--umber);
  transition: transform 0.2s;
}

.gallery-open:hover .gallery-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Cover Flow viewer
   -------------------------------------------------------------------------- */

html.cf-lock,
html.cf-lock body {
  overflow: hidden;
}

.cf {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.28s ease;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}

.cf[hidden] {
  display: none;
}

.cf.is-open {
  opacity: 1;
}

.cf-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 13, 12, 0.8);
  -webkit-backdrop-filter: blur(8px) saturate(0.85);
  backdrop-filter: blur(8px) saturate(0.85);
}

/* Rows above and below the pictures let clicks fall through to the backdrop (closing),
   except on their actual controls. */
.cf-top,
.cf-info,
.cf-controls,
.cf-foot {
  position: relative;
  pointer-events: none;
}

.cf-top button,
.cf-controls button,
.cf-controls input {
  pointer-events: auto;
}

.cf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 32px) 0;
}

.cf-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.cf-kicker {
  flex: none;
  font-family: "EB Garamond", var(--display);
  font-size: 12.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
}

.cf-title {
  font-family: var(--display);
  font-size: 18px;
  color: rgba(249, 244, 233, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cf-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--paper);
  background: rgba(249, 244, 233, 0.06);
  border: 1px solid rgba(249, 244, 233, 0.35);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.cf-close:hover {
  background: rgba(249, 244, 233, 0.16);
  border-color: rgba(249, 244, 233, 0.75);
}

.cf-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.cf-stage.is-dragging {
  cursor: grabbing;
}

.cf-track {
  position: absolute;
  left: 50%;
  width: 0;
  height: 0;
}

.cf-item {
  position: absolute;
  margin: 0;
  transform-origin: 50% 50%;
  will-change: transform;
  backface-visibility: hidden;
}

.cf-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: rgba(42, 36, 34, 0.9);
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, 0.9);
  -webkit-box-reflect: below 3px linear-gradient(transparent 0%, transparent 72%, rgba(255, 255, 255, 0.2) 100%);
}

.cf-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* side images dim as they turn away */
.cf-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #0d0b0a;
  opacity: var(--shade, 0);
  pointer-events: none;
}

.cf-info {
  min-height: 3.4em;
  padding: 4px clamp(16px, 6vw, 64px) 0;
  text-align: center;
}

.cf-caption {
  max-width: 44em;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(249, 244, 233, 0.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cf-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 16px;
}

.cf-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  font-size: 26px;
  line-height: 1;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(249, 244, 233, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.cf-arrow:hover:not(:disabled) {
  background: rgba(249, 244, 233, 0.12);
  border-color: rgba(249, 244, 233, 0.7);
}

.cf-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

/* the scrubber, drawn like Cover Flow's thin scroll bar */
.cf-scrub {
  -webkit-appearance: none;
  appearance: none;
  width: min(440px, 52vw);
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.cf-scrub::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(249, 244, 233, 0.22);
}

.cf-scrub::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(249, 244, 233, 0.22);
}

.cf-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 34px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cf-scrub::-moz-range-thumb {
  width: 34px;
  height: 12px;
  border: 0;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cf-scrub:focus-visible {
  outline: 2px solid var(--stone);
  outline-offset: 2px;
}

.cf-foot {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 8px 16px 20px;
  font-family: "EB Garamond", var(--display);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--stone);
}

.cf-count {
  font-variant-numeric: tabular-nums;
}

.cf-hint {
  color: rgba(193, 185, 177, 0.7);
}

.cf--single .cf-controls,
.cf--single .cf-hint {
  display: none;
}

@media (max-width: 640px) {
  .cf-hint {
    display: none;
  }

  .cf-title {
    font-size: 16px;
  }

  .cf-caption {
    font-size: 15.5px;
  }

  .cf-scrub {
    width: 52vw;
  }
}

@media (hover: none) {
  .cf-hint {
    display: none;
  }
}
