/* Manuscript — PHP edition stylesheet */

:root {
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink: #241f1a;
  --ink-soft: #5b5248;
  --ink-faint: #8b8073;
  --oxblood: #7a2e26;
  --line: #d8cdb9;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: #f3ecdf;
  background-image:
    radial-gradient(1100px 600px at 12% -8%, #fdf9f1 0%, transparent 60%),
    radial-gradient(900px 500px at 92% 6%, #f0e4d1 0%, transparent 55%),
    linear-gradient(180deg, #f6f0e4 0%, #efe6d6 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.reading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; background: #f3e9d8; padding: .1em .3em; border-radius: 3px; }
.hidden { display: none !important; }
.italic { font-style: italic; }
.accent { color: var(--oxblood); }
.muted { color: #6b5f50; }
.small { font-size: .84rem; line-height: 1.65; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.rule { height: 1px; background: linear-gradient(90deg, transparent, #cdbfa8, transparent); margin: 1rem 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.stack-xs { display: flex; flex-direction: column; gap: .5rem; }
.stack-sm { display: flex; flex-direction: column; gap: .7rem; }
.stack-md { display: flex; flex-direction: column; gap: 1.4rem; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap-xs { gap: .3rem; }
.gap-sm { gap: .5rem; }
.gap-md { gap: 1rem; }
.align-end { align-items: flex-end; }
.space-between { justify-content: space-between; }
.two-col { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.two-col.tight { gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .two-col { grid-template-columns: 1.02fr .98fr; }
  .two-col.tight { grid-template-columns: 1fr 1fr; }
  .two-col.wide-left { grid-template-columns: 1.08fr .92fr; align-items: start; }
}

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid rgba(217, 203, 180, .85); background: rgba(248, 242, 230, .75); backdrop-filter: blur(6px); }
.site-head-inner { max-width: 1120px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: .65rem; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; letter-spacing: -.01em; }
.brand-sub { font-size: .6rem; letter-spacing: .28em; text-transform: uppercase; color: #a08e76; }
.site-nav { display: flex; gap: .5rem; align-items: center; }

/* ---------- type ---------- */
.eyebrow { font-size: .62rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: #a08e76; }
.link-quiet { color: #8a7a63; display: inline-block; }
.link-quiet:hover { color: #5d4a2f; }
.title-lg { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.1rem); line-height: 1.15; }
.title-md { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; }
.title-sm { font-family: var(--serif); font-size: 1.1rem; }
.meta { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: #a08e76; margin-top: .35rem; }

/* ---------- surfaces & controls ---------- */
.surface {
  background: linear-gradient(165deg, #fffdf8 0%, #fbf6ec 100%);
  border: 1px solid #e0d5c2;
  box-shadow: 0 1px 0 #fff inset, 0 18px 40px -32px rgba(60, 44, 28, .5);
  border-radius: .55rem;
}
.panel { padding: 1.5rem; }
.label { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #8a7c69; margin-bottom: .35rem; }
.field {
  width: 100%; border-radius: .5rem; border: 1px solid #d9cdb9; background: #fffdf8;
  padding: .62rem .8rem; font-size: .92rem; color: var(--ink); outline: none;
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.field::placeholder { color: #a89a88; }
.field:focus { border-color: #b08a6a; box-shadow: 0 0 0 3px rgba(176, 138, 106, .18); }
textarea.field { resize: vertical; line-height: 1.6; }
.title-field { font-family: var(--serif); font-size: 1.1rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: .5rem; padding: .6rem 1rem; font-size: .82rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  font-family: inherit; line-height: 1.2;
}
.btn-primary { background: linear-gradient(180deg, #86382e, #6c2a22); color: #fdf6ec; }
.btn-primary:hover { background: linear-gradient(180deg, #75302a, #5b221b); }
.btn-ghost { background: #fffdf8; border-color: #d8cbb6; color: #4d4438; }
.btn-ghost:hover { border-color: #bfa88a; background: #fbf5e9; }
.btn-quiet { background: transparent; color: #6a5f51; padding: .3rem .55rem; font-size: .75rem; }
.btn-quiet:hover { background: #efe4d2; }
.btn-quiet.danger, .danger { color: #93362b; }
.btn-danger { background: #fdf4f1; border-color: #e2c6bf; color: #93362b; }
.btn-danger:hover { background: #fbe9e4; }
.btn-sm { padding: .45rem .8rem; font-size: .75rem; }
.btn-xs { padding: .3rem .6rem; font-size: .7rem; }
.btn-block { width: 100%; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid #dccfb9; background: #fbf6ea; padding: .15rem .55rem; font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #7b6c58; }
.alert { border-radius: .4rem; padding: .55rem .8rem; font-size: .8rem; margin: 1rem 0; }
.alert-error { border: 1px solid #e2c6bf; background: #fdf4f1; color: #93362b; }
.alert-ok { border: 1px solid #cfe0cd; background: #f2f8f0; color: #3c6b3a; }
.note { margin-top: 1rem; border: 1px solid #e4d8c3; background: #fbf6ea; color: #7a6b58; border-radius: .4rem; padding: .6rem .8rem; font-size: .74rem; line-height: 1.6; }
.status { color: #5d7a55; }
.status.dirty { color: #a0714f; }
.status.error { color: #93362b; }
.file-btn { position: relative; overflow: hidden; text-align: center; cursor: pointer; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.check { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid #e4d8c3; background: #fbf6ea; border-radius: .4rem; padding: .6rem .75rem; font-size: .78rem; color: #6b5f50; line-height: 1.5; }
.check input { margin-top: .2rem; accent-color: var(--oxblood); }
.summary { cursor: pointer; font-family: var(--serif); font-size: 1.05rem; }

/* ---------- home ---------- */
.hero { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) { .hero { grid-template-columns: 1.08fr .92fr; } }
.hero-title { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -.015em; margin-top: 1.1rem; }
.hero-copy { margin-top: 1.4rem; max-width: 38rem; font-size: .98rem; line-height: 1.75; color: #5c5145; }
.mock-page { position: relative; justify-self: center; width: min(100%, 400px); padding: 2rem 1.9rem; border-radius: .55rem; border: 1px solid #e0d5c2; background: linear-gradient(165deg, #fffdf8, #fbf6ec); text-align: center; box-shadow: 0 18px 40px -32px rgba(60, 44, 28, .5); }
.mock-title { font-family: var(--serif); font-size: 1.75rem; line-height: 1.15; margin-top: .7rem; }
.mock-sub { font-family: var(--serif); font-style: italic; color: #7a6d5c; font-size: .9rem; margin-top: .25rem; }
.mock-orn { letter-spacing: .5em; color: #b7a488; font-size: .65rem; margin: 1.2rem 0; }
.mock-lines { display: flex; flex-direction: column; gap: .55rem; border-top: 1px solid #e4d8c3; padding-top: 1.3rem; }
.mock-lines i { height: 6px; border-radius: 3px; background: #e9dfcd; }
.mock-lines i:nth-child(2), .mock-lines i:nth-child(3) { width: 95%; }
.mock-lines i:nth-child(4) { width: 70%; }
.mock-lines i:nth-child(6) { width: 45%; }
.mock-foot { display: flex; justify-content: space-between; margin-top: 1.2rem; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: #a08e76; }
.shelf { margin-top: 4rem; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid rgba(217, 203, 180, .85); padding-bottom: .75rem; gap: 1rem; }
.empty { margin-top: 1.5rem; padding: 3rem 1.5rem; text-align: center; }
.empty .title-md { margin-top: .8rem; }
.empty .muted { max-width: 30rem; margin: .8rem auto 1.6rem; }
.book-grid { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .book-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1060px) { .book-grid { grid-template-columns: 1fr 1fr 1fr; } }
.book-card { padding: 1.2rem; }
.thumb { display: flex; align-items: center; justify-content: center; width: 86px; height: 128px; flex: 0 0 auto; overflow: hidden; border: 1px solid #ddd0bb; border-radius: 2px 6px 6px 2px; background: linear-gradient(160deg, #f4ead8, #e8dbc4); text-align: center; box-shadow: 0 10px 22px -16px rgba(60, 44, 28, .8); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { font-family: var(--serif); font-size: .7rem; line-height: 1.25; color: #6b5b48; padding: 0 .4rem; }
.card-title { font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-foot { margin-top: 4rem; border-top: 1px solid rgba(217, 203, 180, .85); padding-top: 1.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .72rem; color: #94836c; }

/* ---------- studio ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid rgba(217, 203, 180, .85); padding-bottom: 1.1rem; margin-bottom: 1.5rem; }
.page-head .title-lg { margin-top: .5rem; }
.stats { display: flex; gap: 1rem; text-align: center; margin-right: .5rem; }
.stats b { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.stats span { font-size: .54rem; text-transform: uppercase; letter-spacing: .16em; color: #a08e76; }
.steps { margin: 1rem 0 0; padding-left: 1.1rem; color: #5c5145; font-size: .86rem; line-height: 1.7; }
.steps li { margin-bottom: .7rem; }
.bullets { margin: 1rem 0 0; padding-left: 1.1rem; }
.bullets li { margin-bottom: .5rem; }
.empty-note { margin-top: 1rem; border: 1px dashed #d9cbb4; background: #fdf9f0; border-radius: .4rem; padding: 1.4rem; text-align: center; font-family: var(--serif); font-style: italic; font-size: .9rem; color: #8a7a63; }
.chapter-list { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid #ece2d1; border-bottom: 1px solid #ece2d1; }
.chapter-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: .8rem 0; border-bottom: 1px solid #ece2d1; }
.chapter-list li:last-child { border-bottom: 0; }
.chapter-index { width: 1.5rem; font-size: .68rem; letter-spacing: .16em; color: #a08e76; }
.chapter-link { font-family: var(--serif); font-size: 1.02rem; color: #33291f; }
.chapter-link:hover { color: var(--oxblood); }
.cover-row { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-top: 1rem; }
.cover-col { width: 110px; flex: 0 0 auto; display: flex; flex-direction: column; gap: .4rem; }
.cover-frame { width: 110px; height: 156px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #d9cbb4; border-radius: 2px 6px 6px 2px; background: linear-gradient(160deg, #f4ead8, #e8dbc4); box-shadow: 0 12px 24px -18px rgba(60, 44, 28, .9); }
.cover-frame img { width: 100%; height: 100%; object-fit: cover; }
.cover-frame span { font-family: var(--serif); font-size: .7rem; line-height: 1.3; color: #7a6b58; padding: 0 .5rem; text-align: center; }
.cover-col form { width: 100%; }
.cover-col .field, .cover-col .btn { font-size: .68rem; padding: .35rem .5rem; }

/* ---------- editor ---------- */
.editor-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .editor-grid { grid-template-columns: 1fr 320px; align-items: start; } }
.chapter-title-input {
  width: 100%; border: 0; border-bottom: 1px solid transparent; background: transparent;
  font-family: var(--serif); font-size: 1.8rem; color: #2c241b; outline: none; padding: .2rem 0;
}
.chapter-title-input:focus { border-bottom-color: #d9cbb4; }
.manuscript {
  width: 100%; min-height: 58vh; margin-top: .9rem; resize: vertical;
  font-family: var(--serif); font-size: 1.06rem; line-height: 1.85; color: #2c2620;
  background: #fffdf8; border: 1px solid #ddd0bb; border-radius: .5rem; padding: 1.5rem 1.6rem; outline: none;
}
.manuscript:focus { border-color: #b08a6a; box-shadow: 0 0 0 3px rgba(176, 138, 106, .16); }
.editor-meta { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: #a08e76; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; max-height: 260px; overflow-y: auto; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid #ece2d1; }
.gallery-item { padding: 0; overflow: hidden; cursor: pointer; border: 1px solid #e0d4c0; border-radius: .4rem; background: #fdf9f0; text-align: left; font-family: inherit; }
.gallery-item:hover { border-color: #b08a6a; }
.gallery-item img { width: 100%; height: 76px; object-fit: cover; }
.gallery-item span { display: block; padding: .25rem .35rem; font-size: .6rem; color: #8a7a63; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- reader ---------- */
.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.3rem; }
.reader-shell { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; background: radial-gradient(900px 500px at 50% -16%, #fdf8ee, transparent 62%), linear-gradient(180deg, #e9dfcc, #e2d6c0); }
.reader-head { border-bottom: 1px solid rgba(217, 203, 180, .85); background: rgba(248, 242, 230, .88); backdrop-filter: blur(6px); }
.reader-head-inner { max-width: 1180px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: .8rem; padding: .65rem 1rem; }
.reader-title { flex: 1 1 auto; min-width: 0; text-align: center; }
.reader-title span { display: block; font-family: var(--serif); font-size: .98rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-title small { display: block; font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: #94836c; margin-top: .1rem; }
.book-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: .75rem 1rem; overflow: hidden; position: relative; }
.book-wrap { position: relative; perspective: 1600px; }
.book-spread { display: flex; }
.paper-page {
  position: relative; overflow: hidden; flex: 0 0 auto;
  border-radius: 4px 10px 10px 4px;
  background: linear-gradient(90deg, rgba(255,255,255,.9), #fdfaf3 12%, #fbf6ec 100%);
  box-shadow: 0 26px 50px -28px rgba(56, 40, 24, .55), 0 2px 6px rgba(56, 40, 24, .14), 0 0 0 1px rgba(174, 155, 126, .35);
  animation: leaf-in 420ms cubic-bezier(.22,.75,.25,1) both;
  transform-origin: left center;
}
.paper-page::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background-image: radial-gradient(rgba(120,98,68,.055) 1px, transparent 1px); background-size: 3px 3px; opacity: .55; pointer-events: none; }
.paper-page.blank { background: #fbf6ec; }
@keyframes leaf-in { from { opacity: 0; transform: translateX(14px) rotateY(-4deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .paper-page { animation: none; } }
.book-page-body { position: absolute; overflow: hidden; }
.book-text { font-family: var(--serif); color: #2b241c; font-kerning: normal; text-rendering: optimizeLegibility; }
.book-text p { margin: 0; text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; orphans: 2; widows: 2; }
.book-text p.book-para { text-indent: 1.45em; }
.book-text p.book-para--no-indent { text-indent: 0; }
.book-text p.book-para--cont { text-indent: 0; text-align-last: justify; }
.book-text p.book-para--first { text-indent: 0; }
.book-text p.book-para--first::first-letter { font-size: 3.05em; line-height: .82; float: left; padding: .04em .09em 0 0; font-weight: 600; color: #574636; }
.measure-page { display: flow-root; }
.measure-host { position: absolute; left: -99999px; top: 0; visibility: hidden; overflow: hidden; pointer-events: none; }
.book-text .chapter-head { text-align: center; margin: 0 0 1.25em; }
.book-text .book-eyebrow { display: block; font-family: var(--sans); font-size: .62em; letter-spacing: .3em; text-transform: uppercase; color: #8d7c65; margin-bottom: .5em; }
.book-text .chapter-head h2 { font-size: 1.42em; line-height: 1.22; font-weight: 600; margin: 0; color: #2a231b; }
.book-text .chapter-rule { width: 36px; height: 1px; background: #bda98b; margin: .9em auto 0; }
.book-text .book-illustration { margin: .85em 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-text .book-illustration img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 8px 20px -14px rgba(52, 38, 22, .85); }
.book-text .scene-break { text-align: center; letter-spacing: .5em; color: #a7957c; margin: 1em 0; font-size: .82em; }
.book-text .title-page-inner { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.book-text .book-cover { display: block; width: auto; max-width: 68%; max-height: 46%; object-fit: cover; border-radius: 2px 6px 6px 2px; box-shadow: 0 12px 26px -16px rgba(56,40,24,.75), 0 0 0 1px rgba(150,128,98,.45); margin: 0 auto .8rem; }
.book-text .book-title { font-family: var(--serif); font-size: 2.1em; line-height: 1.15; margin: .4em 0 .25em; font-weight: 600; color: #2a231b; }
.book-text .book-subtitle { font-style: italic; font-size: .95em; color: #5d5142; }
.book-text .book-ornament { font-size: .72em; letter-spacing: .5em; color: #ac9a80; margin: 1.2em 0; }
.book-text .book-author { font-family: var(--sans); font-size: .68em; letter-spacing: .24em; text-transform: uppercase; color: #4f4536; }
.page-furniture { position: absolute; left: 0; right: 0; z-index: 2; font-family: var(--sans); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: #8b7d69; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2rem; pointer-events: none; }
.page-furniture.top { top: 14px; }
.page-furniture.bottom { bottom: 14px; letter-spacing: .12em; }
.page-turn { position: absolute; top: 0; bottom: 0; width: 12%; border: 0; background: transparent; cursor: pointer; z-index: 3; opacity: 0; transition: opacity .18s, background .18s; }
.book-wrap:hover .page-turn { opacity: .5; }
.page-turn:hover { opacity: 1; background: linear-gradient(90deg, rgba(120,96,66,.08), transparent); }
.page-turn-left { left: 0; }
.page-turn-right { right: 0; background: linear-gradient(270deg, rgba(120,96,66,.08), transparent); }
.reader-foot { border-top: 1px solid rgba(217, 203, 180, .85); background: rgba(248, 242, 230, .88); backdrop-filter: blur(6px); }
.reader-foot-inner { max-width: 1180px; margin: 0 auto; padding: .7rem 1rem .8rem; }
.reader-progress { height: 3px; border-radius: 999px; background: #d9cbb4; overflow: hidden; }
.reader-progress span { display: block; height: 100%; width: 2%; background: linear-gradient(90deg, #9a4535, #7a2e26); transition: width .32s; }
.reader-controls { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .55rem; }
.page-label { text-align: center; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #8a7a63; }
.page-label .words { display: none; }
@media (min-width: 640px) { .page-label .words { display: inline; } }
.toc-overlay { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: flex-end; background: rgba(42, 33, 24, .3); backdrop-filter: blur(3px); }
.toc-backdrop { position: absolute; inset: 0; border: 0; background: transparent; cursor: default; }
.toc-panel { position: relative; z-index: 2; width: min(340px, 88vw); height: 100%; display: flex; flex-direction: column; padding: 1.25rem; background: #fdfaf2; border-left: 1px solid #ddd0bb; box-shadow: -30px 0 60px -30px rgba(48,34,20,.55); overflow: hidden; }
.toc-title { font-family: var(--serif); font-size: 1.15rem; margin-top: .8rem; }
.toc-list { flex: 1 1 auto; overflow-y: auto; margin: 0 -0.2rem; }
.toc-item { display: flex; width: 100%; align-items: baseline; gap: .7rem; padding: .5rem .55rem; border: 0; background: transparent; border-radius: .4rem; text-align: left; font-family: inherit; font-size: .86rem; color: #3d352b; cursor: pointer; }
.toc-item:hover { background: #f3e9d8; }
.toc-item.active { background: #f0e3cf; color: #60291f; }
.toc-item .num { width: 1.5rem; flex: 0 0 auto; font-size: .66rem; letter-spacing: .14em; color: #a4947d; text-transform: uppercase; }
.toc-item .label { flex: 1 1 auto; font-family: var(--serif); font-size: .95rem; line-height: 1.3; margin: 0; text-transform: none; letter-spacing: 0; font-weight: 400; color: inherit; }
.toc-item .page { font-size: .66rem; color: #a4947d; }

@media (max-width: 520px) {
  .wrap { padding: 1.75rem 1rem 3rem; }
  .panel { padding: 1.2rem; }
  .stats { display: none; }
  .reader-title small { display: none; }
  .reader-head-inner, .reader-foot-inner { padding-left: .7rem; padding-right: .7rem; }
  .reader-head .btn, .reader-foot .btn { padding: .45rem .6rem; font-size: .7rem; }
}
