/* หลักการแปล น่าอ่าน — หน้าศึกษาออนไลน์ */

@font-face {
	font-family: 'THSarabunPali';
	src: url('/assets/fonts/THSarabunPali.ttf') format('truetype');
	font-display: swap;
}

:root {
	--tp-paper:      #faf8f4;
	--tp-card:       #ffffff;
	--tp-ink:        #262230;
	--tp-ink-soft:   #5c5670;
	--tp-ink-faint:  #8c869c;
	--tp-line:       #e6e1d8;
	--tp-brand:      #4c3f8f;
	--tp-brand-soft: #f1eefb;
	--tp-amber:      #b07a1e;   /* ตัวอย่างในเนื้อบท — ตามไฟล์ดีไซน์ */
	--tp-amber-soft: #fdf7ec;
	--tp-teal:       #0e7c68;   /* แบบฝึกหัดและเฉลย — ตามไฟล์ดีไซน์ */
	--tp-teal-soft:  #f0f7f5;
	--tp-radius:     14px;
	--tp-shadow:     0 1px 2px rgba(38,34,48,.05), 0 8px 24px -14px rgba(38,34,48,.25);
}

.tp-root {
	background: var(--tp-paper);
	color: var(--tp-ink);
	font-family: 'Sarabun', 'Noto Sans Thai', system-ui, sans-serif;
	min-height: 100vh;
	font-size: calc(17px * var(--tp-scale, 1));
	line-height: 1.85;
}

