* { box-sizing: border-box }
:root { color-scheme: light; color: #322c24; font: 17px/1.58 Baskerville, Georgia, serif; background: #262d2a }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 50% 12%, #445049, transparent 85%) }
a, summary { color: inherit; text-underline-offset: .22em }
:focus-visible { outline: 2px solid #ab8140; outline-offset: 3px }
.rail, .turns { max-width: 1120px; margin: auto; display: flex; align-items: center; justify-content: space-between; color: #f2e5c8; padding: 14px 8px; gap: 12px }
.rail a, summary, .turns a { padding: 8px; cursor: pointer }
main, .rail { width: min(97%, 1140px); margin: auto }
#contents { position: relative; z-index: 3 }
#contents ol { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); min-width: min(80vw, 340px); margin: 0; border: 1px solid #968160; padding: 18px 24px 18px 46px; background: #f4ecd8; color: #302d26; box-shadow: 0 9px 28px #1115 }
#contents li a { display: block; padding: 4px }
.binding { min-height: 63vh; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; padding: 8px; background: #683e30; border: 2px solid #392820; border-radius: 8px; box-shadow: 0 5px #c4b594,0 7px #6f624b,0 9px #4e3426,0 20px 55px #12171170 }
.leaf, #book-status { --fold: 90deg; margin: 0; min-width: 0; min-height: min(680px,76vh); display: flex; flex-direction: column; padding: clamp(22px,3.4vw,50px); background: linear-gradient(var(--fold), #6c522737,transparent 7%, transparent 97%,#7c603719), url('binding/rag-paper.webp') }
.leaf.verso, .title-leaf { --fold: 270deg; border-right: 1px solid #827559 }
.leaf[hidden], [hidden], .turns[hidden] { display: none }
.title-leaf { align-items: center; justify-content: center; text-align: center; gap: 12px }
.title-leaf img { height: auto; max-width: 38%; border-radius: 2px; box-shadow: 4px 5px 7px #332a243d }
h1 { margin: 8px 0 0; font-weight: 400; font-size: clamp(32px,4vw,58px); line-height: 1.03 }
.byline { margin: 0; font-style: italic }
.title-rule { width: 42%; height: 4px; margin: 16px; border-block: 1px solid #99845d }
.running, .folio { font-variant: small-caps; color: #63553f; text-align: center }
.running { border-bottom: 1px solid #af9b75; letter-spacing: .07em; padding-bottom: 8px; margin: 0 0 20px; font-size: .84rem }
.folio { margin: auto 0 0; padding-top: 18px; font-size: .85rem }
.prose { overflow-wrap: anywhere; font-size: 1.05rem }
.prose h2, .prose h3, .chapter-title { font-weight: normal; line-height: 1.15; margin: .6em 0 }
.chapter-title { font-size: clamp(26px,3vw,43px); margin: .2em 0 .6em }
.prose p { margin: .7em 0 }
.prose .post-anchor { display: none }
.prose figure { margin: 1em 0 }
.prose video,.prose img,.prose svg,.prose iframe { max-width: 100%; height: auto }
.prose figcaption { font-size: .85rem; font-style: italic }
.prose pre,.math-display,.post-table { overflow: auto; max-width: 100% }
.prose code { font-size: .78em }
.prose table { font-size: .85rem; border-collapse: collapse }
.prose td,.prose th { padding: .35em; border-bottom: 1px solid #b8ab8d; text-align: left }
.turns { padding-block: 20px }
.turns a[aria-disabled=true] { opacity: .45; cursor: default }
#place { font-size: .93rem; text-align: center }
.binding { position: relative; overflow: hidden; background: #e6d7b6; border: 7px solid #613d31; padding: 1px }
.turning-sheet { position:absolute; inset:1px; width:calc(100% - 2px); height:calc(100% - 2px); pointer-events:none }
@media (max-width:760px) {
 .binding { grid-template-columns: minmax(0,1fr); padding: 4px }
 .leaf { padding: 20px clamp(16px,5vw,38px); border-right: none }
 .rail,.turns { padding-inline: 0; font-size: .93rem }
}
