:root { --paper: #f8f3e9; --ink: #352d26; --muted: #716151; --line: #d7cbbb; --leaf: #eae2d4; --accent: #8d4934; --serif: "Noto Serif KR", AppleMyungjo, Georgia, serif; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", sans-serif; padding-bottom: env(safe-area-inset-bottom); }
button, input { font: inherit; }
a { color: inherit; text-underline-offset: .2em; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; word-break: keep-all; }
.books-main, .header-inner, .books-footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.book-skip { position: fixed; top: -100px; left: 20px; z-index: 300; padding: 12px; background: var(--ink); color: var(--paper); }
.book-skip:focus { top: 12px; }
.books-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; gap: 16px; align-items: center; min-height: 76px; }
.books-brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 900; letter-spacing: -.04em; }
.books-brand i { display: grid; place-items: center; width: 28px; height: 28px; background: var(--accent); color: var(--paper); font-size: .75rem; font-style: normal; transform: rotate(-4deg); }
.books-brand > span { color: var(--muted); font-size: .75rem; letter-spacing: .08em; }
.header-inner > nav { display: flex; gap: 24px; margin-left: auto; }
.header-inner > nav a { display: grid; align-items: center; min-height: 44px; font-size: .875rem; text-decoration: none; }
.header-inner > nav a:hover { text-decoration: underline; }
.header-inner > .language-switch { gap: 12px; margin-left: 16px; }
.books-main { padding-block: 48px 90px; }
.books-intro { display: grid; gap: 24px; padding-block: 16px 48px; }
.book-kicker { font-size: .8125rem; font-weight: 750; letter-spacing: .08em; color: var(--muted); }
.books-intro h1 { margin-block: 24px; font: 500 clamp(2.6rem, 4.5vw + .6rem, 4.8rem)/1.35 var(--serif); letter-spacing: -.055em; }
.book-lead { max-width: 40ch; color: var(--muted); font-size: 1.125rem; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
.books-intro .book-kicker { color: var(--accent); font-size: .75rem; letter-spacing: .12em; }
.books-intro .book-kicker span { padding-inline: 8px; color: var(--line); }
.library-corner { margin: 0; justify-self: center; width: min(300px, 82%); }
.library-corner svg { display: block; width: 100%; height: auto; }
.library-corner figcaption { text-align: center; color: var(--muted); font: italic .9375rem/1.6 var(--serif); margin-top: 8px; }
.book-feature { display: grid; gap: 28px; align-items: center; padding-block: 32px; border-block: 1px solid var(--line); }
.feature-cover { justify-self: center; width: min(240px, 65vw); }
.book-cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; background: var(--leaf); border: 1px solid var(--line); box-shadow: 3px 3px 0 #e6ddce, 8px 12px 18px #352d2612; border-radius: 1px 4px 4px 1px; }
.book-cover-type { display: flex; flex-direction: column; align-items: start; padding: 12%; position: relative; background: var(--jacket, #e1c2ad); border: 0; box-shadow: inset 5px 0 0 #352d260f, inset 7px 0 0 #fcf7ee40, 3px 3px 0 #e6ddce, 8px 12px 18px #352d2612; }
.jacket-clay { --jacket: #e1c2ad; }
.jacket-sage { --jacket: #d2d9c6; }
.jacket-oat { --jacket: #e6d9b9; }
.book-cover-type::after { content: ""; position: absolute; width: 12%; height: 15%; top: 0; right: 12%; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.book-cover-type span { font-size: .625rem; letter-spacing: .1em; }
.book-cover-type strong { font: 650 clamp(1.4rem, 2vw, 2.2rem)/1.45 "Noto Serif KR", AppleMyungjo, Georgia, serif; margin-block: auto; word-break: keep-all; overflow-wrap: anywhere; }
.book-cover-type small { font-size: .75rem; }
.book-feature h2 { font: 650 clamp(1.75rem, 3vw, 3rem)/1.4 "Noto Serif KR", AppleMyungjo, Georgia, serif; letter-spacing: -.04em; margin-block: 16px; }
.book-feature-meta { margin-block: 20px; font-size: .875rem; color: var(--muted); }
.book-button { display: inline-flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 48px; padding: 12px 22px; color: var(--paper); background: var(--accent); border: 1px solid var(--accent); border-radius: 3px; text-decoration: none; font-weight: 650; }
.book-button:hover { background: #703825; }
.book-button.secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.book-button.secondary:hover { background: var(--leaf); }
.books-catalogue { margin-top: 52px; }
.books-catalogue > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.books-catalogue h2 { font: 600 1.5rem/1.5 var(--serif); letter-spacing: -.035em; }
.books-catalogue h2 small { font-size: .875rem; color: var(--muted); margin-left: 8px; }
.book-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.book-filters button { border: 1px solid var(--line); background: transparent; padding: 8px 16px; min-height: 44px; color: var(--muted); }
.book-filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.books-shelf { list-style: none; padding: 0; margin-block: 24px 0; display: grid; gap: 0 40px; }
.shelf-entry { border-bottom: 1px solid var(--line); }
.book-spine { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 22px; padding-block: 28px; text-decoration: none; }
.book-spine h3 { font: 600 1.25rem/1.5 var(--serif); letter-spacing: -.025em; margin-block: 8px; }
.book-spine p { font-size: .9375rem; color: var(--muted); }
.book-card-meta { display: block; font-size: .8125rem; color: var(--muted); margin-top: 16px; }
.book-card-action { display: block; margin-top: 12px; font-size: .875rem; font-weight: 750; }
.book-spine:hover h3 { text-decoration: underline; text-underline-offset: .18em; }
.books-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; padding: 44px 0; border-block: 1px solid var(--line); }
.books-empty h2, .books-empty h1 { font: 600 clamp(1.35rem, 2vw, 1.75rem)/1.5 var(--serif); margin-bottom: 16px; }
.books-empty p { color: var(--muted); max-width: 45ch; margin-bottom: 24px; }
.library-letter { align-items: start; gap: 32px; padding-block: 40px; }
.letter-mark { color: var(--accent); font: italic 2.2rem/1.15 Georgia, serif; transform: rotate(-6deg); }
.library-letter .book-kicker { margin-bottom: 12px; color: var(--accent); font-weight: 600; }
.library-letter p:not(.book-kicker) { max-width: 48ch; line-height: 1.9; }
.library-letter .letter-signature { font-family: var(--serif); font-size: .9375rem; margin-block: 24px; }
.library-letter a { display: inline-flex; gap: 24px; min-height: 44px; align-items: center; font-size: .875rem; color: var(--accent); }
.books-footer { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding-block: 28px 90px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.books-header .ilmm-trigger { color: var(--ink); border-color: var(--line); }
.book-spine .book-cover-type { min-height: 158px; }
.book-spine .book-cover-type strong { font-size: .9375rem; line-height: 1.5; }
.book-spine .book-cover-type span, .book-spine .book-cover-type small { font-size: .5rem; }
.book-back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 28px; font-size: .875rem; text-decoration: none; }
.book-detail { display: grid; gap: 40px; }
.book-jacket { width: min(240px, 65vw); justify-self: center; }
.book-jacket > p { margin-top: 16px; }
.book-copy { min-width: 0; }
.book-copy h1 { font: 650 clamp(2rem, 4vw, 3.2rem)/1.4 "Noto Serif KR", AppleMyungjo, Georgia, serif; letter-spacing: -.055em; margin-block: 16px; }
.book-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.book-share { min-height: 44px; background: transparent; border: 0; color: var(--muted); padding: 10px; text-decoration: underline; }
.book-feedback { min-height: 24px; margin-block: 12px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.book-prose { margin-top: 36px; max-width: 65ch; }
.book-prose h2 { font-size: 1.125rem; margin-bottom: 12px; }
.book-prose p { white-space: pre-wrap; line-height: 1.85; overflow-wrap: anywhere; }
.book-toc { list-style: decimal-leading-zero; padding-left: 32px; margin: 0; }
.book-toc li { padding: 10px 0 10px 8px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.book-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; }
.book-info dt { color: var(--muted); }
.book-info dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.book-language-note { color: var(--muted); font-size: .8125rem; margin-block: 20px; }
.book-discuss { display: inline-flex; min-height: 44px; align-items: center; font-size: .9375rem; }
.book-draft { padding: 16px; background: var(--leaf); margin-bottom: 28px; border: 1px solid var(--line); }
.book-download-note { border-block: 1px solid var(--line); padding-block: 16px; margin-block: 20px; color: var(--muted); font-size: .9375rem; }
.book-download-note > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.book-download-note code { color: var(--ink); font-size: 1.125rem; overflow-wrap: anywhere; }
.book-download-note button { border: 1px solid var(--line); background: transparent; color: var(--ink); min-height: 44px; padding: 8px 16px; }
.book-download-note .book-feedback:empty { display: none; }
.book-captures { margin-block: 40px; }
.book-captures h2 { font-size: 1.125rem; margin-bottom: 20px; }
.book-captures > div { display: grid; gap: 32px; }
.book-captures figure { margin: 0; min-width: 0; scroll-margin-top: 24px; }
.book-captures img { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--leaf); }
.book-captures figcaption { margin-top: 12px; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.book-captures figcaption span { color: var(--accent); margin-right: 8px; font-weight: 750; }
.book-captures.compact > div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.book-captures.compact .book-back { margin-top: 20px; }
.book-capture-reader { max-width: 860px; margin-inline: auto; }
.reader-head { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.reader-head h1 { font-size: 1.25rem; width: 100%; order: -1; }
.reader-head a { font-size: .875rem; min-height: 44px; display: inline-flex; align-items: center; }
.reader-tools { display: flex; justify-content: center; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 10; margin-block: 20px; padding: 12px; background: var(--paper); border-block: 1px solid var(--line); }
.reader-tools button { min-height: 44px; min-width: 44px; border: 1px solid var(--line); background: var(--leaf); color: var(--ink); }
.reader-tools button:disabled { opacity: .45; cursor: wait; }
.reader-tools label { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.reader-tools label span { display: none; }
.reader-tools input { width: 64px; padding: 8px; min-height: 44px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.reader-paper { width: 100%; overflow-x: auto; text-align: center; min-height: 100px; background: var(--leaf); }
.reader-paper canvas { vertical-align: top; background: var(--paper); }
.reader-text { margin-block: 24px; }
.reader-text summary { min-height: 44px; cursor: pointer; }
.reader-text p { white-space: pre-wrap; max-width: 65ch; margin: 16px auto; }
@media (min-width: 700px) {
  .books-main { padding-top: 64px; }
  .books-intro { grid-template-columns: minmax(0, 1fr) 34%; gap: 48px; align-items: center; padding-bottom: 72px; }
  .library-corner { width: 100%; max-width: 360px; }
  .book-feature { grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding: 48px 40px; background: #eee5d8; }
  .library-letter { gap: 64px; padding-block: 48px; }
  .letter-mark { width: 140px; flex-shrink: 0; font-size: 2.6rem; padding-top: 36px; }
  .books-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-detail { grid-template-columns: 280px minmax(0, 1fr); gap: 64px; }
  .book-jacket { width: 100%; }
  .book-info { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reader-head h1 { width: auto; order: initial; }
  .reader-tools label span { display: inline; }
}
@media (max-width: 699px) { .header-inner > nav:not(.language-switch) { display: none; } .header-inner > .language-switch { margin-left: auto; } .books-brand > span { display: none; } }
@media (max-width: 699px) {
  .books-main { padding-top: 32px; }
  .books-intro { padding-bottom: 32px; }
  .library-corner { width: min(220px, 75%); }
  .library-letter { flex-direction: column; gap: 24px; }
  .letter-mark { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .books-intro { animation: shelf-arrive .45s cubic-bezier(.25, 1, .5, 1) both; }
  @media (hover: hover) and (pointer: fine) {
    .feature-cover .book-cover, .book-spine .book-cover { transition: transform .25s cubic-bezier(.25, 1, .5, 1); }
    .feature-cover:hover .book-cover, .book-spine:hover .book-cover { transform: translateY(-4px) rotate(-1deg); }
  }
}
.book-download { max-width: 720px; margin-inline: auto; }
.book-download > h1 { margin: 16px 0 32px; font: 600 clamp(2rem, 5vw, 3.2rem)/1.3 var(--serif); letter-spacing: -.04em; }
.download-book-summary { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 24px; align-items: center; }
.download-book-summary .book-cover { width: 88px; font-size: .75rem; }
.download-book-summary .book-cover-type { padding: 8px; }
.download-book-summary .book-cover-type strong { font-size: 1rem; }
.download-book-summary h2 { margin: 0 0 8px; font-size: 1.3rem; overflow-wrap: anywhere; }
.download-book-summary p { margin: 8px 0; overflow-wrap: anywhere; }
.download-support { margin-block: 32px 24px; color: var(--muted); }
.book-download-ad { border-block: 1px solid var(--line); padding-block: 20px; text-align: center; }
.download-ad-label { font-size: .75rem; letter-spacing: .08em; color: var(--muted); margin: 0 0 16px; }
.book-ad-space { min-height: 100px; display: flex; justify-content: center; }
.book-ad-status { min-height: 40px; font-size: .8125rem; color: var(--muted); margin: 16px 0 0; }
/* Stable ad space and generous separation prevent accidental ad/button taps. */
.download-delivery { margin-top: 80px; padding-top: 24px; border-top: 1px solid var(--line); }
.download-delivery > h2 { font-size: 1.25rem; }
.download-delivery > p { max-width: 60ch; }
.download-delivery > .book-button { margin-top: 16px; }
.book-download-wait { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.download-delivery > .book-button[aria-disabled="true"] { background: var(--leaf); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.download-delivery > .book-back { display: block; width: fit-content; margin-top: 24px; }
@media (max-width: 360px) { .download-book-summary { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; } .download-book-summary .book-cover { width: 64px; } }
@keyframes shelf-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
