@font-face {
  font-family: "Gowun Batang";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gowun-batang-korean-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans KR";
  font-weight: 300;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-kr-korean-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans KR";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-kr-korean-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-deep: #ebe5d8;
  --ink: #1a1a17;
  --ink-soft: #4a4940;
  --ink-faint: #68645a;
  --green: #1c3b2e;
  --brass: #a8843f;
  --line: #d8d2c4;
  --font-display: "Gowun Batang", "Apple SD Gothic Neo", serif;
  --font-sans: "IBM Plex Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 7rem; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 300 1rem/1.8 var(--font-sans); color: var(--ink); background: var(--paper);
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover, .plain:hover { border-bottom-color: var(--brass); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
button, input, textarea { font: inherit; }
button, summary { cursor: pointer; }

/* The board uses the native disclosure with the shared navigation stylesheet. */
.top { border-bottom: 1px solid var(--line); }
.drop-btn { list-style: none; }
.drop-btn::-webkit-details-marker { display: none; }
/* Reserve the drawer's space so the next keyboard focus stays in view. */
.top:has(.nav-drop[open]) {
  --drawer-height: min(27rem, 52svh);
  margin-bottom: var(--drawer-height);
}
.nav-drop[open] .drop {
  display: block; height: var(--drawer-height);
}
body:has(main :focus-visible, footer :focus-visible) .top:has(.nav-drop[open]) {
  position: relative;
}
@supports not selector(:has(*)) {
  .top { position: relative; }
  .nav-drop[open] .drop { position: static; width: min(16rem, 70vw); }
}
/* When zoom leaves little vertical space, scroll the document through the links. */
@media (max-height: 38em) {
  :root { scroll-padding-top: 0; }
  .top { position: relative; }
  .top:has(.nav-drop[open]) { margin-bottom: 0; }
  .nav-drop[open] .drop {
    position: static; width: min(22rem, 72vw); height: auto; max-height: none;
    padding: .5rem 0; box-shadow: none;
  }
  .nav-drop[open] .drop-inner { grid-template-columns: 1fr; }
}
.nav-drop[open] .drop-btn { border-bottom-color: var(--brass); }
.drop .all-tools { width: fit-content; margin: .8rem auto 0; }

main, footer { width: min(60rem, calc(100% - 2 * var(--nav-gutter))); margin-inline: auto; }
main { flex: 1; padding-top: 1rem; padding-bottom: clamp(3rem, 7vw, 6rem); }
.account, .mast, .tabs, .meta, .byline, .actions, .pages, footer {
  display: flex; align-items: center; gap: 1rem;
}
.account { justify-content: flex-end; margin: 0 0 1.8rem; font-size: .875rem; }
.account a, .plain { color: var(--ink-soft); }
.plain { padding: 0; background: none; border: 0; border-bottom: 1px solid transparent; }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.4; color: var(--green); }
h1 { font-size: clamp(2.1rem, 5vw, 3.25rem); margin: 0; letter-spacing: -.025em; }
h2 { font-size: 1.5rem; }
.mast { position: relative; justify-content: space-between; align-items: flex-end; padding: 1.6rem 0 2.2rem; }
.mast::before { content: ""; position: absolute; top: 0; width: 2.5rem; border-top: 1px solid var(--brass); }
.mast p, .narrow > p { margin: .6rem 0 0; color: var(--ink-soft); }
.button {
  display: inline-block; padding: .5rem 1.2rem; border: 1px solid var(--green); border-radius: 2px;
  background: var(--green); color: var(--paper); font-weight: 500; white-space: nowrap;
}
.button:hover { background: #284b3d; border-color: #284b3d; }
.button.quiet { background: transparent; color: var(--green); }
.button.quiet:hover { background: var(--paper-deep); }
.tabs { justify-content: space-between; border-bottom: 1px solid var(--green); color: var(--ink-faint); font-size: .875rem; }
.tabs a { display: inline-block; margin-right: 1rem; padding: .5rem 0; }
.tabs a[aria-current] { color: var(--green); font-weight: 500; border-color: var(--brass); }
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-bottom: 1px solid var(--line); }
.posts li > a { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .65rem; padding: .9rem 0; }
.posts li > a:hover { background: var(--paper-deep); }
.posts strong { font-weight: 500; color: var(--ink); }
.meta, .byline, .hint, .back, .reply-count, .flags, .empty { font-size: .875rem; color: var(--ink-faint); }
.meta { margin-left: auto; gap: 1.2rem; font-variant-numeric: tabular-nums; }
.private { font-weight: 500; color: var(--green); }
.notice-tag { font-weight: 500; color: var(--paper); background: var(--green); padding: .05rem .45rem; border-radius: 2px; }
.posts li.pinned { background: var(--paper-deep); }
.photos { display: grid; gap: .75rem; margin: 0 0 1.25rem; }
.photos a { display: block; }
.photos img { display: block; max-width: 100%; max-height: 75vh; width: auto; height: auto; border: 1px solid var(--line); background: var(--paper-deep); }
.pages { justify-content: center; margin: 1.6rem 0; font-size: .875rem; }
.pages a, .back, .source, .hint a { text-decoration: underline; text-underline-offset: .22em; }
.reading, .narrow { max-width: 41rem; margin-inline: auto; }
.narrow { max-width: 30rem; }
.back { display: inline-block; margin-bottom: 1.5rem; }
.reading h1, .narrow h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.byline { flex-wrap: wrap; gap: .35rem 1rem; margin: .85rem 0; }
.bodytext { white-space: pre-wrap; overflow-wrap: anywhere; margin: 1.75rem 0 1rem; }
.comments { border-top: 1px solid var(--green); margin-top: 3rem; }
.comment { border-bottom: 1px solid var(--line); padding: .5rem 0 1rem; }
.comment .bodytext { margin: .35rem 0; }
.actions { margin-top: 1rem; flex-wrap: wrap; }
.actions button, .actions summary { font-size: .875rem; border: 1px solid var(--line); border-radius: 2px; padding: .3rem .7rem; background: transparent; color: var(--ink); }
.actions details[open] button { margin-top: .45rem; }
.stack { display: grid; gap: 1.1rem; margin: 1.5rem 0; }
.stack > label, .stack legend { font-weight: 500; }
.stack .button { justify-self: start; }
input:not([type=radio]):not([type=checkbox]):not([type=hidden]), textarea, .stack select {
  display: block; width: 100%; margin-top: .35rem; padding: .65rem .8rem; color: var(--ink);
  font-weight: 300; background: #faf8f3; border: 1px solid #aaa599; border-radius: 2px;
}
.stack select { font: inherit; }
.consult-consent { font-size: .875rem; }
.consult-consent p { margin: 0 0 .75rem; }
.consult-consent a { text-decoration: underline; }
.consult-consent input { accent-color: var(--green); }
textarea { resize: vertical; }
fieldset { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 1rem; }
.radio { margin-right: 1.25rem; }
input[type=radio] { accent-color: var(--green); }
.hint { margin: .4rem 0; }
.notice { border-left: 2px solid var(--brass); padding: .55rem 1rem; background: var(--paper-deep); }
.empty { padding: 2rem 0; }
footer { justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 1.2rem 0 2rem; font-size: .8125rem; }
footer a { color: var(--ink-faint); }

@media (max-width: 630px) {
  html { scroll-padding-top: 10rem; }
  main { padding-top: .65rem; }
  .account { margin-bottom: 1.1rem; }
  .mast { align-items: flex-start; gap: .65rem; padding-bottom: 1.5rem; }
  .mast p { font-size: .9375rem; }
  .mast .button { padding: .4rem .8rem; }
  .meta { width: 100%; margin-left: 0; gap: .8rem; }
  .posts li > a { padding: .75rem 0; }
}

.column-figure { margin: 1.25rem 0; }
.column-figure img { display: block; max-width: 100%; height: auto; max-height: 75vh; width: auto; }
.column-figure figcaption { margin-top: .4rem; color: var(--muted); font-size: .9rem; }

.figure-view { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.figure-view > a { position: absolute; inset: 0; }
.figure-view .still-zoom { display: none; }
@media (prefers-reduced-motion: reduce) {
  .figure-view .animated-zoom { display: none; }
  .figure-view .still-zoom { display: block; }
}
