/* Cuốn nhật ký đảo Síp – trang chủ dạng sách */
.home-book { background: #FEF9E8; }
.book-main { padding: clamp(1rem, 3vw, 2rem) 0 2.5rem; }
.book-stage { display: flex; justify-content: center; }
.book { --paper: #FEF9E8; --ink: #2C2B19; --line: rgba(44,43,25,.16); --ink-soft: #5B5A37; --accent: #592148; position: relative; }
.page { position: relative; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-sizing: border-box; }
.page-inner { position: relative; box-sizing: border-box; padding: 2.2rem 2rem 2.6rem; display: flex; flex-direction: column; font-family: var(--font-body); font-size: 1.1rem; line-height: 1.55; }
.page .shade { display: none; }
.js-only { display: none; }

/* ---------- Typo chung trong trang ---------- */
.page .eyebrow { font-family: var(--font-ui); font-size: .62em; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .9em; }
.page .rule { display: block; width: 3.2em; height: 1px; background: var(--accent); opacity: 1; margin: .9em 0 1em; }
.page .page-title { font-size: 1.9em; line-height: 1.12; margin: 0 0 .7em; font-weight: 500; }
.page .page-title a { text-decoration: none; }
.page .page-title a:hover { text-decoration: underline; }
.page .chapter-title { font-size: 3.1em; line-height: 1; margin: 0; font-weight: 400; }
.page .chapter-label { font-style: italic; font-size: 1.15em; margin: 0 0 .5em; }
.page .chapter-intro { margin: 0 0 1em; color: var(--ink-soft); font-size: .95em; }
.page .chapter-photo { margin: auto 0 0; flex: 1 1 auto; min-height: 6em; overflow: hidden; border: 1px solid var(--line); }
.page .chapter-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page .folio { position: absolute; bottom: 1.1rem; margin: 0; font-family: var(--font-ui); font-size: .62em; letter-spacing: .18em; color: var(--ink-soft); }
.page .folio-l { left: 2rem; } .page .folio-r { right: 2rem; }
.page .page-more { margin: .8em 0 0; font-family: var(--font-ui); font-size: .66em; letter-spacing: .16em; text-transform: uppercase; }
.page .page-more a::after { content: " →"; }

/* Bìa */
.page-cover, .page-back { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.page-cover .page-inner, .page-back .page-inner { padding: 1.1rem; height: 100%; }
.cover-frame { flex: 1; border: 1px solid rgba(254, 249, 232, .38); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.6em 1.4em; box-sizing: border-box; }
.cover-kicker { font-family: var(--font-ui); font-size: .6em; letter-spacing: .26em; text-transform: uppercase; margin: 0 0 1.6em; color: rgba(254, 249, 232, .8); }
.cover-avatar { display: block; width: 46%; max-width: 15rem; aspect-ratio: 1; margin: 0 auto 1.4em; }
.cover-avatar img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.cover-title { font-family: var(--font-head); font-size: 2.55em; line-height: 1.02; margin: 0; font-weight: 400; color: var(--paper); }
.cover-title span { display: block; }
.cover-title em { font-style: italic; }
.cover-title-sm { font-size: 2em; }
.cover-rule { display: block; width: 3.4em; height: 1px; background: var(--accent); margin: 1.1em auto; }
.cover-sub { font-style: italic; font-size: 1.15em; margin: 0 0 1.7em; color: rgba(254, 249, 232, .9); }
.cover-actions { display: flex; flex-direction: column; align-items: center; gap: .8em; }
.cover-open { display: inline-block; padding: .85em 2.2em; border: 1px solid var(--paper); color: var(--paper); text-decoration: none; font-family: var(--font-ui); font-size: .66em; letter-spacing: .22em; text-transform: uppercase; }
.cover-open:hover, .cover-open:focus-visible { background: var(--paper); color: var(--ink); }
.cover-skip, .back-again a { color: rgba(254, 249, 232, .8); font-family: var(--font-ui); font-size: .58em; letter-spacing: .18em; text-transform: uppercase; }
.page-cover a:focus-visible, .page-back a:focus-visible { outline-color: var(--paper); }
.back-text { font-style: italic; max-width: 22em; margin: 0 0 1.6em; color: rgba(254, 249, 232, .9); }

/* Lời mở đầu */
.page-open .page-inner { justify-content: center; }
.open-kicker { font-family: var(--font-ui); font-size: .62em; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 1.2em; color: var(--ink-soft); }
.page .open-title { font-size: 1.85em; line-height: 1.22; font-weight: 400; font-style: italic; margin: 0; }
.page-open .hint { font-family: var(--font-ui); font-size: .6em; letter-spacing: .08em; color: var(--ink-soft); line-height: 1.7; margin: 0; max-width: 24em; }

/* Mục lục */
.toc { list-style: none; margin: .4em 0 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { border-bottom: 1px solid var(--line); }
.toc-row { display: flex; align-items: baseline; gap: .7em; padding: .82em 0; text-decoration: none; color: var(--ink); }
.toc-num { font-family: var(--font-ui); font-size: .6em; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); width: 8.6em; flex: none; white-space: nowrap; }
.toc-title { font-size: 1.28em; }
.toc-leader { flex: 1; border-bottom: 1px solid var(--line); transform: translateY(-.25em); }
.toc-page { font-family: var(--font-ui); font-size: .62em; letter-spacing: .12em; color: var(--ink-soft); }
.toc-row:hover .toc-title, .toc-row:focus-visible .toc-title { text-decoration: underline; text-underline-offset: .18em; }
.toc-all { margin: 1.2em 0 0; font-family: var(--font-ui); font-size: .64em; letter-spacing: .16em; text-transform: uppercase; }

/* Về em */
.page-about .about-body { margin: 0 0 .75em; font-size: .97em; line-height: 1.5; }
.page-about .about-body:first-child::first-letter { font-size: 2.6em; float: left; line-height: .85; padding: .06em .08em 0 0; color: var(--accent); }

/* Bài trong chương */
.entries { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.entries li { border-bottom: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 4.4em 1fr; gap: 1em; padding: .75em 0; text-decoration: none; color: var(--ink); align-items: start; }
.entry-photo { display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.entry-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page .entry-title { font-size: 1.08em; line-height: 1.22; margin: 0 0 .25em; font-weight: 500; }
.entry-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .84em; line-height: 1.4; color: var(--ink-soft); }
.entry-meta { margin: .3em 0 0; font-family: var(--font-ui); font-size: .55em; letter-spacing: .14em; color: var(--ink-soft); }
.entry:hover .entry-title, .entry:focus-visible .entry-title { text-decoration: underline; text-underline-offset: .16em; }
.official-note { margin: .9em 0 0; font-size: .82em; line-height: 1.45; color: var(--ink-soft); font-style: italic; }

/* Lời cuối */
.page-closing .page-inner { justify-content: center; }
.closing-line { font-size: 1.6em; font-style: italic; line-height: 1.25; margin: 0 0 1em; }
.btn-book { display: inline-block; padding: .85em 1.8em; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font-family: var(--font-ui); font-size: .64em; letter-spacing: .2em; text-transform: uppercase; }
.btn-book:hover, .btn-book:focus-visible { background: transparent; color: var(--ink); }
.closing-cta { margin: 0 0 1.8em; }
.closing-ch { margin-top: 0; }
.closing-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.closing-links li { border-bottom: 1px solid var(--line); }
.closing-links a { display: block; padding: .6em 0; text-decoration: none; font-size: 1.05em; }
.closing-links a::after { content: "→"; float: right; font-family: var(--font-ui); font-size: .7em; opacity: .6; }
.closing-links a:hover { text-decoration: underline; }

/* Không JS: các trang xếp chồng, đọc như một cuốn sổ */
html:not(.js-book) .book { display: flex; flex-direction: column; gap: 1.5rem; width: min(40rem, calc(100vw - 2rem)); }
html:not(.js-book) .page-inner { min-height: 0; }
html:not(.js-book) .chapter-photo { flex: none; aspect-ratio: 4 / 3; }
html:not(.js-book) .page-cover .page-inner, html:not(.js-book) .page-back .page-inner { min-height: 30rem; }

/* ---------- Chế độ sách (có JS) ---------- */
.js-book .js-only { display: block; }
.js-book .book { perspective: 2200px; transform-style: preserve-3d; }
.js-book .page { position: absolute; top: 0; height: 100%; visibility: hidden; container-type: size; box-shadow: 0 1px 2px rgba(44, 43, 25, .08), 0 18px 40px -18px rgba(44, 43, 25, .35); backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; }
.js-book .page.is-shown, .js-book .page.is-turning, .js-book .page.is-under { visibility: visible; }
.js-book .page.is-turning { z-index: 5; will-change: transform; box-shadow: 0 16px 48px rgba(44, 43, 25, .3), 10px 0 28px rgba(44, 43, 25, .16); }
.js-book .page.is-left.is-turning { box-shadow: 0 16px 48px rgba(44, 43, 25, .3), -10px 0 28px rgba(44, 43, 25, .16); }
.js-book .page.is-turning::before { content: ""; position: absolute; top: 0; bottom: 0; width: 3px; z-index: 4; pointer-events: none; background: linear-gradient(to bottom, #F7F0D8, #E4D7B4 50%, #F7F0D8); }
.js-book .page.is-right.is-turning::before { left: 0; }
.js-book .page.is-left.is-turning::before { right: 0; }
.js-book .page-cover.is-turning::before, .js-book .page-back.is-turning::before { background: linear-gradient(to bottom, #3a3824, #2C2B19 50%, #3a3824); }
.js-book .page.is-shown { z-index: 2; }
.js-book .page.is-under { z-index: 1; }
.js-book .page-inner { height: 100%; font-size: clamp(14px, 2.55cqh, 20px); padding: 9cqh 9cqw 9cqh; overflow: hidden; }
.js-book .page .folio { bottom: 3.6cqh; }
.js-book .page .folio-l { left: 9cqw; } .js-book .page .folio-r { right: 9cqw; }
.js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 3.2cqh 3.6cqw; }
.js-book .page .shade { display: block; position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 3; overflow: hidden; background: linear-gradient(90deg, rgba(44, 43, 25, .42) 0%, rgba(44, 43, 25, .1) 20%, rgba(254, 249, 232, .22) 46%, rgba(44, 43, 25, .1) 72%, rgba(44, 43, 25, .34) 100%); }
.js-book .page .shade::after { content: ""; position: absolute; top: 0; bottom: 0; width: 32%; left: -32%; background: linear-gradient(90deg, transparent, rgba(254, 249, 232, .42), rgba(44, 43, 25, .1), transparent); opacity: 0; pointer-events: none; }
.js-book .page.is-turning .shade::after { animation: book-sheen .9s cubic-bezier(.45, .05, .2, 1) both; }
@keyframes book-sheen {
  0% { left: -32%; opacity: 0; }
  22% { opacity: .9; }
  55% { opacity: .45; }
  100% { left: 100%; opacity: 0; }
}
.js-book .book-controls { display: flex; }
.book-controls { justify-content: center; align-items: center; gap: 1.2rem; margin-top: 1.1rem; }
.book-controls[hidden] { display: none !important; }
.book-controls button { width: 44px; height: 44px; border: 1px solid rgba(44, 43, 25, .35); background: transparent; color: var(--ink); font-size: 1rem; cursor: pointer; border-radius: 0; }
.book-controls button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.book-controls button:disabled { opacity: .3; cursor: default; }
.bk-indicator { min-width: 15rem; text-align: center; margin: 0; font-family: var(--font-ui); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Toàn màn hình ---------- */
.endpaper { display: none; }
.js-book .home-book .book-main, .js-book body.book-page .book-main, .js-book .book-main { padding: 0; position: relative; }
.js-book .book-stage { display: block; }
html.js-book body.book-page { overflow: hidden; height: 100%; height: 100dvh; }
.js-book body.book-page .site-footer { display: none; }
.js-book .book { width: 100%; height: calc(100vh - var(--hdr, 64px)); height: calc(100dvh - var(--hdr, 64px)); perspective: 2000px; transform-style: preserve-3d; overflow: hidden; }
.js-book .page { border: 0; box-shadow: none; }
.js-book .page-inner { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(44, 43, 25, .25) transparent; }
.js-book .page .folio { position: absolute; }
/* thanh điều hướng mỏng nổi ở mép dưới */
.js-book .book-controls { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 20; margin: 0; gap: .5rem; padding: 3px; background: rgba(254, 249, 232, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: 1px solid rgba(44, 43, 25, .14); }
.js-book .book-controls button { width: 32px; height: 32px; border: 0; font-size: .9rem; }
.js-book .bk-indicator { min-width: 0; padding: 0 .6rem; font-size: .6rem; letter-spacing: .16em; white-space: nowrap; }
.js-book .book-hint { position: absolute; left: 50%; bottom: 50px; transform: translateX(-50%); z-index: 20; margin: 0; pointer-events: none; text-align: center; font-family: var(--font-ui); font-size: .68rem; font-weight: 400; letter-spacing: .04em; color: #5B5A37; white-space: nowrap; opacity: 1; transition: opacity .7s ease; width: max-content; max-width: calc(100% - 24px); padding: .32rem .75rem; background: rgba(254, 249, 232, .9); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: 1px solid rgba(44, 43, 25, .12); box-sizing: border-box; }
.js-book .book-hint.is-gone { opacity: 0; }
.js-book .book-hint .hint-narrow { display: none; }

/* Hai trang (máy tính) */
@media (min-width: 900px) {
  .js-book .page { width: 50%; }
  .js-book .page.is-left { left: 0; transform-origin: right center; }
  .js-book .page.is-right { left: 50%; transform-origin: left center; }
  .js-book .page-inner { font-size: clamp(17px, 2.3cqh, 20px); padding: 8.5cqh 13cqw 11cqh; }
  .js-book .page .folio { bottom: 4.2cqh; }
  .js-book .page .folio-l { left: 13cqw; } .js-book .page .folio-r { right: 13cqw; }
  .js-book .page.is-left .page-inner { background: linear-gradient(to left, rgba(44, 43, 25, .13), rgba(44, 43, 25, 0) 6%); }
  .js-book .page.is-right:not(.page-cover):not(.page-back) .page-inner { background: linear-gradient(to right, rgba(44, 43, 25, .13), rgba(44, 43, 25, 0) 6%); }
  .js-book .page.is-left { cursor: w-resize; } .js-book .page.is-right { cursor: e-resize; }
  .js-book .page a, .js-book .page button { cursor: pointer; }
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 3.4cqh 3.6cqw; font-size: clamp(17px, 2.3cqh, 21px); }
  .js-book .cover-avatar { width: 40%; max-width: 17rem; }
  .js-book .chapter-photo { min-height: 10em; }
  /* trang lót bên trái khi sách còn đóng */
  .js-book .endpaper { display: block; position: absolute; left: 0; top: 0; width: 50%; height: 100%; z-index: 0; background: var(--ink); overflow: hidden; }
  .js-book .endpaper img { width: 100%; height: 100%; object-fit: cover; opacity: .55; display: block; }
  .js-book .endpaper-note { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; margin: 0; color: var(--paper); font-family: var(--font-head); font-style: normal; font-size: clamp(1.2rem, 2vw, 1.6rem); letter-spacing: .02em; }
  .js-book .endpaper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, rgba(0,0,0,.35), rgba(0,0,0,0) 8%); }
}
/* Một trang (điện thoại) */
@media (max-width: 899.98px) {
  .js-book .book { perspective: 1600px; }
  .js-book .page { left: 0; width: 100%; transform-origin: left center; }
  .js-book .page.is-turning::before { left: 0; }
  .js-book .page-inner { font-size: clamp(16px, 4.4cqw, 19px); padding: 6cqh 8cqw 72px; -webkit-overflow-scrolling: touch; }
  .js-book .page .folio { position: static; margin-top: auto; padding-top: 1.2em; text-align: right; }
  .js-book .page .chapter-photo { min-height: 11em; }
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 14px 14px 62px; }
  .js-book .book-controls { left: 12px; right: 12px; transform: none; justify-content: space-between; }
  .js-book .bk-indicator { overflow: hidden; text-overflow: ellipsis; }
  .js-book .book-hint { left: 50%; right: auto; bottom: 50px; transform: translateX(-50%); white-space: nowrap; font-size: .6rem; padding: .28rem .65rem; }
  .js-book .book-hint .hint-wide { display: none; }
  .js-book .book-hint .hint-narrow { display: inline; }
}

/* Màn hình thấp hoặc điện thoại nằm ngang: thu gọn bìa và lề để khỏi tràn */
@media (max-height: 700px) and (min-width: 900px) {
  .js-book .cover-avatar { width: 30%; max-width: 11rem; margin-bottom: .8em; }
  .js-book .cover-title { font-size: 2.1em; }
  .js-book .page-inner { padding-top: 6cqh; padding-bottom: 10cqh; }
  .js-book .book-hint { bottom: 44px; }
}
@media (max-width: 899.98px) and (max-height: 520px) {
  .js-book .book-hint { display: none; } /* thanh điều hướng đã đủ; tránh che nút Mở sách */
  .js-book .book-controls { left: 50%; right: auto; bottom: 8px; transform: translateX(-50%); justify-content: center; width: max-content; max-width: calc(100% - 16px); }
  .js-book .page-inner { font-size: clamp(14px, 4.2cqh, 17px); padding: 4cqh 5cqw 52px; }
  .js-book .chapter-photo { min-height: 4em; }
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 8px 14px 48px; }
  .js-book .page-cover .cover-frame { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: center; justify-items: start; text-align: left; gap: .25em 1.25em; padding: .4em .6em; }
  .js-book .page-cover .cover-avatar { grid-column: 1; grid-row: 1 / 6; width: auto; max-width: none; height: min(11rem, 62cqh); aspect-ratio: 1; margin: 0; align-self: center; }
  .js-book .page-cover .cover-kicker { grid-column: 2; margin: 0; }
  .js-book .page-cover .cover-title { grid-column: 2; font-size: clamp(1.25em, 5.2cqh, 1.85em); margin: 0; }
  .js-book .page-cover .cover-rule { grid-column: 2; margin: .15em 0; }
  .js-book .page-cover .cover-sub { grid-column: 2; margin: 0; font-size: 1em; }
  .js-book .page-cover .cover-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .55em 1em; margin-top: .15em; }
  .js-book .page-cover .cover-open { padding: .5em 1.2em; }
  .js-book .page-back .cover-frame { padding: .4em .6em; }
  .js-book .page-back .cover-title { font-size: 1.4em; }
}
@media (prefers-reduced-motion: reduce) {
  .js-book .book { transition: none !important; }
  .js-book .page.is-turning { box-shadow: none; }
  .js-book .page.is-turning .shade::after { animation: none; }
  .js-book .book-hint { transition: opacity .4s ease; }
}

.page-entries .page-title { font-size: 1.7em; }
.js-book .book a, .js-book .book img { -webkit-user-drag: none; user-drag: none; }
.js-book .book { touch-action: pan-y; }


/* ========== site31: kệ sách trang chủ, sách nhỏ, trang chuyên mục/bài ========== */
.shelf-hero { background: #FEF9E8; color: #2C2B19; padding: 1.5rem 0 0; text-align: center; min-height: calc(100dvh - var(--hdr, 72px)); display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.shelf-hero .wrap { width: min(1120px, calc(100% - 2rem)); max-width: 1120px; margin: 0 auto; }
.shelf-kicker { font-family: var(--font-ui); font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: #5B5A37; margin: 0 0 .85rem; }
.shelf-name { font-family: var(--font-head); font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.08; margin: 0; color: #2C2B19; }
.shelf-name em { font-style: italic; }
.shelf-rule { display: block; width: 3.2rem; height: 1px; background: #592148; margin: .85rem auto 1rem; }
.shelf-hero h1 { font-family: var(--font-head); font-weight: 400; font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.35; max-width: 38rem; margin: 0 auto 1.4rem; color: #2C2B19; }
.shelf-lead { font-family: var(--font-ui); font-size: .68rem; letter-spacing: .06em; color: #5B5A37; margin: 0 auto 1.6rem; }

.bookshelf { list-style: none; margin: 0 auto; padding: 1.2rem .5rem 2.2rem; display: flex; justify-content: center; align-items: flex-end; gap: clamp(.7rem, 2vw, 1.5rem); position: relative; flex-wrap: nowrap; }
.bookshelf::after { content: ""; position: absolute; left: 0; right: 0; bottom: .35rem; height: 16px; background: linear-gradient(#6f6e45, #5B5A37 60%, #3f3e26); box-shadow: 0 12px 22px rgba(44, 43, 25, .22), 0 1px 0 rgba(254, 249, 232, .25) inset; }
.shelf-book { --tilt: 0deg; position: relative; z-index: 1; display: flex; width: clamp(9.2rem, 16vw, 13.6rem); height: clamp(15rem, 28vw, 22.5rem); background: #2C2B19; color: #FEF9E8; text-decoration: none; transform: rotate(var(--tilt)); box-shadow: 6px 10px 24px rgba(44, 43, 25, .28); transition: transform .35s ease, box-shadow .35s ease; transform-origin: 50% 100%; }
.bookshelf li:nth-child(1) .shelf-book { --tilt: -3.2deg; height: calc(clamp(15rem, 28vw, 22.5rem) - .6rem); }
.bookshelf li:nth-child(2) .shelf-book { --tilt: 1.8deg; }
.bookshelf li:nth-child(3) .shelf-book { --tilt: -1.4deg; height: calc(clamp(15rem, 28vw, 22.5rem) - 1.1rem); }
.bookshelf li:nth-child(4) .shelf-book { --tilt: 2.6deg; height: calc(clamp(15rem, 28vw, 22.5rem) - .3rem); }
.shelf-book:hover, .shelf-book:focus-visible { transform: rotate(0deg) translateY(-14px); z-index: 3; box-shadow: 8px 18px 32px rgba(44, 43, 25, .32); outline: none; }
.shelf-spine { flex: none; width: 1.05rem; background: linear-gradient(90deg, #3d3c24, #5B5A37 40%, #6a6948); border-right: 1px solid rgba(254, 249, 232, .18); display: flex; align-items: center; justify-content: center; }
.shelf-spine span { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-ui); font-size: .48rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(254, 249, 232, .85); }
.shelf-cover { flex: 1; margin: 7px 7px 7px 0; border: 1px solid rgba(254, 249, 232, .28); display: flex; flex-direction: column; padding: .7rem .7rem .6rem; box-sizing: border-box; min-width: 0; }
.shelf-cover img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; display: block; margin-bottom: .55rem; }
.shelf-chap { font-family: var(--font-ui); font-size: .52rem; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 .35rem; color: rgba(254, 249, 232, .72); }
.shelf-title { font-family: var(--font-head); font-weight: 500; font-size: 1.08rem; line-height: 1.15; margin: 0 0 .4rem; color: #FEF9E8; }
.shelf-idea { font-size: .72rem; line-height: 1.35; margin: auto 0 0; color: rgba(254, 249, 232, .82); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) {
  .shelf-hero { min-height: 0; padding: 1.2rem 0 0; }
  .bookshelf { display: grid; grid-template-columns: 1fr 1fr; justify-items: center; align-items: end; gap: 1rem .8rem; padding-bottom: 2rem; }
  .bookshelf::after { bottom: .4rem; }
  .bookshelf li, .shelf-book { width: min(10.2rem, 42vw); }
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { transform: none; height: 14.2rem; }
  .shelf-book:hover, .shelf-book:focus-visible { transform: translateY(-8px); }
  .shelf-hero h1 { margin-bottom: 1rem; }
}
@media (max-width: 700px) and (max-height: 520px) {
  .shelf-hero { min-height: 0; }
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { height: 12.5rem; }
  .shelf-cover img { display: none; }
}

/* Sách nhỏ dưới kệ (chỉ trang chủ) */
.home-lower { background: #FEF9E8; color: #2C2B19; padding: 2.5rem 0 3rem; }
.home-lower .wrap { width: min(1120px, calc(100% - 2rem)); max-width: 1120px; margin: 0 auto; }
.home-lower .section { margin: 0 0 3.2rem; }
.home-lower .section-head { text-align: center; margin-bottom: 1.4rem; }
.home-lower h2 { font-family: var(--font-head); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0 0 .3rem; }
.veem-bookish { max-width: 42rem; margin: 0 auto; text-align: left; }
.veem-bookish .kicker { font-family: var(--font-ui); font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #5B5A37; }
.veem-bookish h2 { text-align: left; }
.veem-bookish .about-body { font-size: 1.05rem; line-height: 1.65; margin: 0 0 .8rem; }
.veem-mini { margin: 1.2rem 0 0; }


/* Trang lật: ảnh trong bài, teaser chuyên mục */
.js-book .page-body .prose img, .js-book .page-body img { max-height: 42cqh; width: auto; max-width: 100%; object-fit: contain; margin-inline: auto; }
.js-book .teaser-photo { margin: .4em 0 .7em; overflow: hidden; border: 1px solid var(--line, rgba(44,43,25,.16)); }
.js-book .teaser-photo img { width: 100%; height: 100%; max-height: 36cqh; object-fit: cover; display: block; }
.js-book .article-source-wrap { }
html.js-book .article-source-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
html:not(.js-book) .article-source-wrap { display: block; }
html:not(.js-book) .page-end { margin-top: 2rem; }
.js-book .page-cover .cover-photo { width: 72%; max-width: 18rem; aspect-ratio: 4 / 5; margin: .8em auto 1em; overflow: hidden; border: 1px solid rgba(254, 249, 232, .3); }
.js-book .page-cover .cover-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.js-book .page-cover.page-cat-cover .cover-photo { border-color: rgba(254, 249, 232, .3); }
.page-end .soft-zalo { margin-top: 1em; }


@media (min-width: 701px) and (max-height: 520px) {
  .shelf-hero { min-height: 0; padding: .25rem 0 0; }
  .shelf-kicker { margin-bottom: .35rem; }
  .shelf-name { font-size: 1.65rem; }
  .shelf-hero h1 { font-size: 1rem; margin-bottom: .35rem; }
  .shelf-lead { margin-bottom: .35rem; }
  .bookshelf { padding: .25rem .5rem 1.1rem; }
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { height: 8rem; width: clamp(7.2rem, 17vw, 10.5rem); }
  .shelf-cover img { display: none; }
  .shelf-plank { margin-top: 0; }
}

.bookshelf::after { display: none; }
.shelf-plank { height: 16px; width: 100%; max-width: 72rem; margin: -.15rem auto 0; background: linear-gradient(#6f6e45, #5B5A37 60%, #3f3e26); box-shadow: 0 12px 22px rgba(44, 43, 25, .22), 0 1px 0 rgba(254, 249, 232, .25) inset; }
@media (max-width: 700px) { .shelf-plank { width: 92%; margin-top: .2rem; } }

/* ========== site32: trang vừa khít (không cắt ngang dòng), bìa sau gọn, mục lục dạng sách ========== */
.js-book .page-inner { overflow: hidden; }
.js-book .fit-hide { display: none !important; }
.js-book .prose > :first-child { margin-top: 0; }
.js-book .prose > :last-child { margin-bottom: 0; }
.js-book .prose p.cont, .js-book .prose li.cont { text-indent: 0; }
.js-book .prose ul.cont, .js-book .prose ol.cont { margin-top: 0; }
/* thẻ bài trong chương: ảnh co giãn theo chỗ trống, cắt gọn bằng object-fit */
.js-book .page-entries .teaser-photo { flex: 0 1 36cqh; min-height: 14cqh; margin: .4em 0 .7em; }
.js-book .page-entries .teaser-photo img { height: 100%; max-height: none; object-fit: cover; }
.js-book .page-entries .entry-desc { flex: none; }
/* bìa: khung không tràn, ảnh bìa co lại trước khi chữ bị cắt */
.js-book .cover-frame { min-height: 0; overflow: hidden; }
.js-book .page-cover .cover-photo { flex: 0 1 auto; min-height: 12cqh; }
.js-book .page-cover .cover-photo img { height: 100%; }
.js-book .page-cover .cover-sub { flex: none; }
.js-book .page-body .prose figure.post-photo { margin-left: auto; margin-right: auto; }
.js-book .page-body .prose table { max-width: 100%; }
.js-book .page-body .prose td, .js-book .page-body .prose th { padding: .4em .5em; }

/* Bìa sau (trang cuối của mọi cuốn sách con) */
.page-back .back-frame { gap: 0; }
.page-back .back-title em { display: block; font-style: italic; }
.page-back .back-text { font-style: italic; font-size: 1.05em; margin: 0 0 1em; color: rgba(254, 249, 232, .9); }
.page-back .back-cta { margin: 0 0 1.3em; }
.page-back .back-channels, .page-back .back-nav ul { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .35em 1.1em; }
.page-back .back-channels a { font-family: var(--font-ui); font-size: .62em; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--paper); }
.page-back .back-nav a { font-size: .9em; text-decoration: none; color: var(--paper); }
.page-back a:hover { text-decoration: underline; }
.page-back .back-note { font-size: .72em; line-height: 1.5; max-width: 28em; margin: 0 auto .8em; color: rgba(254, 249, 232, .7); }
.page-back .back-note a { color: var(--paper); text-decoration: underline; }
.page-back .back-year { font-family: var(--font-ui); font-size: .58em; letter-spacing: .16em; text-transform: uppercase; color: rgba(254, 249, 232, .7); margin: 0; }
html:not(.js-book) .page-back { max-width: 34rem; margin: 0 auto; }
html:not(.js-book) .page-back .page-inner { min-height: 0; }

/* Mục lục tất cả bài viết */
.toc-book .toc-chap { font-family: var(--font-head); font-weight: 500; font-size: 1.35em; line-height: 1.2; margin: 0 0 .5em; padding: 0; }
.toc-book .toc-chap .toc-chap-num { display: block; font-family: var(--font-ui); font-size: .42em; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft, #5B5A37); font-weight: 400; margin-bottom: .45em; }
.toc-book .toc-chap a { text-decoration: none; color: inherit; }
.toc-book .toc-chap a:hover { text-decoration: underline; }
.prose.toc-book ul.toc-posts, .prose ul.toc-posts { list-style: none; margin: 0 0 1.4em; padding: 0; border-top: 1px solid var(--line, rgba(44,43,25,.16)); }
.prose ul.toc-posts > li { margin: 0; border-bottom: 1px solid var(--line, rgba(44,43,25,.16)); }
.prose ul.toc-posts > li::before { content: none; }
.prose ul.toc-posts a { display: block; padding: .55em 0; text-decoration: none; color: var(--ink, #2C2B19); }
.prose ul.toc-posts .tp-title { display: block; font-family: var(--font-head); font-size: 1.02em; line-height: 1.25; }
.prose ul.toc-posts .tp-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .74em; line-height: 1.45; color: var(--ink-soft, #5B5A37); margin-top: .2em; }
.prose ul.toc-posts .tp-meta { display: block; font-family: var(--font-ui); font-size: .55em; letter-spacing: .14em; color: var(--ink-soft, #5B5A37); margin-top: .3em; }
.prose ul.toc-posts a:hover .tp-title { text-decoration: underline; }
.js-book .page-body .prose:has(.toc-chap, .toc-posts) { font-size: 1em; }
.js-book .page-body .prose .toc-chap, .js-book .page-body .prose ul.toc-posts { }
html:not(.js-book) .toc-source .toc-book { padding: 1.5rem; }

/* site32: bỏ thanh kệ; điện thoại xếp 4 quyển theo hàng dọc */
.shelf-plank, .bookshelf::after { display: none !important; }
.bookshelf { padding-bottom: 1.6rem; }
@media (max-width: 700px) {
  .bookshelf { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: .6rem 0 2.2rem; }
  .bookshelf li { width: min(86vw, 24rem); }
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { width: 100%; height: auto; aspect-ratio: 6 / 7; transform: none; }
  .shelf-book:hover, .shelf-book:focus-visible { transform: translateY(-4px); }
  .shelf-spine { width: 1.3rem; }
  .shelf-spine span { font-size: .55rem; }
  .shelf-cover { padding: .9rem .9rem 1rem; }
  .shelf-cover img { aspect-ratio: 16 / 10; margin-bottom: .8rem; }
  .shelf-chap { font-size: .6rem; }
  .shelf-title { font-size: 1.6rem; margin-bottom: .5rem; }
  .shelf-idea { font-size: .92rem; line-height: 1.45; margin-top: 0; -webkit-line-clamp: 3; }
}
@media (max-width: 700px) and (max-height: 520px) {
  .shelf-cover img { display: block; }
}
/* lề hai bên trên điện thoại cho các phần thường của trang chủ */
.home-lower > .wrap { width: auto; max-width: calc(var(--narrow) + 2.5rem); }
@media (max-width: 700px) {
  .wrap, .wrap-narrow, .home-lower > .wrap { padding-left: 1.5rem; padding-right: 1.5rem; }
  .shelf-hero .wrap { width: auto; }
}
.home-lower > .wrap.section { margin-left: auto; margin-right: auto; }
/* trang "Cùng chuyên mục": sách nhỏ co theo chiều cao trang */

/* ========== site34: sách chương 3D, tỉ lệ sách thật ~1:1.45, đổ bóng mềm ========== */
.bookshelf { gap: clamp(1.4rem, 3vw, 2.8rem); padding-top: 1.4rem; padding-bottom: 2.6rem; }
.shelf-book, .bookshelf li:nth-child(n) .shelf-book {
  --tilt: 0deg;
  width: clamp(9.6rem, 14vw, 12.6rem); height: auto; aspect-ratio: 1 / 1.45;
  border-radius: 2px 5px 5px 2px;
  background-color: #2C2B19;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.28) 0, rgba(0,0,0,0) 7%, rgba(255,255,255,.07) 9%, rgba(255,255,255,0) 16%, rgba(0,0,0,0) 70%, rgba(0,0,0,.22) 100%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.14)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 .9  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  box-shadow:
    inset 3px 0 2px -1px rgba(255,255,255,.10),
    inset -1px 0 0 rgba(0,0,0,.35),
    0 1px 1px rgba(28,27,16,.30),
    0 3px 6px -1px rgba(28,27,16,.28),
    10px 16px 22px -8px rgba(28,27,16,.32),
    22px 34px 46px -18px rgba(28,27,16,.30);
  transform: none;
  transition: transform .35s ease, box-shadow .35s ease;
}
/* độ dày gáy trang ở mép phải */
.shelf-book::after {
  content: ""; position: absolute; top: 3px; bottom: 3px; right: -5px; width: 5px; border-radius: 0 2px 2px 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, #F4EDD6 0 1px, #E2D9BC 1px 2px), #EFE7CC;
  box-shadow: inset 1px 0 2px rgba(0,0,0,.25), 2px 1px 3px rgba(28,27,16,.18);
}
/* bóng tiếp đất dưới chân sách */
.shelf-book::before {
  content: ""; position: absolute; left: 6%; right: -4%; bottom: -10px; height: 16px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(28,27,16,.38) 0%, rgba(28,27,16,.16) 45%, rgba(28,27,16,0) 72%);
  filter: blur(2px);
}
.shelf-spine { width: 14px; position: relative; background: linear-gradient(90deg, #1f1e11 0%, #3d3c24 35%, #4a4930 60%, #2a2917 100%); border-right: 0; }
.shelf-spine::after { content: ""; position: absolute; top: 0; bottom: 0; right: -4px; width: 4px; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12) 55%, rgba(0,0,0,0)); }
.shelf-spine span { font-size: .42rem; letter-spacing: .16em; }
.shelf-cover { margin: 9px 8px 9px 7px; padding: .65rem .6rem .7rem; overflow: hidden; border-color: rgba(254,249,232,.24); }
.shelf-cover img { aspect-ratio: 4 / 3; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.shelf-title { font-size: 1.12rem; }
.shelf-idea { -webkit-line-clamp: 4; }
.shelf-book:hover, .shelf-book:focus-visible, .bookshelf li:nth-child(n) .shelf-book:hover {
  transform: translateY(-10px);
  box-shadow: inset 3px 0 2px -1px rgba(255,255,255,.10), inset -1px 0 0 rgba(0,0,0,.35), 0 2px 2px rgba(28,27,16,.25), 0 8px 14px -4px rgba(28,27,16,.28), 14px 26px 34px -10px rgba(28,27,16,.32), 28px 46px 60px -20px rgba(28,27,16,.28);
}
@media (max-width: 700px) {
  .bookshelf { gap: 2.4rem; padding: .8rem 0 2.6rem; }
  .bookshelf li { width: auto; display: flex; justify-content: center; }
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { width: min(66vw, 17rem); aspect-ratio: 1 / 1.45; height: auto; }
  .shelf-cover { padding: .85rem .8rem .9rem; }
  .shelf-cover img { aspect-ratio: 4 / 3; margin-bottom: .75rem; }
  .shelf-title { font-size: 1.45rem; }
  .shelf-idea { font-size: .88rem; -webkit-line-clamp: 4; }
}
@media (min-width: 701px) and (max-height: 520px) {
  .shelf-book, .bookshelf li:nth-child(n) .shelf-book { width: 7rem; aspect-ratio: 1 / 1.45; height: auto; }
  .shelf-cover { padding: .45rem .45rem .5rem; }
  .shelf-title { font-size: .95rem; }
  .shelf-idea { font-size: .62rem; -webkit-line-clamp: 3; }
}
@media (prefers-reduced-motion: reduce) { .shelf-book { transition: none; } }
.shelf-spine span { display: none; }

/* ========== site35: bìa sách con dạng sách 3D (giống sách chương trang chủ) ========== */
.js-book .page-cover, .js-book .page-back { background: var(--paper); border-color: transparent; }
.js-book .page-cover .page-inner, .js-book .page-back .page-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.js-book .page-cover .cover-frame, .js-book .page-back .cover-frame {
  position: relative; flex: none; box-sizing: border-box;
  height: 100%; width: auto; max-width: calc(100% - 8px); aspect-ratio: 1 / 1.45; align-self: center;
  margin-right: 8px;
  border: 0; border-radius: 3px 7px 7px 3px;
  padding: 1.6em 1.4em 1.6em calc(1.4em + 14px);
  color: var(--paper);
  background-color: #2C2B19;
  background-image:
    linear-gradient(90deg, #1f1e11 0, #3d3c24 8px, #4a4930 11px, #2a2917 14px, rgba(0,0,0,.35) 14px, rgba(255,255,255,.10) 16px, rgba(0,0,0,0) 19px),
    linear-gradient(90deg, rgba(0,0,0,0) 0, rgba(255,255,255,.06) 6%, rgba(255,255,255,0) 18%, rgba(0,0,0,0) 70%, rgba(0,0,0,.24) 100%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.16)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 .9  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  outline: 1px solid rgba(254, 249, 232, .26); outline-offset: -10px;
  box-shadow:
    inset -1px 0 0 rgba(0,0,0,.35),
    5px 0 0 -2px #EFE7CC,
    6px 1px 0 -2px #DCD2B2,
    0 1px 1px rgba(28,27,16,.30),
    0 4px 8px -2px rgba(28,27,16,.28),
    12px 18px 26px -10px rgba(28,27,16,.34),
    24px 38px 56px -20px rgba(28,27,16,.30);
}
.js-book .page-cover .cover-frame { justify-content: center; }
.js-book .page-cover.is-turning::before, .js-book .page-back.is-turning::before { background: linear-gradient(to bottom, #F7F0D8, #E4D7B4 50%, #F7F0D8); }
.js-book .page-back .back-frame { outline-offset: -10px; }
/* lề: máy tính */
@media (min-width: 900px) {
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 5cqh 7cqw 7cqh; }
}
/* lề: điện thoại – 24px hai bên + chỗ cho mép giấy và bóng */
@media (max-width: 899.98px) {
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 16px 24px 66px 24px; }
  .js-book .page-cover .cover-frame, .js-book .page-back .cover-frame { width: calc(100% - 8px); max-width: calc(100% - 8px); aspect-ratio: auto; height: 100%; padding: 1.3em 1.1em 1.3em calc(1.1em + 14px); }
}
@media (max-width: 899.98px) and (max-height: 520px) {
  .js-book .page-cover .page-inner, .js-book .page-back .page-inner { padding: 8px 24px 50px 24px; }
  .js-book .page-cover .cover-frame, .js-book .page-back .cover-frame { padding: .5em .8em .5em calc(.8em + 14px); outline-offset: -6px; }
}

/* ========== site35: lật trang cong mềm (StPageFlip) + trang giấy ========== */
.stf__parent { position: relative; display: block; box-sizing: border-box; transform: translateZ(0); touch-action: pan-y; }
.stf__wrapper { position: relative; width: 100%; height: 100%; box-sizing: border-box; z-index: 1; }
.stf__parent canvas { position: absolute; width: 100%; height: 100%; left: 0; top: 0; }
.stf__block { position: absolute; width: 100%; height: 100%; box-sizing: border-box; perspective: 2000px; }
.stf__item { display: none; position: absolute; transform-style: preserve-3d; }
.stf__outerShadow, .stf__innerShadow, .stf__hardShadow, .stf__hardInnerShadow { position: absolute; left: 0; top: 0; }

html.js-pf body.book-page .book-main { overflow: hidden; height: calc(100dvh - var(--hdr, 64px)); }
html.js-pf .book-stage { display: block; height: 100%; }
html.js-pf .book { position: relative; margin-left: auto; margin-right: auto; overflow: visible; perspective: none; transform-style: flat; touch-action: pan-y; }
html.js-pf .book > .endpaper { display: none !important; }
html.js-pf .pf-host { position: absolute; inset: 0; width: 100% !important; height: 100%; max-width: none !important; min-width: 0 !important; }
html.js-pf .book .stf__item.page { visibility: visible; border: 0; box-shadow: none; backface-visibility: visible; -webkit-backface-visibility: visible; }

/* giấy: màu kem, vân giấy, viền tối nhẹ */
html.js-pf .book .page:not(.page-cover):not(.page-back) {
  background-color: #FCF6E3;
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.35), rgba(255,255,255,0) 70%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .15  0 0 0 .06 0'/></filter><rect width='100%' height='100%' filter='url(%23p)'/></svg>");
}
html.js-pf .book .page:not(.page-cover):not(.page-back) > .page-inner { box-shadow: inset 0 0 28px rgba(60, 50, 20, .07); }
/* bóng gáy (phía đóng sách) */
html.js-pf .book .page.--left:not(.page-cover):not(.page-back) > .page-inner { background: linear-gradient(to left, rgba(44,43,25,.16), rgba(44,43,25,.05) 3.5%, rgba(44,43,25,0) 9%); }
html.js-pf .book .page.--right:not(.page-cover):not(.page-back) > .page-inner { background: linear-gradient(to right, rgba(44,43,25,.16), rgba(44,43,25,.05) 3.5%, rgba(44,43,25,0) 9%); }
/* số trang ở góc ngoài */
html.js-pf .book .page.--left .folio { left: 13cqw; right: auto; text-align: left; }
html.js-pf .book .page.--right .folio { right: 13cqw; left: auto; text-align: right; }
/* tiêu đề chạy đầu trang */
.page .running-head { display: none; }
html.js-pf .page .running-head { display: block; position: absolute; top: 3.2cqh; left: 13cqw; right: 13cqw; margin: 0; font-family: var(--font-ui); font-size: .52em; letter-spacing: .2em; text-transform: uppercase; color: rgba(91, 90, 55, .75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; pointer-events: none; }
html.js-pf .book .page.--left .running-head { text-align: left; }
html.js-pf .book .page.--right .running-head { text-align: right; }

/* nếp gáy giữa hai trang + mép giấy xếp chồng (máy tính) */
@media (min-width: 900px) {
  html.js-pf .book::before, html.js-pf .book::after { content: ""; position: absolute; top: 3px; bottom: 3px; z-index: 0; pointer-events: none; border-radius: 2px;
    background: repeating-linear-gradient(90deg, #E6DDC0 0 1px, #F7F1DC 1px 2px); box-shadow: 0 2px 6px rgba(28,27,16,.18); }
  html.js-pf .book::before { right: 100%; width: var(--edge-l, 0px); }
  html.js-pf .book::after { left: 100%; width: var(--edge-r, 0px); }
  html.js-pf .book.pf-closed::before { width: 0; }
  html.js-pf .book .stf__block::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; margin-left: -18px; z-index: 30; pointer-events: none;
    background: linear-gradient(to right, rgba(44,43,25,0), rgba(44,43,25,.10) 40%, rgba(28,27,16,.28) 50%, rgba(44,43,25,.10) 60%, rgba(44,43,25,0)); transition: opacity .3s; }
  html.js-pf .book.pf-closed .stf__block::after { opacity: 0; }
  html.js-pf .page .running-head { top: 3.4cqh; }
}
/* điện thoại: một trang, mép giấy bên phải, bóng gáy bên trái */
@media (max-width: 899.98px) {
  html.js-pf .book::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 100%; width: min(6px, var(--edge-r, 0px)); z-index: 0; pointer-events: none;
    background: repeating-linear-gradient(90deg, #E6DDC0 0 1px, #F7F1DC 1px 2px); box-shadow: 1px 2px 4px rgba(28,27,16,.18); border-radius: 0 2px 2px 0; }
  html.js-pf .book .page:not(.page-cover):not(.page-back) > .page-inner { background: linear-gradient(to right, rgba(44,43,25,.15), rgba(44,43,25,.04) 4%, rgba(44,43,25,0) 10%); }
  html.js-pf .book .page .folio { right: auto; left: auto; text-align: right; }
  html.js-pf .page .running-head { top: 2.2cqh; left: 8cqw; right: 8cqw; text-align: center !important; }
}
/* bìa: trang cứng; khung bìa tự lo bóng */
html.js-pf .book .page-cover, html.js-pf .book .page-back { background: transparent; }

/* Trang "Đọc tiếp": danh sách bài thay cho sách nhỏ */
.related-list { list-style: none; margin: .5em 0 1em; padding: 0; border-top: 1px solid var(--line, rgba(44,43,25,.16)); }
.related-list > li { border-bottom: 1px solid var(--line, rgba(44,43,25,.16)); margin: 0; }
.related-list > li::before { content: none; }
.rel-item { display: block; padding: .75em .3em; text-decoration: none; color: var(--ink, #2C2B19); transition: background-color .25s ease; }
.rel-item:hover, .rel-item:focus-visible { background-color: rgba(140, 139, 85, .09); }
.rel-label { display: block; font-family: var(--font-ui); font-size: .54em; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft, #5B5A37); margin-bottom: .4em; }
.rel-title { display: block; font-family: var(--font-head); font-size: 1.14em; line-height: 1.22; font-weight: 500; }
.rel-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8em; line-height: 1.45; color: var(--ink-soft, #5B5A37); margin-top: .3em; }
.rel-item:hover .rel-title { text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }

/* Điện thoại: chữ lớn hơn 10% */
@media (max-width: 700px) {
  .js-book .page-inner { font-size: clamp(17.6px, 4.84cqw, 20.9px); }
}

/* site35: nút "Đọc thêm" trong 4 quyển chương (trang chủ) */
.shelf-idea { margin: 0; flex: none; }
.shelf-more { display: inline-block; align-self: center; flex: none; margin-top: auto; padding: .42em .95em .34em; border: 1px solid rgba(240, 212, 140, .75); color: #F3E3B3; font-family: var(--font-ui); font-size: .58rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; transition: background-color .3s ease, color .3s ease; }
.shelf-book:hover .shelf-more, .shelf-book:focus-visible .shelf-more { background: #F3E3B3; color: #2C2B19; }
.shelf-cover > .shelf-idea { margin-bottom: .6rem; }
@media (max-width: 700px) { .shelf-more { font-size: .62rem; } .shelf-cover img { aspect-ratio: 16 / 10; margin-bottom: .6rem; } }
@media (min-width: 701px) and (max-height: 520px) { .shelf-more { font-size: .5rem; padding: .3em .7em .24em; } .shelf-cover > .shelf-idea { margin-bottom: .45rem; } }
@media (min-width: 900px) { html.js-pf .book.pf-closed::before, html.js-pf .book.pf-closed::after { width: 0; } }
html.js-pf .book .stf__item.page:not(.page-cover):not(.page-back) { box-shadow: 0 1px 2px rgba(28,27,16,.12), 0 12px 26px -10px rgba(28,27,16,.30); }
