:root { --paper:#f3e8d1; --deep:#e7d6b4; --ink:#3d2a1e; --soft:#6b5040; --red:#8c3d31; --gold:#a8762f; --line:#cdb588; --read:1.3rem;
  --display:'Palatino Linotype',Palatino,'Iowan Old Style','Book Antiqua',Georgia,serif; }
:root[data-dim=true] { --paper:#17130f; --deep:#221a13; --ink:#d9b48a; --soft:#b59170; --red:#d08c6b; --gold:#b98d4f; --line:#4a3826 }
:root[data-size="0"] { --read:1.1rem } :root[data-size="2"] { --read:1.55rem } :root[data-size="3"] { --read:1.85rem } :root[data-size="4"] { --read:2.2rem }
* { box-sizing:border-box }
body { margin:0; background-color:var(--paper); color:var(--ink); font-family:Georgia,'Iowan Old Style',serif; line-height:1.5; overflow-wrap:break-word; overflow-x:hidden;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .28 0 0 0 0 .14 0 0 0 .28 -.06'/%3E%3C/filter%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.01' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .42 0 0 0 0 .2 0 0 0 .3 -.12'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)'/%3E%3Crect width='400' height='400' filter='url(%23b)'/%3E%3C/svg%3E"); }
main { max-width:38rem; margin:0 auto; padding:0 24px calc(120px + env(safe-area-inset-bottom)); outline:none }
main > h1:first-child { padding-top:calc(40px + env(safe-area-inset-top)) }
h1,h2,h3 { font-family:var(--display); font-weight:600; line-height:1.15; text-wrap:balance }
h1 { font-size:2.2rem; margin:0 0 .4em }
h2 { font-size:1.55rem; color:var(--red); margin:0 0 .7em; text-align:center; font-style:italic; font-weight:500 }
h3 { font-size:1.25rem; margin:0 0 .25em }
.meta { color:var(--soft); margin:0 0 .6em; font-size:1rem; font-style:italic }
img { display:block; width:100%; height:100%; object-fit:cover }
:root[data-dim=true] img { filter:brightness(.72) sepia(.22) }

/* Cover and opening picture melt into the paper. */
.cover, article > .pic:first-child { position:relative; margin:0 -24px 28px; aspect-ratio:1; max-height:78vh }
.cover img, article > .pic:first-child img { -webkit-mask:linear-gradient(#000 80%,transparent); mask:linear-gradient(#000 80%,transparent) }
.cover .title { position:absolute; inset:0; padding:calc(30px + env(safe-area-inset-top)) 24px 0; text-align:center; color:#fff0cf; text-shadow:0 2px 14px #0b1030,0 0 3px #0b1030 }
.cover h1 { margin:0; font-size:clamp(2.9rem,15vw,4.8rem); font-weight:500; letter-spacing:-.02em; line-height:.95 }
.cover h1 small { display:block; font-size:.38em; font-style:italic; letter-spacing:.02em; margin-bottom:.25em }
.cover p { margin:0 0 10px; font-style:italic; font-size:1.05rem }
.ornament { text-align:center; color:var(--gold); font-size:1.7rem; line-height:1; margin:1.5em 0 .7em }

.plate { display:block; color:inherit; text-decoration:none }
.plate .pic { aspect-ratio:1 } .plate .words { text-align:center; padding:16px 8px 0 } .plate h3 { font-size:1.75rem }
.row { display:flex; align-items:center; gap:18px; padding:14px 0; color:inherit; text-decoration:none }
.row .pic { flex:0 0 104px; height:104px; margin:0 }
.row .meta, .plate .meta { margin:0 }
/* Pictures: uneven painted edge, like a wash laid inside pencil lines. */
.plate .pic, .row .pic, article .pic:not(:first-child) { border-radius:10px 14px 9px 13px; overflow:hidden; box-shadow:0 1px 0 var(--line),0 10px 26px -14px #3d2a1ecc }
article .pic:not(:first-child) { aspect-ratio:1; margin:2em 0 }

article h1 { text-align:center; font-size:2.35rem }
article > .ornament:first-of-type { margin-top:.4em }
article h2 { font-size:calc(var(--read) * 1.3) }
.line { font-size:var(--read); line-height:1.62; margin:0 0 .85em; scroll-margin-top:16px }
article > .ornament + .line::first-letter { font-family:var(--display); font-size:2.5em; line-height:1; color:var(--red) }
.lesson { margin-top:3em; padding:8px 0 0; text-align:center; border-top:1px solid var(--line) } .lesson h2 { margin-top:1.2em }
.lesson p:not(.meta) { font-size:var(--read); text-align:left } .lesson blockquote { font-family:var(--display); font-size:calc(var(--read) * 1.15); font-style:italic; line-height:1.4 }
blockquote { margin:0 0 .5em }

button, input, select { font:inherit; color:inherit }
#bar { position:fixed; inset:auto 0 0; z-index:2; display:flex; justify-content:center; padding:6px 8px calc(6px + env(safe-area-inset-bottom)); background:var(--deep); border-top:1px solid var(--line) }
#bar[hidden] { display:none }
#bar button { flex:1 1 0; max-width:120px; min-width:0; min-height:62px; padding:4px 0; display:grid; place-content:center; justify-items:center; gap:2px; background:none; border:0; border-radius:16px; cursor:pointer; touch-action:manipulation }
#bar svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round }
#bar span { font-size:.82rem } #bar [aria-pressed=true] { color:var(--red) } #bar [aria-pressed=true] svg { fill:currentColor }
form { display:grid; gap:20px } label { display:grid; gap:4px; font-family:var(--display); font-size:1.15rem } label .meta { font-size:.95rem; margin:0 }
input:not([type=checkbox]), select { min-height:54px; padding:0 4px; width:100%; background:transparent; border:0; border-bottom:2px solid var(--gold); border-radius:0; font-size:1.25rem }
option { color:#3d2a1e; background:#f3e8d1 }
.check { display:flex; align-items:center; gap:14px } .check input { width:28px; height:28px; flex:none; accent-color:var(--red) }
form button, .hold { min-height:64px; padding:0 20px; border:0; border-radius:32px; background:#8c3d31; color:#fff0d6; font-family:var(--display); font-size:1.25rem; cursor:pointer }
:root[data-dim=true] :is(form button, .hold) { background:#5c2c23; color:#ecc9a0 }
.hold { width:100%; min-height:110px; user-select:none; -webkit-user-select:none; touch-action:none } .hold.on { opacity:.75 }
:focus-visible { outline:3px solid var(--red); outline-offset:2px } main:focus-visible { outline:none }
@media (min-width:640px) { .cover, article > .pic:first-child { margin-inline:0 } }