.tp-root *, .tp-root *::before, .tp-root *::after { box-sizing: border-box; }
.tp-root p { margin: 0; }
.tp-root ::selection { background: #dcd5f4; color: var(--tp-ink); }
.tp-root :focus-visible { outline: 3px solid #d59a28; outline-offset: 3px; }
.tp-root { scrollbar-color: #b9b0da var(--tp-paper); }

/* เนื้อหนังสือใช้ THSarabunPali ทั้งหมด — บาลีอักษรไทย (ฏ ฐ ญ ฯ พินทุ นิคหิต)
   จะแหว่งถ้าใช้ฟอนต์อื่น และถ้าสลับฟอนต์กลางบรรทัดน้ำหนักตัวอักษรจะไม่เท่ากัน
   ส่วนแถบเครื่องมือ/สารบัญ/ปุ่ม ยังใช้ Sarabun เพื่อให้อ่านบนจอได้คม */
.tp-root .tp-chapter,
.tp-root .tp-results {
	font-family: 'THSarabunPali', 'Sarabun', serif;
	font-size: 1.88em;          /* = 1.34 x 1.4 — ฐานเนื้อหนังสือ ยังนับเป็น 100% ในแผงตั้งค่า */
	line-height: 1.58;
}
.tp-root .tp-chapter .tp-chip,
.tp-root .tp-chapter .tp-btn,
.tp-root .tp-chapter .tp-h-ex-btn,

.tp-root .tp-chapter .tp-ex-tag,
.tp-root .tp-chapter .tp-key-badge,
.tp-root .tp-chapter .tp-key-src,
.tp-root .tp-chapter .tp-key-link,
.tp-root .tp-chapter .tp-quiz-nokey,
.tp-root .tp-chapter .tp-words-note,
.tp-root .tp-chapter .tp-w-role,
.tp-root .tp-chapter .tp-chapter-kicker,
.tp-root .tp-chapter .tp-chapter-meta,
.tp-root .tp-results .tp-result-where,
.tp-root .tp-results-head {
	font-family: 'Sarabun', system-ui, sans-serif;
	font-size: .536em;          /* .75 / 1.4 */
}
.tp-root .tp-chapter .tp-btn,
.tp-root .tp-chapter .tp-chip { font-size: .5em; }


.tp-root .pali { font-family: inherit; }
.tp-root .tp-bar .pali, .tp-root .tp-toc .pali {
	font-family: 'THSarabunPali', 'Sarabun', serif; font-size: 1.3em;
}


/* ─────────────────────────── แถบบน ─────────────────────────── */
.tp-bar {
	position: sticky; top: 0; z-index: 40;
	display: flex; align-items: center; gap: 12px;
	padding: 10px 16px;
	background: rgba(250,248,244,.92);
	backdrop-filter: saturate(180%) blur(10px);
	border-bottom: 1px solid var(--tp-line);
}
.tp-bar-title {
	display: flex; flex-direction: column; min-width: 0; flex: 0 0 auto;
	padding: 0; border: 0; background: transparent; color: inherit;
	font: inherit; text-align: left; cursor: pointer;
}
.tp-bar-title:hover .tp-bar-book { color: var(--tp-brand); }
.tp-bar-book { font-weight: 600; letter-spacing: .01em; line-height: 1.25; }
.tp-bar-sub { color: var(--tp-ink-faint); font-weight: 400; }
.tp-bar-chapter {
	font-size: .84em; color: var(--tp-ink-faint); line-height: 1.3;
	max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tp-bar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.tp-chapter-nav { display: flex; align-items: center; gap: 6px; }
.tp-chapter-nav-btn {
	width: auto; min-width: 38px; padding: 0 11px; gap: 7px;
	font-size: .86em; white-space: nowrap;
}
.tp-chapter-nav-btn:disabled {
	background: #f2f0ec; border-color: var(--tp-line); color: #aaa4b2;
	cursor: not-allowed; opacity: .7;
}

.tp-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; flex: 0 0 auto;
	border: 1px solid var(--tp-line); border-radius: 10px;
	background: var(--tp-card); color: var(--tp-ink-soft);
	font-size: 1.05em; cursor: pointer; text-decoration: none;
	transition: background .15s, color .15s, border-color .15s;
}
.tp-icon-btn:hover { background: var(--tp-brand-soft); color: var(--tp-brand); border-color: #d9d2f2; }

.tp-search { position: relative; display: flex; align-items: center; }
.tp-search > .bi-search {
	position: absolute; left: 11px; color: var(--tp-ink-faint); font-size: .9em; pointer-events: none;
}
.tp-search input {
	width: 220px; height: 38px;
	padding: 0 30px 0 32px;
	border: 1px solid var(--tp-line); border-radius: 10px;
	background: var(--tp-card); color: inherit;
	font: inherit; font-size: .92em;
}
.tp-search input:focus { outline: 2px solid var(--tp-brand); outline-offset: -1px; border-color: transparent; }
.tp-search input::-webkit-search-cancel-button { display: none; }
.tp-search-clear {
	position: absolute; right: 6px; width: 24px; height: 24px;
	border: 0; background: transparent; color: var(--tp-ink-faint);
	border-radius: 6px; cursor: pointer; font-size: .72em;
}
.tp-search-clear:hover { background: var(--tp-line); color: var(--tp-ink); }

/* การตั้งค่า — รวมเครื่องมือที่เคยกระจายบนแถบไว้ในที่เดียว */
.tp-settings-wrap { position: relative; flex: 0 0 auto; }
.tp-settings-btn.is-open { background: var(--tp-brand); border-color: var(--tp-brand); color: #fff; }

.tp-settings-panel {
	position: absolute; top: calc(100% + .6rem); right: 0; z-index: 60;
	width: min(24rem, calc(100vw - 1.5rem));
	padding: 14px;
	border: 1px solid var(--tp-line); border-radius: 16px;
	background: var(--tp-card);
	box-shadow: 0 24px 50px -18px rgba(38,34,48,.4);
	text-align: left;
}
.tp-settings-panel::before {
	content: ""; position: absolute; top: -7px; right: 15px;
	width: 12px; height: 12px; transform: rotate(45deg);
	background: var(--tp-card);
	border-left: 1px solid var(--tp-line); border-top: 1px solid var(--tp-line);
}
.tp-settings-head {
	display: grid; grid-template-columns: 38px minmax(0,1fr) 34px;
	align-items: center; gap: 10px; padding-bottom: 12px;
}
.tp-settings-mark, .tp-setting-icon {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--tp-brand-soft); color: var(--tp-brand);
}
.tp-settings-mark { width: 38px; height: 38px; border-radius: 12px; font-size: 1.05em; }
.tp-settings-head h2 { margin: 0; font-size: 1em; font-weight: 600; line-height: 1.4; }
.tp-settings-head p { margin: 0; font-size: .76em; color: var(--tp-ink-faint); line-height: 1.4; }
.tp-settings-close {
	width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 10px; background: #f2f0ec; color: var(--tp-ink-soft);
	cursor: pointer; font-size: .85em;
}
.tp-settings-close:hover { background: var(--tp-brand-soft); color: var(--tp-brand); }

.tp-setting-row {
	display: grid; grid-template-columns: minmax(0,1fr) auto;
	align-items: center; gap: 12px;
	padding: 12px 2px; border-top: 1px solid var(--tp-line);
}
.tp-setting-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tp-setting-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; }
.tp-setting-copy h3 { margin: 0; font-size: .93em; font-weight: 600; line-height: 1.4; }
.tp-setting-copy p { margin: 0; font-size: .74em; color: var(--tp-ink-faint); line-height: 1.45; }

.tp-stepper {
	display: grid; grid-template-columns: 36px minmax(62px,auto) 36px;
	align-items: stretch; min-height: 38px; padding: 2px;
	border-radius: 11px; background: #f2f0ec;
}
.tp-stepper button, .tp-stepper .tp-stepper-value {
	min-width: 0; border: 0; border-radius: 9px; background: transparent;
	color: var(--tp-ink-soft); font: inherit; font-size: .82em; font-weight: 600;
}
.tp-stepper button { cursor: pointer; }
.tp-stepper button:hover:not(:disabled) { background: #fff; color: var(--tp-brand); }
.tp-stepper button:disabled { opacity: .3; cursor: not-allowed; }
.tp-stepper .tp-stepper-value { color: var(--tp-brand); white-space: nowrap; }

.tp-segment { display: grid; grid-auto-flow: column; gap: 2px; padding: 2px; border-radius: 11px; background: #f2f0ec; }
.tp-segment button {
	min-height: 34px; padding: 0 13px; border: 0; border-radius: 9px;
	background: transparent; color: var(--tp-ink-soft);
	font: inherit; font-size: .82em; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tp-segment button.is-on { background: var(--tp-brand); color: #fff; }
.tp-segment button:not(.is-on):hover { background: #fff; color: var(--tp-brand); }

.tp-settings-block { padding: 12px 2px 2px; border-top: 1px solid var(--tp-line); }
.tp-settings-block h3 {
	display: flex; align-items: center; gap: 6px; margin: 0 0 8px;
	font-size: .8em; font-weight: 600; color: var(--tp-ink-soft);
}
.tp-toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.tp-toggle {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-height: 66px; padding: 8px 4px;
	border: 1px solid var(--tp-line); border-radius: 11px;
	background: var(--tp-card); color: var(--tp-ink-soft);
	font: inherit; font-size: .76em; cursor: pointer; text-align: center;
}
.tp-toggle i { font-size: 1.15em; }
.tp-toggle b { font-weight: 600; font-size: .92em; color: var(--tp-ink-faint); }
.tp-toggle:hover { border-color: #d9d2f2; }
.tp-toggle.is-on { background: var(--tp-brand-soft); border-color: #d9d2f2; color: var(--tp-brand); }
.tp-toggle.is-on b { color: var(--tp-brand); }

.tp-settings-foot { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--tp-line); }
.tp-root a.tp-settings-foot-link,
.tp-settings-foot a {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: .82em; color: var(--tp-ink-soft); text-decoration: none;
}
.tp-settings-foot a:hover { color: var(--tp-brand); text-decoration: underline; }

.tp-settings-close:focus-visible, .tp-stepper button:focus-visible,
.tp-segment button:focus-visible, .tp-toggle:focus-visible {
	outline: 3px solid var(--tp-brand); outline-offset: 2px;
}

/* ─────────────────────────── สารบัญ ─────────────────────────── */
.tp-scrim { position: fixed; inset: 0; background: rgba(38,34,48,.35); z-index: 50; }
.tp-toc {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 51;
	width: min(380px, 88vw);
	display: flex; flex-direction: column;
	background: var(--tp-card);
	border-right: 1px solid var(--tp-line);
	box-shadow: 0 0 40px -10px rgba(38,34,48,.4);
	transform: translateX(-102%);
	transition: transform .24s cubic-bezier(.4,0,.2,1);
}
.tp-toc.is-open { transform: none; }
.tp-toc-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--tp-line);
	font-weight: 600;
}
.tp-toc-list { flex: 1; overflow-y: auto; padding: 8px; }
.tp-toc-item {
	display: flex; gap: 12px; align-items: flex-start; width: 100%;
	padding: 10px 12px; margin-bottom: 2px;
	border: 0; border-radius: 10px; background: transparent;
	text-align: left; font: inherit; color: inherit; cursor: pointer;
	line-height: 1.5;
}
.tp-toc-item:hover { background: var(--tp-brand-soft); }
.tp-toc-item.is-current { background: var(--tp-brand); color: #fff; }
.tp-toc-item.is-current .tp-toc-meta, .tp-toc-item.is-current .tp-toc-no { color: rgba(255,255,255,.75); }
.tp-toc-no {
	flex: 0 0 2.2em; text-align: center; color: var(--tp-brand);
	font-weight: 600; font-size: 1.05em;
}
.tp-toc-text { min-width: 0; }
.tp-toc-title { display: block; }
.tp-toc-meta { display: block; font-size: .84em; color: var(--tp-ink-faint); }
.tp-toc-foot {
	padding: 12px 20px; border-top: 1px solid var(--tp-line);
	font-size: .78em; color: var(--tp-ink-faint); line-height: 1.6;
}

/* ─────────────────────────── เนื้อหา ─────────────────────────── */
.tp-main { max-width: 860px; margin: 0 auto; padding: 28px 20px 96px; }
.tp-main.is-home { max-width: 1120px; }

.tp-state { text-align: center; padding: 80px 20px; color: var(--tp-ink-faint); }
.tp-state i { font-size: 2em; display: block; margin-bottom: 10px; }
.tp-state-error { color: #b3261e; }
.tp-spinner {
	width: 30px; height: 30px; margin: 0 auto 14px;
	border: 3px solid var(--tp-line); border-top-color: var(--tp-brand);
	border-radius: 50%; animation: tp-spin .8s linear infinite;
}
.tp-spinner-sm { width: 16px; height: 16px; border-width: 2px; margin: 0 8px 0 0; display: inline-block; vertical-align: -3px; }
@keyframes tp-spin { to { transform: rotate(360deg); } }

/* ─────────────────────────── หน้าปก ─────────────────────────── */
.tp-home { font-family: 'Sarabun', 'Noto Sans Thai', system-ui, sans-serif; }
.tp-cover {
	position: relative; overflow: hidden;
	border: 1px solid #ded8cb; border-radius: 16px;
	background: #f5efe4;
}
.tp-cover > img {
	display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
	object-fit: cover;
}
.tp-cover-copy {
	position: absolute; z-index: 1; top: clamp(24px, 6vw, 62px); left: clamp(24px, 5vw, 58px);
	width: min(430px, 42%); padding: clamp(18px, 2.4vw, 30px);
	border: 1px solid rgba(76,63,143,.18); border-radius: 14px;
	background: rgba(250,248,244,.94);
	box-shadow: 0 18px 38px -26px rgba(38,34,48,.65);
}
.tp-cover-copy h1 {
	margin: 0; max-width: 9ch;
	font-family: 'THSarabunPali', 'Sarabun', serif;
	font-size: clamp(2.7em, 5vw, 4.7em); line-height: .96; font-weight: 600;
	letter-spacing: -.02em; color: var(--tp-ink);
}
.tp-cover-copy h1 span { display: block; color: var(--tp-brand); }
.tp-cover-copy p {
	margin-top: 16px; max-width: 31ch;
	font-size: clamp(1em, 1.55vw, 1.18em); line-height: 1.7; color: var(--tp-ink-soft);
}
.tp-cover-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.tp-start, .tp-browse {
	min-height: 44px; padding: 8px 17px; border-radius: 10px;
	font: inherit; font-size: .95em; font-weight: 600; cursor: pointer;
	transition: color .16s, background .16s, border-color .16s, transform .16s;
}
.tp-start { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--tp-brand); background: var(--tp-brand); color: #fff; }
.tp-start:hover { background: #3e3377; border-color: #3e3377; transform: translateY(-1px); }
.tp-browse { border: 1px solid rgba(76,63,143,.3); background: transparent; color: var(--tp-brand); }
.tp-browse:hover { background: var(--tp-brand-soft); border-color: var(--tp-brand); }
.tp-cover-facts {
	position: absolute; z-index: 1; right: 18px; bottom: 18px;
	display: flex; flex-wrap: wrap; gap: 7px;
}
.tp-cover-facts span {
	padding: 6px 11px; border: 1px solid rgba(76,63,143,.16); border-radius: 999px;
	background: rgba(250,248,244,.94); color: var(--tp-ink-soft);
	font-size: .875em; line-height: 1.4; font-variant-numeric: tabular-nums;
}
.tp-home-intro {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 28px;
	padding: 30px 4px 44px;
}
.tp-home-intro p { max-width: 68ch; font-size: 1.05em; line-height: 1.8; color: var(--tp-ink-soft); }
.tp-home-intro a {
	display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 15px;
	border: 1px solid var(--tp-line); border-radius: 10px; background: var(--tp-card);
	color: var(--tp-ink-soft); text-decoration: none; font-size: .925em; white-space: nowrap;
}
.tp-home-intro a:hover { color: var(--tp-brand); border-color: #cfc5ec; background: var(--tp-brand-soft); }
.tp-home-toc { scroll-margin-top: 90px; }
.tp-home-toc > header { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 14px; }
.tp-home-toc h2 { margin: 0; font-size: clamp(1.55em, 2.5vw, 2em); line-height: 1.3; font-weight: 600; color: var(--tp-ink); }
.tp-home-toc header p { max-width: 38ch; color: var(--tp-ink-faint); font-size: .9em; line-height: 1.6; text-align: right; }
.tp-home-chapters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 28px; }
.tp-home-chapter {
	position: relative; display: grid; grid-template-columns: 126px minmax(0,1fr) 24px;
	align-items: center; gap: 14px; min-width: 0; width: 100%; padding: 13px 2px;
	border: 0; border-top: 1px solid var(--tp-line); border-radius: 0;
	background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
	transition: background .16s, color .16s;
}
.tp-home-chapter:hover { background: rgba(241,238,251,.72); }
.tp-home-chapter img { display: block; width: 126px; aspect-ratio: 1.904 / 1; object-fit: cover; border-radius: 10px; }
.tp-home-chapter-copy { display: block; min-width: 0; }
.tp-home-chapter-no { display: block; margin-bottom: 1px; color: var(--tp-brand); font-size: .875em; font-weight: 600; }
.tp-home-chapter-title { display: block; font-family: 'THSarabunPali', 'Sarabun', serif; font-size: 1.38em; line-height: 1.28; font-weight: 600; }
.tp-home-chapter-meta { display: block; margin-top: 3px; color: var(--tp-ink-faint); font-size: .875em; line-height: 1.5; }
.tp-home-chapter-arrow { justify-self: end; color: var(--tp-ink-faint); font-size: 1em; transition: color .16s, transform .16s; }
.tp-home-chapter:hover .tp-home-chapter-arrow { color: var(--tp-brand); transform: translate(2px,-2px); }

/* ภาพเปิดบท: ทำหน้าที่เป็นจังหวะเปลี่ยนจากสารบัญเข้าสู่เนื้อหาหนัก */
.tp-chapter-art { margin: 0 0 30px; }
.tp-chapter-art img {
	display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
	object-fit: cover; border-radius: var(--tp-radius);
}

.tp-chapter-head { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid var(--tp-line); }
.tp-chapter-kicker {
	color: var(--tp-brand); font-weight: 600; letter-spacing: .06em;
	font-size: .82em; text-transform: none; margin-bottom: 2px;
}
.tp-chapter-head h1 { margin: 0; font-size: 1.5em; line-height: 1.35; font-weight: 600; }
.tp-chapter-meta { color: var(--tp-ink-faint); font-size: .84em; margin-top: 4px; }

.tp-h2 { font-size: 1.22em; font-weight: 600; margin: 34px 0 12px; line-height: 1.5; }
.tp-h3 {
	font-size: 1.08em; font-weight: 600; margin: 28px 0 10px; line-height: 1.6;
	padding-bottom: 4px; border-bottom: 1px solid var(--tp-line);
}
.tp-h-ex-btn {
	margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 12px; border: 1px solid #d9d2f2; border-radius: 99px;
	background: #fff; color: var(--tp-brand);
	font: inherit; font-size: .8em; font-weight: 400; cursor: pointer; white-space: nowrap;
}
.tp-h-ex-btn:hover { background: var(--tp-brand); color: #fff; border-color: var(--tp-brand); }
.tp-h-ex {
	display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
	font-size: 1.06em; font-weight: 600; margin: 40px 0 16px; padding: 11px 16px;
	background: var(--tp-brand-soft); color: var(--tp-brand); border-radius: 10px;
}
.tp-exercise-topic {
	margin: 22px 0 3px; padding-left: 2px;
	font-size: 1.02em; font-weight: 600; line-height: 1.5;
	color: var(--tp-ink-soft);
}
.tp-exercise-note {
	margin: 0 0 14px; padding-left: 2px;
	color: var(--tp-ink-faint); font-size: .86em; line-height: 1.6;
}

.tp-p { margin: 0 0 14px; text-indent: 2.2em; }
.tp-item { margin: 0 0 12px; padding-left: 1.6em; }

/* ข้อความจาก PDF ที่จัดกลับเป็นย่อหน้า — ไม่ปล่อยให้แต่ละบรรทัดติดกันเป็นพืด */
.tp-rich-block { margin: 0 0 14px; }
.tp-rich-copy {
	margin: 0 0 14px !important;
	text-indent: 2.2em;
}
.tp-rich-copy-item {
	text-indent: 0;
	padding-left: 1.6em;
}
.tp-rich-subheading {
	margin: 24px 0 9px;
	padding-bottom: 4px;
	font-size: 1.08em;
	font-weight: 600;
	line-height: 1.55;
	border-bottom: 1px solid var(--tp-line);
}
.tp-rich-bridge {
	margin: 15px 0 5px !important;
	text-indent: 0;
	color: var(--tp-amber);
	font-weight: 600;
	font-size: .86em;
}

/* ตารางที่เดิมถูกถอดเป็นข้อความยาว — คงคอลัมน์ไว้ให้เทียบวิภัตติกับคำแปลได้ทันที */
.tp-table-block { margin-top: 22px; }
.tp-table-title {
	margin: 0 0 9px;
	color: var(--tp-ink-soft);
	font-size: .7em;
	font-weight: 600;
}
.tp-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--tp-line);
	border-radius: 12px;
	background: var(--tp-card);
	box-shadow: var(--tp-shadow);
}
.tp-vibhatti-table {
	width: 100%;
	min-width: 720px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: .64em;
	line-height: 1.55;
}
.tp-vibhatti-table th,
.tp-vibhatti-table td {
	padding: 9px 11px;
	border-bottom: 1px solid var(--tp-line);
	vertical-align: top;
	text-align: left;
}
.tp-vibhatti-table thead th {
	background: var(--tp-amber-soft);
	color: var(--tp-amber);
	font-weight: 600;
	white-space: nowrap;
}
.tp-vibhatti-table tbody tr:last-child th,
.tp-vibhatti-table tbody tr:last-child td { border-bottom: 0; }
.tp-vibhatti-table tbody tr:nth-child(even) th,
.tp-vibhatti-table tbody tr:nth-child(even) td { background: #fcfbf8; }
.tp-vibhatti-table tbody th { color: var(--tp-ink-soft); font-weight: 600; white-space: nowrap; }
.tp-vibhatti-table td:nth-child(2),
.tp-vibhatti-table td:nth-child(3),
.tp-vibhatti-table td:nth-child(4) { white-space: nowrap; }
.tp-table-note {
	display: block;
	margin-bottom: 2px;
	color: var(--tp-ink-faint);
	font-size: .88em;
}

/* ตัวอย่างที่อยู่กลางย่อหน้า — ใช้การ์ดและชั้นเนื้อหาแบบเดียวกับตัวอย่างหลัก */
.tp-inline-example { margin-top: 22px; margin-bottom: 22px; }

/* ตัวอย่าง */
.tp-example {
	margin: 22px 0; padding: 17px 20px 16px;
	background: var(--tp-card);
	border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
}
.tp-ex-head {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin-bottom: 14px;
}
.tp-ex-tag {
	font-size: .74em; font-weight: 600; letter-spacing: .06em;
	color: #fff; background: var(--tp-amber);
	padding: 4px 15px; border-radius: 99px;
}
.tp-ex-head .tp-ex-ref { margin-left: auto; }

/* ชั้นของเนื้อหา: เลขวงกลม + ชื่อชั้น แล้วเนื้อเยื้องเข้ามาใต้ชื่อ
   (แทนการคั่นด้วยขอบด้านข้าง — อ่านเป็นลำดับขั้นได้ทันทีว่ากำลังดูชั้นไหน) */
.tp-layer + .tp-layer { margin-top: 15px; }
.tp-layer-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 6px; }
.tp-layer-name {
	font-family: 'Sarabun', system-ui, sans-serif;
	font-size: .5em; font-weight: 600; letter-spacing: .02em;
	color: var(--tp-amber);
}
.tp-key .tp-layer-name { color: var(--tp-teal); }
.tp-layer-hint {
	font-family: 'Sarabun', system-ui, sans-serif;
	font-size: .44em; color: var(--tp-ink-faint);
}
.tp-layer-body { padding-left: 0; }
.tp-layer-body.is-soft {
	padding: 9px 13px;
	background: var(--tp-amber-soft); border-radius: 10px;
}
.tp-layer-body.is-soft.is-key { background: var(--tp-teal-soft); }
.tp-example-note {
	margin: 6px 0 0; color: var(--tp-ink-faint); font-size: .86em;
}


/* ตัวโยคที่แทรกเข้าไปในบรรทัดบาลี — เขียวตามสีแบบฝึกหัดในดีไซน์ */
.tp-root .tp-yok { color: var(--tp-teal); }
.tp-root .tp-yok b { color: inherit; }

.tp-reveal {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin-top: 16px; padding-top: 13px; border-top: 1px solid rgba(0,0,0,.06);
}
.tp-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 4px 12px; border: 1px solid var(--tp-line); border-radius: 8px;
	background: var(--tp-card); color: var(--tp-ink-soft);
	font: inherit; font-size: .84em; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.tp-chip:hover { border-color: var(--tp-amber); color: var(--tp-amber); }
.tp-chip.is-on { background: var(--tp-amber-soft); border-color: rgba(176,122,30,.4); color: var(--tp-amber); }
.tp-chip i { font-size: .85em; opacity: .8; }
.tp-chip.is-key:hover { border-color: var(--tp-teal); color: var(--tp-teal); }
.tp-chip.is-key.is-on { background: var(--tp-teal-soft); border-color: rgba(14,124,104,.4); color: var(--tp-teal); }
.tp-key .tp-reveal { margin-top: 15px; padding-top: 0; border-top: 0; }
.tp-practice .tp-reveal { display: flex; }
.tp-root:not(.tp-practice) .tp-reveal { display: none; }

.tp-answer-text { margin-bottom: 2px; }
.tp-answer-text:last-child { margin-bottom: 0; }
/* คำที่หนังสือเน้น — ไฮไลต์อ่อน ๆ เห็นชัดกว่าตัวหนาเฉย ๆ */
.tp-example .tp-pali b, .tp-key .tp-layer-body .tp-pali b {
	background: #fbeed3; border-radius: 5px; padding: 0 .16em;
}
.tp-key .tp-layer-body .tp-pali b { background: #d9efe8; }
.tp-root .tp-yok b { background: none; padding: 0; }

/* แบบฝึกหัด */
.tp-quiz {
	display: flex; gap: 8px; margin: 14px 0; padding: 15px 17px 15px 12px;
	background: var(--tp-card); border: 1px solid var(--tp-line);
	border-radius: var(--tp-radius); box-shadow: var(--tp-shadow);
}
.tp-quiz-no {
	flex: 0 0 auto; min-width: 1.45em; text-align: left;
	color: var(--tp-brand); font-weight: 600; font-size: .95em;
}
.tp-quiz-body { min-width: 0; flex: 1; }
.tp-quiz-hint { margin-top: 4px; color: var(--tp-ink-soft); }
.tp-quiz-foot {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin-top: 10px; font-size: .82em; color: var(--tp-ink-faint);
}
.tp-quiz-nokey { color: var(--tp-ink-faint); }

.tp-btn {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 6px 14px; border: 1px solid var(--tp-line); border-radius: 9px;
	background: var(--tp-card); color: var(--tp-ink-soft);
	font: inherit; font-size: .95em; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.tp-btn:hover:not(:disabled) { border-color: var(--tp-brand); color: var(--tp-brand); background: var(--tp-brand-soft); }
.tp-btn:disabled { opacity: .4; cursor: default; }
.tp-btn-key { color: var(--tp-teal); border-color: rgba(14,124,104,.35); background: #fff; }
.tp-btn-key:hover:not(:disabled) { background: var(--tp-teal-soft); border-color: var(--tp-teal); color: var(--tp-teal); }

/* เฉลย */
/* ดึงกล่องเฉลยกลับไปคลุมคอลัมน์เลขข้อด้วย — จะได้กว้างเต็มการ์ด ไม่เหลือที่ว่างทางซ้าย
   (1.45em คือความกว้างคอลัมน์เลข × .95 คือขนาดฟอนต์ของเลข + 8px คือ gap) */
.tp-key {
	margin-top: 14px; margin-left: calc(-1.45em * .95 - 8px); padding: 14px 15px;
	background: #fff; border: 1px solid rgba(14,124,104,.2); border-radius: 12px;
}
.tp-key-loading { color: var(--tp-ink-faint); font-size: .9em; }
.tp-key-warn {
	margin-bottom: 10px; padding: 7px 11px; border-radius: 9px;
	background: #fff8ec; border: 1px solid #f0e3cb; color: var(--tp-amber);
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .76em;
}
.tp-key-head {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding-bottom: 11px; margin-bottom: 14px; border-bottom: 1px solid rgba(14,124,104,.14);
	font-size: .84em;
}
/* ที่มาของเฉลยอยู่ท้ายการ์ด ไม่ขวางทางอ่านคำแปล */
.tp-key-head.is-foot {
	padding-bottom: 0; margin-bottom: 0; border-bottom: 0;
	padding-top: 12px; margin-top: 15px; border-top: 1px solid rgba(14,124,104,.14);
}
.tp-key-badge {
	font-weight: 600; padding: 2px 9px; border-radius: 99px;
	background: #fff; border: 1px solid rgba(14,124,104,.35); color: var(--tp-teal);
}
.tp-key-badge.is-weak { color: #a66412; border-color: #eddfc4; background: #fffaf0; }
.tp-key-src { color: var(--tp-ink-soft); }
.tp-root a.tp-key-link { margin-left: auto; color: var(--tp-teal); text-decoration: none; white-space: nowrap; }
.tp-root a.tp-key-link:hover { text-decoration: underline; }
/* ลิงก์ที่มา: เงียบ ๆ ไม่แย่งสายตาจากตัวบทบาลี */
.tp-root a.tp-ex-ref,
.tp-root .tp-ex-ref.is-plain {
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .5em; font-weight: 400;
	color: var(--tp-ink-faint); text-decoration: none;
}
.tp-root a.tp-ex-ref i { font-size: .85em; opacity: .7; }
.tp-root a.tp-ex-ref:hover { color: var(--tp-amber); text-decoration: underline; }

.tp-key-sentence + .tp-key-sentence { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(14,124,104,.22); }
.tp-key .tp-layer + .tp-layer { margin-top: 15px; }

.tp-words { width: 100%; border-collapse: collapse; font-size: .9em; margin-top: 3px; }
.tp-words td { padding: 3px 14px 3px 0; vertical-align: top; border-bottom: 1px solid #e3f0ec; }
.tp-words td:last-child { padding-right: 0; width: 100%; }
.tp-w-word, .tp-w-role { width: 1%; }
.tp-w-word { white-space: nowrap; }
.tp-w-role { color: var(--tp-teal); white-space: nowrap; }
.tp-w-rel { color: var(--tp-ink-soft); }
.tp-w-todo { color: var(--tp-ink-faint); font-style: italic; }
.tp-words-gap {
	margin-top: 8px; padding: 7px 11px; border-radius: 9px;
	background: #fff8ec; border: 1px solid #f0e3cb; color: var(--tp-amber);
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .529em; line-height: 1.7;
}
.tp-words-gap b {
	display: inline-block; margin-left: 5px; padding: 0 6px;
	border-radius: 5px; background: #fff; border: 1px solid #ecdcbe;
	font-family: 'THSarabunPali', inherit; font-size: 1.25em; font-weight: 400;
}
.tp-words-note { margin-top: 6px; font-size: .78em; color: var(--tp-ink-faint); }

/* อักษรที่ต้นฉบับทำหล่น — ทำให้เห็นชัดว่าขาด ไม่ใช่ปล่อยเป็นกล่องว่าง */
.tp-root .tp-lost {
	display: inline-block; min-width: .55em; text-align: center;
	color: #b3261e; background: #fdeaea; border-radius: 3px;
	font-size: .8em; vertical-align: baseline; cursor: help;
}

/* ผลค้นหา */
.tp-results-head {
	display: flex; align-items: baseline; gap: 10px;
	font-size: 1.2em; font-weight: 600; margin: 0 0 16px;
}
.tp-results-head span { font-size: .72em; font-weight: 400; color: var(--tp-ink-faint); }
.tp-result {
	display: block; width: 100%; text-align: left;
	padding: 12px 16px; margin-bottom: 8px;
	background: var(--tp-card); border: 1px solid var(--tp-line);
	border-radius: 11px; font: inherit; color: inherit; cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.tp-result:hover { border-color: var(--tp-brand); box-shadow: var(--tp-shadow); }
.tp-result-where { display: block; font-size: .78em; color: var(--tp-brand); margin-bottom: 2px; }
.tp-result-text { display: block; color: var(--tp-ink-soft); }
.tp-root mark { background: #fde68a; color: inherit; padding: 0 1px; border-radius: 3px; }

.tp-empty { text-align: center; padding: 56px 20px; color: var(--tp-ink-faint); }
.tp-empty i { font-size: 2em; display: block; margin-bottom: 10px; opacity: .5; }
.tp-empty-hint { font-size: .85em; margin-top: 4px; }

.tp-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; }

.tp-flash { animation: tp-flash 1.6s ease-out; border-radius: 10px; }
@keyframes tp-flash {
	0%, 40% { background: #fef3c7; box-shadow: 0 0 0 8px #fef3c7; }
	100%    { background: transparent; box-shadow: 0 0 0 8px transparent; }
}

.tp-swal { font-family: 'Sarabun', system-ui, sans-serif; }

@media (max-width: 860px) {
	.tp-bar { gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
	.tp-toc-btn { order: 1; }
	.tp-bar-title { order: 2; flex: 1 1 auto; min-width: 0; }
	.tp-bar-tools { order: 3; flex: 1 1 100%; margin-left: 0; }
	.tp-bar-chapter { max-width: 100%; }
	.tp-search { flex: 1 1 auto; }
	.tp-search input { width: 100%; min-width: 0; }
	.tp-settings-panel { position: fixed; top: 104px; right: 12px; width: calc(100vw - 24px); }
	.tp-settings-panel::before { display: none; }
	.tp-setting-row { grid-template-columns: minmax(0,1fr); }
	.tp-stepper, .tp-segment { width: 100%; }
	.tp-stepper { grid-template-columns: 44px minmax(0,1fr) 44px; }
	.tp-main { padding: 20px 14px 80px; }
	.tp-cover-copy { width: min(460px, 54%); }
	.tp-home-chapters { grid-template-columns: minmax(0,1fr); }
	.tp-p { text-indent: 1.6em; }
	.tp-rich-copy { text-indent: 1.6em; }
	.tp-rich-copy-item { padding-left: 1em; text-indent: 0; }
	/* จอแคบ: อย่าเสียคอลัมน์ซ้ายให้เลขข้อ ให้เลขลอยอยู่หัวย่อหน้าแล้วข้อความไหลเต็มความกว้าง */
	.tp-quiz { display: block; padding: 13px 14px; }
	.tp-quiz-no { float: left; min-width: 0; margin-right: .4em; text-align: left; }
	.tp-quiz-foot { clear: both; }
	.tp-example { padding: 14px 15px; }
	.tp-key { margin-left: 0; padding: 12px 13px; }
}

@media (max-width: 1280px) {
	.tp-chapter-nav-btn { width: 38px; padding: 0; }
	.tp-chapter-nav-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}

@media (max-width: 640px) {
	.tp-cover { overflow: visible; background: var(--tp-card); }
	.tp-cover > img { aspect-ratio: 1.45 / 1; border-radius: 15px 15px 0 0; object-position: center; }
	.tp-cover-copy { position: static; width: auto; padding: 22px 20px 18px; border: 0; border-top: 1px solid var(--tp-line); border-radius: 0; box-shadow: none; }
	.tp-cover-copy h1 { max-width: none; font-size: clamp(2.65em, 14vw, 4em); }
	.tp-cover-copy h1 span { display: inline; }
	.tp-cover-copy p { margin-top: 12px; font-size: 1em; }
	.tp-cover-actions { margin-top: 18px; }
	.tp-start, .tp-browse { flex: 1 1 150px; justify-content: center; }
	.tp-cover-facts { position: static; padding: 0 20px 20px; background: var(--tp-card); }
	.tp-home-intro { grid-template-columns: minmax(0,1fr); gap: 16px; padding: 25px 2px 38px; }
	.tp-home-intro a { justify-self: start; }
	.tp-home-toc > header { display: block; }
	.tp-home-toc header p { margin-top: 5px; text-align: left; }
	.tp-home-chapter { grid-template-columns: 104px minmax(0,1fr) 20px; gap: 11px; padding: 11px 0; }
	.tp-home-chapter img { width: 104px; border-radius: 9px; }
	.tp-home-chapter-title { font-size: 1.24em; }
	.tp-chapter-art { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.tp-root *, .tp-root *::before, .tp-root *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ปุ่มออกจากโปรแกรมนี้ในสารบัญ — แยกตัวจากรายการบท ด้วยเส้นคั่นและสีที่เงียบกว่า */
.tp-root .tp-toc-exit {
	text-decoration: none;
	color: var(--tp-ink-soft);
	border-bottom: 1px solid var(--tp-line);
	margin-bottom: 6px;
}
.tp-root .tp-toc-exit .tp-toc-no { color: var(--tp-ink-faint); }
.tp-root .tp-toc-exit:hover { color: var(--tp-brand); }
.tp-root .tp-toc-exit:hover .tp-toc-no { color: var(--tp-brand); }

/* ───────── ชั้นหนังสือ ๗ เล่มในหน้าเดียว ───────── */

/* ตัวเลือกเล่มในสารบัญ */
.tp-toc-shelf {
	display: flex; align-items: center; gap: 10px;
	padding: 10px 14px 12px; border-bottom: 1px solid var(--tp-line); margin-bottom: 6px;
}
.tp-toc-shelf-label { flex: 0 0 auto; font-size: .82em; color: var(--tp-ink-faint); }
.tp-book-select {
	flex: 1; min-width: 0; font: inherit; font-size: .9em; color: var(--tp-ink);
	padding: 7px 10px; border: 1px solid var(--tp-line); border-radius: 9px; background: var(--tp-card);
}
.tp-book-select:focus { outline: none; border-color: var(--tp-brand); }

/* ปกของเล่มที่ไม่มีภาพประกอบ — ใช้พื้นสีของชุดแทน ข้อความวางแบบเดียวกับปกมีภาพ */
.tp-cover.no-art {
	min-height: 300px;
	background: linear-gradient(135deg, #f1eefb 0%, #f5efe4 55%, #e9f3f0 100%);
}
.tp-cover.no-art .tp-cover-copy { position: static; width: auto; max-width: 620px; margin: clamp(22px, 5vw, 54px) clamp(20px, 5vw, 58px) 0; }
.tp-cover-copy h1.is-skills { max-width: none; font-size: clamp(2.2em, 4vw, 3.6em); line-height: 1.1; color: var(--tp-brand); }
.tp-cover.no-art .tp-cover-facts { position: static; margin: 18px clamp(20px, 5vw, 58px) 24px; }

/* ชั้นหนังสือบนหน้าปก */
.tp-shelf { margin: 30px 0 6px; }
.tp-shelf header h2 { margin: 0 0 2px; font-size: 1.15em; font-weight: 600; }
.tp-shelf header p { margin: 0 0 12px; color: var(--tp-ink-faint); font-size: .92em; }
.tp-shelf-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.tp-shelf-book {
	display: flex; flex-direction: column; gap: 2px; text-align: left;
	padding: 12px 14px; border: 1px solid var(--tp-line); border-radius: 12px;
	background: var(--tp-card); font: inherit; color: inherit; cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.tp-shelf-book:hover { border-color: var(--tp-brand); box-shadow: var(--tp-shadow); }
.tp-shelf-book.is-current { border-color: var(--tp-brand); background: var(--tp-brand-soft); }
.tp-shelf-no { font-size: .74em; letter-spacing: .08em; color: var(--tp-brand); font-weight: 600; }
.tp-shelf-title { font-weight: 600; line-height: 1.35; }
.tp-shelf-author { font-size: .78em; color: var(--tp-ink-faint); }

/* โจทย์ที่เป็นไทย (เล่ม "มาฝึกแต่งบาลี") */
.tp-root .tp-chapter .tp-quiz-kicker {
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .46em; letter-spacing: .1em;
	color: var(--tp-teal); margin: 0 0 2px;
}
.tp-quiz-thai { margin: 0; }
/* คำศัพท์ช่วยที่หนังสือให้มาท้ายโจทย์ */
.tp-root .tp-chapter .tp-quiz-hint {
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .5em; color: var(--tp-ink-faint); margin-top: 4px;
}
/* ป้ายคั่นระหว่างเฉลยของหนังสือกับเฉลยจากคลังธรรมบท */
.tp-root .tp-chapter .tp-key-group {
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .46em; letter-spacing: .12em;
	color: var(--tp-ink-faint); margin: 16px 0 8px; padding-top: 12px; border-top: 1px dashed rgba(14,124,104,.22);
}

.tp-cover-author { color: var(--tp-brand); font-weight: 600; }

/* ───────── หลักสูตรเล่มเดียว: ภาค / ระดับ / แหล่งที่มา ───────── */
.tp-toc-part {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 14px 14px 6px; padding-top: 12px; border-top: 1px solid var(--tp-line);
	font-size: .86em; color: var(--tp-ink);
}
.tp-toc-part:first-child { border-top: 0; padding-top: 0; }
.tp-toc-part-no { color: var(--tp-brand); font-weight: 700; letter-spacing: .04em; }
.tp-toc-part-title { font-weight: 600; }
.tp-level {
	display: inline-block; padding: 1px 8px; border-radius: 99px;
	font-size: .72em; font-weight: 600; letter-spacing: .04em; line-height: 1.7;
	background: var(--tp-brand-soft); color: var(--tp-brand);
}
.tp-level[data-level="เริ่มต้น"] { background: #eaf6f1; color: var(--tp-teal); }
.tp-level[data-level="เริ่มต้น–กลาง"] { background: #eaf6f1; color: var(--tp-teal); }
.tp-level[data-level="กลาง–สูง"] { background: #fdf3e2; color: var(--tp-amber); }
.tp-level[data-level="สูง"] { background: #fbe9e4; color: #a24a2a; }

/* เส้นทางการเรียน ๖ ภาค บนหน้าปก */
.tp-parts { margin: 30px 0 8px; }
.tp-parts header h2 { margin: 0 0 2px; font-size: 1.15em; font-weight: 600; }
.tp-parts header p { margin: 0 0 12px; color: var(--tp-ink-faint); font-size: .92em; }
.tp-parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; counter-reset: part; }
.tp-part-card {
	position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left;
	padding: 16px 18px 14px; border: 1px solid var(--tp-line); border-radius: 14px;
	background: var(--tp-card); font: inherit; color: inherit; cursor: pointer;
	box-shadow: var(--tp-shadow); transition: border-color .15s, transform .15s;
}
.tp-part-card:hover { border-color: var(--tp-brand); transform: translateY(-2px); }
.tp-part-no { font-size: .78em; letter-spacing: .12em; color: var(--tp-brand); font-weight: 700; }
.tp-part-title { font-weight: 700; font-size: 1.05em; line-height: 1.3; }
.tp-part-blurb { font-size: .86em; color: var(--tp-ink-soft); line-height: 1.55; }
.tp-part-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .82em; color: var(--tp-ink-faint); }

/* หัวภาคในสารบัญบนหน้าปก */
.tp-home-part {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	margin: 22px 0 10px; font-size: 1.02em; font-weight: 600;
}
.tp-home-part:first-of-type { margin-top: 6px; }

/* บล็อกคั่น: แบบฝึกหัดเพิ่มเติมจากเล่มโครงสร้าง */
.tp-root .tp-chapter .tp-source-head {
	display: flex; align-items: center; gap: 10px;
	margin: 44px 0 14px; padding: 12px 16px;
	font-family: 'Sarabun', system-ui, sans-serif; font-size: .55em; font-weight: 600;
	color: var(--tp-teal); background: var(--tp-teal-soft);
	border: 1px dashed rgba(14,124,104,.35); border-radius: 12px;
}
.tp-root .tp-chapter .tp-source-head i { font-size: 1.15em; }

.tp-shelf-book.is-course { grid-column: 1 / -1; background: linear-gradient(135deg, #f1eefb, #f5efe4); }
.tp-shelf-book.is-course .tp-shelf-title { font-size: 1.08em; }
