/* =========================================================================
   วิเวกธรรม — วัดป่าวิเวก (ธรรมชาน์) · design system ต้นแบบ v2 "วารสารศิลปะ"
   โทนสี: กรัก (จีวรพระป่า) · ป่า · ทองคำเปลว · กระดาษ · หมึก
   ค่าสีมาจาก docs/brand/tokens.json (ตรวจ contrast ด้วย tools/contrast.py)
   ========================================================================= */

@font-face { font-family: "Sarabun"; src: url("../fonts/Sarabun-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Sarabun"; src: url("../fonts/Sarabun-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Sarabun"; src: url("../fonts/Sarabun-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Sarabun"; src: url("../fonts/Sarabun-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sarabun"; src: url("../fonts/Sarabun-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Noto Serif Thai"; src: url("../fonts/NotoSerifThai-VF.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62.5% 100%; font-display: swap; }

:root {
  --kraak-900: #3F2410; --kraak-800: #5E3318; --kraak-700: #7A4421; --kraak-500: #A8622E; --kraak-100: #F1E2D0;
  --saffron-500: #E39A2D; --saffron-300: #F3C77E;
  --gold-700: #7E5F17; --gold-500: #C9A24B; --gold-300: #E6CE8C;
  --forest-900: #1C2C22; --forest-800: #24382C; --forest-700: #2F4A3A; --forest-500: #557A62; --forest-100: #E5ECE3;
  --paper-0: #FFFFFF; --paper-50: #FBF8F1; --paper-100: #F4EDE0; --paper-200: #E8DCC6;
  --ink-900: #2A2118; --ink-700: #4A3D30; --ink-600: #6A5B4B;
  --focus: #1F6FB2;

  --font-display: "Noto Serif Thai", "Sarabun", serif;
  --font-body: "Sarabun", "Noto Sans Thai", system-ui, sans-serif;
  --rule: 1px solid var(--ink-900);
  --hair: 1px solid var(--paper-200);
  --ease: cubic-bezier(.2,.7,.2,1);
  --wrap: 1280px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --user-scale: 1; /* ปุ่ม ก ก ก */
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(112.5% * var(--user-scale)); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; overflow-x: clip; font-family: var(--font-body); font-size: 1rem; line-height: 1.75; color: var(--ink-900);
  background: var(--paper-50); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
/* เกรนกระดาษ */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .16 0 0 0 0 .08 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--kraak-700); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--kraak-800); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.3; color: var(--ink-900); margin: 0 0 .5em; overflow-wrap: break-word; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem); font-stretch: 82%; line-height: 1.2; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink-900); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.latin { font-family: var(--font-body); letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; font-weight: 600; }
.todo-note { display: inline-block; font-size: .75rem; color: var(--gold-700); border: 1px dashed var(--gold-500); padding: 0 .45rem; margin-left: .35rem; line-height: 1.6; }
.src { font-size: .8rem; color: var(--ink-600); }

/* ---------- แถบบน ---------- */
.topbar { border-bottom: var(--hair); font-size: .8rem; color: var(--ink-700); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.5rem; }
.topbar__note { margin: 0; display: flex; gap: .6rem; align-items: center; }
.topbar__note b { font-weight: 600; color: var(--kraak-700); }
.fontsize { display: flex; align-items: center; gap: .2rem; }
.fontsize span { margin-right: .4rem; color: var(--ink-600); }
.fontsize button { font: inherit; color: var(--ink-700); background: transparent; border: 1px solid transparent; min-width: 2rem; min-height: 2rem; cursor: pointer; line-height: 1; font-family: var(--font-display); }
.fontsize button[aria-pressed="true"] { border-color: var(--ink-900); color: var(--ink-900); }
.fontsize button:nth-of-type(1) { font-size: .8rem; } .fontsize button:nth-of-type(3) { font-size: 1.2rem; }

/* ---------- หัวเว็บ ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251,248,241,.94); backdrop-filter: blur(10px); border-bottom: var(--rule); }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink-900); flex: none; }
.brand img { width: 2.1rem; height: auto; }
.brand__text { display: grid; line-height: 1.15; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; font-stretch: 90%; }
.brand__sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; color: var(--ink-600); margin-top: .15rem; }
.brand__sub .latin { font-size: .62rem; letter-spacing: .24em; }
.brand__branch { font-size: .74rem; letter-spacing: .01em; }
.brand__branch::before { content: "·"; margin-right: .5rem; color: var(--gold-500); }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.nav a { position: relative; display: flex; align-items: baseline; gap: .35rem; padding: .4rem 0; color: var(--ink-700); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.nav a small { font-family: var(--font-display); color: var(--gold-700); font-size: .72rem; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink-900); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: none; }
.nav a[aria-current="page"] { color: var(--ink-900); }
.header-search { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; color: var(--ink-900); border: var(--rule); border-radius: 50%; }
.header-search:hover { background: var(--ink-900); color: var(--paper-50); }
.nav-toggle { display: none; margin-left: auto; font: inherit; background: none; border: var(--rule); padding: .4rem .8rem; color: var(--ink-900); align-items: center; gap: .45rem; cursor: pointer; }
.nav .nav-close { display: none; }
/* จอกว้างปานกลาง: เมนู ๗ รายการ — ซ่อนเลขบทเพื่อไม่ให้หัวเว็บล้น */
@media (min-width: 1101px) and (max-width: 1320px) { .nav ul { gap: 1.15rem; } .nav a small { display: none; } }
@media (max-width: 1100px) {
  .site-header { backdrop-filter: none; background: var(--paper-50); } /* backdrop-filter ทำให้ลูกที่เป็น fixed อ้างอิง header */
  .nav-toggle { display: inline-flex; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(24rem, 88vw); background: var(--paper-50); border-left: var(--rule); padding: 5rem 1.75rem 2rem; clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .35s var(--ease), visibility 0s .35s; z-index: 50; overflow-y: auto; }
  .nav[data-open="true"] { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .35s var(--ease); }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a { font-family: var(--font-display); font-size: 1.5rem; font-stretch: 85%; padding: .8rem 0; border-bottom: var(--hair); }
  .nav a small { font-size: .9rem; min-width: 1.6rem; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { color: var(--kraak-700); }
  .nav .nav-close { display: grid; position: absolute; top: 1.1rem; right: 1.1rem; }
}
.scrim { position: fixed; inset: 0; background: rgba(42,33,24,.45); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

/* ---------- ลิงก์/ปุ่มแบบวารสาร ---------- */
.link-arrow { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--ink-900); text-decoration: none; border-bottom: var(--rule); padding-bottom: .2rem; }
.link-arrow .icon { transition: transform .3s var(--ease); }
.link-arrow:hover { color: var(--kraak-700); border-color: var(--kraak-700); }
.link-arrow:hover .icon { transform: translateX(4px); }
.btn { display: inline-flex; align-items: center; gap: .55rem; font: inherit; font-weight: 600; text-decoration: none; padding: .75rem 1.3rem; min-height: 3rem; border: var(--rule); background: transparent; color: var(--ink-900); cursor: pointer; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink-900); color: var(--paper-50); }
.btn--solid { background: var(--kraak-700); border-color: var(--kraak-700); color: var(--paper-0); }
.btn--solid:hover { background: var(--kraak-800); border-color: var(--kraak-800); color: var(--paper-0); }
.btn--sm { padding: .4rem .85rem; min-height: 2.5rem; font-size: .85rem; }
.icon-btn { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: var(--rule); background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; font: inherit; font-size: .78rem; }

/* ---------- แผ่นภาพ (plate) ---------- */
.plate { margin: 0; }
.plate__img { position: relative; background: var(--paper-100); overflow: hidden; }
.plate__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(.3) contrast(1.05) brightness(1.03); mix-blend-mode: multiply; transition: filter .8s var(--ease), transform 1.2s var(--ease); }
.plate:hover .plate__img img { filter: none; transform: scale(1.02); }
.plate--color .plate__img img { filter: none; mix-blend-mode: normal; }
.plate figcaption { display: flex; gap: .9rem; align-items: baseline; margin-top: .65rem; padding-top: .55rem; border-top: var(--rule); font-size: .8rem; color: var(--ink-700); line-height: 1.5; }
.plate figcaption b { font-family: var(--font-display); font-weight: 600; color: var(--ink-900); white-space: nowrap; }

/* ---------- ปก (หน้าแรก) ---------- */
.front { padding: clamp(1.75rem, 3vw, 3rem) 0 0; }
.masthead { text-align: center; border-bottom: var(--rule); padding-bottom: 1.1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.masthead__eyebrow { margin: 0 0 .2rem; color: var(--ink-700); font-size: .85rem; }
.masthead__title { margin: 0; font-family: var(--font-display); font-weight: 700; font-stretch: 68%; font-size: clamp(4.6rem, 1.5rem + 11vw, 11.5rem); line-height: 1.02; letter-spacing: -.01em; color: var(--ink-900); }
.masthead__title span { color: var(--kraak-700); }
.issue-line { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.5rem; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--ink-900); box-shadow: 0 -4px 0 -3px var(--ink-900); font-size: .85rem; color: var(--ink-700); }
.issue-line > * + *::before { content: "◆"; font-size: .5rem; color: var(--gold-500); margin-right: 1.5rem; vertical-align: middle; }
.cover__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); align-items: start; }
.cover__story { grid-column: 1 / span 6; padding-top: 1rem; }
.cover__plate { grid-column: 7 / span 6; }
.cover__plate .plate__img { aspect-ratio: 4 / 4.6; outline: 1px solid var(--ink-900); outline-offset: 10px; }
.kicker { display: inline-flex; align-items: center; gap: .7rem; margin: 0 0 1.2rem; color: var(--kraak-700); }
.kicker::before { content: ""; width: 2.25rem; height: 1px; background: currentColor; }
.coverline { font-size: clamp(4rem, 1.5rem + 7.5vw, 8.4rem); font-stretch: 70%; font-weight: 700; line-height: 1.12; margin: 0 0 1.75rem; color: var(--ink-900); }
.coverline em { font-style: normal; color: var(--kraak-700); display: block; padding-left: .9em; }
.dek { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); line-height: 1.75; color: var(--ink-700); max-width: 30em; }
.byline { font-size: .9rem; color: var(--ink-600); margin-bottom: 1.75rem; }
.byline strong { color: var(--ink-900); font-weight: 600; }

.contents { margin-top: clamp(3rem, 5vw, 4.5rem); border-top: var(--rule); border-bottom: var(--rule); }
.contents .wrap { display: grid; grid-template-columns: 10rem repeat(6, minmax(0, 1fr)); }
.contents h2 { margin: 0; padding: 1.1rem 1rem 1.1rem 0; font-size: 1.1rem; font-stretch: 85%; border-right: var(--hair); align-self: stretch; display: flex; align-items: center; }
.contents a { display: grid; align-content: start; gap: .15rem; padding: 1.1rem 1rem; text-decoration: none; color: var(--ink-900); border-right: var(--hair); transition: background .25s; }
.contents a:last-child { border-right: 0; }
.contents a:hover { background: var(--paper-100); }
.contents a b { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; color: var(--gold-700); line-height: 1.1; }
.contents a span { font-weight: 600; }
.contents a small { color: var(--ink-600); font-size: .78rem; line-height: 1.45; }

/* ---------- บท (chapter) ---------- */
.chapter { padding: clamp(4rem, 3rem + 5vw, 8rem) 0; border-bottom: var(--hair); }
.chapter__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); }
.chapter__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: 6.5rem; }
.chapter__body { grid-column: 6 / span 7; }
.chapter__no { display: block; font-family: var(--font-display); font-weight: 300; font-stretch: 75%; font-size: clamp(5rem, 3rem + 7vw, 9.5rem); line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--gold-500); margin-bottom: .5rem; }
.chapter__label { margin: 0 0 .6rem; color: var(--kraak-700); font-size: .82rem; font-weight: 600; }
.chapter__dek { color: var(--ink-700); margin-bottom: 1.5rem; }
.chapter--dark { background: var(--kraak-900); color: var(--paper-100); border: 0; }
.chapter--dark h2, .chapter--dark h3 { color: var(--paper-50); }
.chapter--dark .chapter__label, .chapter--dark .kicker { color: var(--gold-300); }
.chapter--dark .plate figcaption { border-color: var(--gold-500); color: var(--paper-200); }
.chapter--dark .plate figcaption b { color: var(--gold-300); }
.chapter--dark .plate__img { background: var(--paper-200); }
.chapter--dark .link-arrow { color: var(--paper-50); border-color: var(--gold-300); }
.chapter--dark .link-arrow:hover { color: var(--gold-300); }
.chapter--paper { background: var(--paper-100); }

/* ---------- เสียงธรรม (track listing) ---------- */
.talks { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.talk { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto; gap: 1.1rem; align-items: center; padding: 1.05rem .25rem; border-bottom: var(--hair); transition: background .25s; }
.talk:hover { background: rgba(232,220,198,.35); }
.talk__no { font-family: var(--font-display); font-size: 1.35rem; color: var(--gold-700); line-height: 1; }
.talk__title { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; line-height: 1.45; color: var(--ink-900); }
.talk__title.untitled { font-family: var(--font-body); font-style: italic; color: var(--ink-600); font-size: 1rem; }
a.talk__title { display: block; text-decoration: none; }
a.talk__title:hover { color: var(--kraak-700); text-decoration: underline; text-underline-offset: .2em; }
.talk__meta { font-size: .8rem; color: var(--ink-600); margin-top: .2rem; }
.talk__meta span + span::before { content: " · "; }
.talk__dur { font-size: .85rem; color: var(--ink-700); font-variant-numeric: tabular-nums; white-space: nowrap; }
.play { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: var(--rule); background: transparent; color: var(--ink-900); display: grid; place-items: center; cursor: pointer; transition: background .2s, color .2s; }
.play:hover { background: var(--ink-900); color: var(--paper-50); }
.play .icon { width: 1rem; height: 1rem; }
.talk[data-playing="true"] { background: rgba(241,226,208,.6); }
.talk[data-playing="true"] .talk__no { color: var(--kraak-700); }
.talk[data-playing="true"] .play { background: var(--kraak-700); border-color: var(--kraak-700); color: var(--paper-0); }

/* ---------- หนังสือ ---------- */
.excerpt { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); margin-top: 3.5rem; }
.excerpt__title { grid-column: 1 / span 4; }
.excerpt__title h3 { font-size: clamp(2.6rem, 1.5rem + 3.5vw, 4.8rem); font-stretch: 72%; font-weight: 700; line-height: 1.12; margin-bottom: .75rem; }
.excerpt__title p { color: var(--ink-600); font-size: .9rem; }
.excerpt__text { grid-column: 5 / span 8; columns: 2 16rem; column-gap: var(--gutter); column-rule: var(--hair); font-size: 1.02rem; line-height: 1.9; }
.excerpt__text p:first-child::first-line { font-weight: 600; color: var(--kraak-800); }
.excerpt__text .link-arrow { break-before: avoid; }
.verse { font-family: var(--font-display); color: var(--kraak-800); text-align: center; break-inside: avoid; margin: 1.25rem 0; line-height: 2; padding: .75rem 0; border-top: var(--hair); border-bottom: var(--hair); }
.shelf { margin-top: 4.5rem; padding-top: 2.5rem; border-top: var(--rule); }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 2.25rem 1.75rem; }
.book { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .9rem; }
.cover {
  position: relative; aspect-ratio: 3 / 4.3; padding: 1rem .95rem 1rem 1.3rem; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--c, var(--kraak-700)); color: var(--paper-50); overflow: hidden;
  box-shadow: inset 5px 0 0 rgba(0,0,0,.22), inset 6px 0 0 rgba(255,255,255,.1), 8px 10px 0 -2px var(--paper-200);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.book:hover .cover { transform: translate(-3px, -4px); box-shadow: inset 5px 0 0 rgba(0,0,0,.22), 12px 14px 0 -2px var(--paper-200); }
.cover::before { content: ""; position: absolute; left: 1.3rem; right: .95rem; top: 2.7rem; border-top: 1px solid rgba(230,206,140,.6); }
.cover__series { font-size: .66rem; letter-spacing: .08em; color: var(--gold-300); font-weight: 600; }
.cover__title { font-family: var(--font-display); font-weight: 600; font-stretch: 80%; font-size: 1.45rem; line-height: 1.3; }
.cover__mark { width: 1.7rem; opacity: .9; align-self: flex-start; }
.book__meta { font-size: .8rem; color: var(--ink-600); line-height: 1.55; }
.book__meta strong { display: block; color: var(--ink-900); font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.cover--forest { --c: var(--forest-700); } .cover--kraak { --c: var(--kraak-700); } .cover--dark { --c: var(--ink-900); } .cover--moss { --c: #4F5E33; }

/* ---------- interlude: คำสอนวันนี้ ---------- */
.interlude { background: var(--ink-900); color: var(--paper-100); }
.interlude .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); padding: clamp(4rem, 3rem + 5vw, 8rem) 0; }
.interlude__mark { grid-column: 1 / span 2; font-family: var(--font-display); font-size: clamp(8rem, 5rem + 8vw, 15rem); line-height: .75; color: var(--gold-500); }
.interlude__body { grid-column: 3 / span 9; }
.interlude blockquote { margin: 0; }
.interlude blockquote p { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 1.1rem + 1.8vw, 2.7rem); line-height: 1.6; color: var(--paper-50); text-wrap: pretty; margin-bottom: 2rem; }
.interlude footer { display: flex; flex-wrap: wrap; gap: .75rem 2rem; align-items: center; border-top: 1px solid rgba(230,206,140,.4); padding-top: 1rem; font-size: .9rem; color: var(--paper-200); }
.interlude footer cite { font-style: normal; color: var(--gold-300); font-weight: 600; }
.interlude .link-arrow { color: var(--paper-50); border-color: var(--gold-300); margin-left: auto; }
.interlude .kicker { color: var(--gold-300); }

/* ---------- ปฏิปทา ---------- */
.master { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); align-items: center; }
.master__plate { grid-column: 1 / span 5; }
.master__plate .plate__img { aspect-ratio: 4 / 4.8; }
.master__text { grid-column: 7 / span 6; }
.master__name { font-size: clamp(2.8rem, 1.6rem + 3.6vw, 5.2rem); font-stretch: 70%; font-weight: 700; line-height: 1.15; margin-bottom: .2em; }
.master__name span { display: block; font-size: .42em; font-weight: 400; font-stretch: 90%; color: var(--gold-300); margin-top: .35em; }
.facts-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 2rem 0; border-top: 1px solid rgba(230,206,140,.45); }
.facts-dl dt, .facts-dl dd { padding: .7rem 0; border-bottom: 1px solid rgba(230,206,140,.25); margin: 0; }
.facts-dl dt { padding-right: 2rem; font-size: .82rem; color: var(--paper-200); }
.facts-dl dd { font-family: var(--font-display); font-weight: 500; color: var(--paper-50); }
.pull { margin: 2rem 0; padding: 0 0 0 1.5rem; border-left: 2px solid var(--gold-500); font-family: var(--font-display); font-size: 1.2rem; line-height: 1.7; }
.pull cite { display: block; margin-top: .6rem; font-family: var(--font-body); font-style: normal; font-size: .8rem; opacity: .85; }

/* ---------- ธรรมะในวัด (mosaic) ---------- */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem var(--gutter); margin-top: 3.5rem; }
.mosaic .m1 { grid-column: 1 / span 7; } .mosaic .m1 .plate__img { aspect-ratio: 16 / 9.5; }
.mosaic .m2 { grid-column: 8 / span 5; align-self: end; } .mosaic .m2 .plate__img { aspect-ratio: 4 / 3.2; }
.mosaic .m3 { grid-column: 1 / span 4; } .mosaic .m3 .plate__img { aspect-ratio: 4 / 3.4; }
.mosaic .m4 { grid-column: 5 / span 4; margin-top: 3rem; } .mosaic .m4 .plate__img { aspect-ratio: 4 / 3.4; }
.mosaic .m5 { grid-column: 9 / span 4; } .mosaic .m5 .plate__img { aspect-ratio: 4 / 4.6; }
.sign-card { grid-column: 2 / span 10; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gutter); align-items: center; margin-top: 2rem; padding: 2.5rem 0; border-top: var(--rule); border-bottom: var(--rule); }
.sign-card blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); font-stretch: 85%; line-height: 1.55; color: var(--ink-900); }
.sign-card blockquote em { font-style: normal; color: var(--kraak-700); }
.sign-card p { margin: 1rem 0 0; font-size: .85rem; color: var(--ink-600); }

/* ---------- บันทึกกิจกรรม (journal) ---------- */
.journal { list-style: none; margin: 3rem 0 0; padding: 0; border-top: var(--rule); }
.entry { display: grid; grid-template-columns: 9rem 15rem minmax(0, 1fr) auto; gap: var(--gutter); align-items: center; padding: 1.75rem 0; border-bottom: var(--hair); }
.entry__year { font-family: var(--font-display); font-size: 2.6rem; font-stretch: 75%; color: var(--gold-700); line-height: 1; }
.entry__year small { display: block; font-family: var(--font-body); font-size: .78rem; color: var(--ink-600); margin-top: .35rem; }
.entry .plate__img { aspect-ratio: 3 / 2; }
.entry h3 { font-size: 1.45rem; font-stretch: 85%; margin-bottom: .3rem; }
.entry h3 a { color: var(--ink-900); text-decoration: none; }
.entry h3 a:hover { color: var(--kraak-700); text-decoration: underline; }
.entry p { margin: 0; color: var(--ink-700); font-size: .95rem; }
.entry__tag { font-size: .72rem; letter-spacing: .08em; color: var(--kraak-700); font-weight: 600; margin-bottom: .3rem; display: block; }
.entry__count { font-size: .8rem; color: var(--ink-600); white-space: nowrap; }

/* ---------- การมาวัด ---------- */
.visit { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); margin-top: 3rem; }
.directory { grid-column: 1 / span 5; margin: 0; border-top: var(--rule); }
.directory div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: var(--hair); }
.directory dt { font-family: var(--font-display); font-weight: 600; }
.directory dd { margin: 0; color: var(--ink-700); font-size: .95rem; }
.visit__map { grid-column: 7 / span 6; position: relative; min-height: 26rem; background: var(--forest-100); outline: 1px solid var(--ink-900); outline-offset: 10px; }
.visit__map::before { content: "แผนที่ OpenStreetMap · 15.533944, 104.726888"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--forest-700); font-size: .85rem; }
.visit__map iframe { position: relative; width: 100%; height: 100%; min-height: 26rem; border: 0; display: block; filter: grayscale(.85) sepia(.25); }

/* ---------- โคโลฟอน (ส่วนท้าย) ---------- */
.colophon { background: var(--forest-900); color: var(--paper-200); padding: clamp(4rem, 6vw, 6rem) 0 0; }
.colophon a { color: var(--paper-100); text-decoration: none; }
.colophon a:hover { color: var(--gold-300); text-decoration: underline; }
.colophon__top { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem var(--gutter); }
.colophon__brand { grid-column: 1 / span 5; }
.colophon__brand img { width: 2.6rem; margin-bottom: 1rem; }
.colophon__brand .colophon__title { font-family: var(--font-display); font-weight: 700; font-stretch: 68%; font-size: clamp(3.4rem, 2rem + 4vw, 5.6rem); line-height: 1.05; color: var(--paper-50); margin: 0 0 .5rem; }
.colophon__brand p { max-width: 28em; font-size: .92rem; }
.colophon nav { grid-column: span 2; }
.colophon h2 { font-family: var(--font-body); font-size: .8rem; letter-spacing: .04em; color: var(--gold-300); margin-bottom: 1rem; font-weight: 600; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .92rem; }
.colophon__note { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); border-top: 1px solid rgba(230,206,140,.3); padding-top: 1.5rem; font-size: .82rem; }
.colophon__note strong { display: block; color: var(--gold-300); font-weight: 600; margin-bottom: .25rem; letter-spacing: .04em; }
.colophon__bottom { margin-top: 2.5rem; border-top: 1px solid rgba(230,206,140,.15); padding: 1.25rem 0 6.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; }

/* ---------- เครื่องเล่นเสียง ---------- */
.player {
  position: fixed; left: 50%; bottom: 1rem; translate: -50% 0; z-index: 95; width: min(100% - 1.5rem, 58rem);
  background: var(--ink-900); color: var(--paper-50); box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .8rem 1rem .8rem .8rem;
  transform: translateY(150%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s;
}
.player[data-open="true"] { transform: none; visibility: visible; transition: transform .4s var(--ease); }
.player .play { border-color: var(--gold-300); color: var(--gold-300); width: 3rem; height: 3rem; }
.player .play:hover { background: var(--gold-300); color: var(--ink-900); }
.player__title { font-family: var(--font-display); font-weight: 500; font-size: 1rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__sub { font-size: .75rem; color: var(--paper-200); }
.player__bar { display: flex; align-items: center; gap: .6rem; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--paper-200); margin-top: .15rem; }
.player input[type="range"] { flex: 1; accent-color: var(--gold-300); height: 1.5rem; }
.player__side { display: flex; align-items: center; gap: .35rem; }
.player .icon-btn { border-color: rgba(251,248,241,.3); color: var(--paper-50); }
.player .icon-btn:hover { background: rgba(251,248,241,.12); }
.speed { width: auto; padding: 0 .65rem; border-radius: 999px; }

/* ---------- หน้าย่อย ---------- */
.opening { padding: clamp(2.5rem, 4vw, 4rem) 0 clamp(2.5rem, 4vw, 3.5rem); border-bottom: var(--rule); }
.opening .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); align-items: end; }
.opening__no { grid-column: 1 / span 3; }
.opening__no .chapter__no { margin: 0; }
.opening__text { grid-column: 4 / span 9; }
.opening h1 { font-size: clamp(2.8rem, 1.5rem + 4.5vw, 6rem); font-stretch: 70%; font-weight: 700; line-height: 1.12; margin-bottom: .4em; }
.opening h1 > span:not(.nowrap) { display: block; font-size: .45em; color: var(--kraak-700); font-weight: 500; font-stretch: 90%; margin-top: .3em; }
.opening .kicker { margin-bottom: 1.6rem; }
.opening p { color: var(--ink-700); max-width: 42em; font-size: 1.05rem; margin: 0; }
.crumbs { font-size: .8rem; color: var(--ink-600); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-600); }
.crumbs span[aria-hidden] { margin: 0 .45rem; }
.section { padding: clamp(3rem, 5vw, 5rem) 0; }

.library { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.filters { position: sticky; top: 6rem; display: grid; gap: 1.75rem; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-family: var(--font-display); font-weight: 600; margin-bottom: .55rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font: inherit; font-size: .85rem; border: 1px solid var(--paper-200); background: transparent; color: var(--ink-700); padding: .3rem .8rem; min-height: 2.4rem; cursor: pointer; }
.chip:hover { border-color: var(--ink-900); }
.chip[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper-50); }
.search { position: relative; }
.search input { width: 100%; font: inherit; padding: .75rem .5rem .75rem 2.2rem; border: 0; border-bottom: var(--rule); background: transparent; color: var(--ink-900); min-height: 3rem; border-radius: 0; }
.search input:focus { outline: none; border-bottom: 2px solid var(--kraak-700); }
.search .icon { position: absolute; left: .2rem; top: 50%; translate: 0 -50%; color: var(--ink-600); }
.tabs { display: flex; gap: 2rem; border-bottom: var(--rule); margin-bottom: 2.5rem; }
.tab { font: inherit; font-family: var(--font-display); font-size: 1.3rem; font-stretch: 85%; font-weight: 600; white-space: nowrap; background: none; border: none; padding: .7rem 0; color: var(--ink-600); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; display: inline-flex; gap: .5rem; align-items: baseline; }
.tab[aria-selected="true"] { color: var(--ink-900); border-bottom-color: var(--kraak-700); }
.count { font-family: var(--font-body); font-size: .75rem; color: var(--gold-700); font-weight: 600; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 3rem 0 .75rem; }
.set-head:first-child { margin-top: 0; }
.set-head h2 { font-size: 1.6rem; margin: 0; }
.set-head small { color: var(--ink-600); }
.empty { padding: 2.5rem; text-align: center; color: var(--ink-600); border: 1px dashed var(--paper-200); }

/* หลวงพ่อ */
.bio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 var(--gutter); align-items: start; }
.bio__aside { grid-column: 1 / span 4; position: sticky; top: 6rem; }
.bio__aside .plate__img { aspect-ratio: 4 / 4.8; }
.bio__card { margin: 2rem 0 0; border-top: var(--rule); }
.bio__card div { padding: .75rem 0; border-bottom: var(--hair); }
.bio__card dt { font-size: .75rem; color: var(--ink-600); }
.bio__card dd { margin: 0; font-family: var(--font-display); font-weight: 600; }
.prose { grid-column: 6 / span 7; max-width: 40em; }
.prose > p { font-size: 1.05rem; line-height: 1.9; }
.prose h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); margin-top: 3.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose .pull { border-color: var(--kraak-700); color: var(--ink-900); }
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: var(--rule); }
.timeline li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.1rem 0; border-bottom: var(--hair); }
.timeline time { font-family: var(--font-display); font-size: 1.6rem; font-stretch: 75%; color: var(--gold-700); line-height: 1.2; }
.timeline li.key time { color: var(--kraak-700); font-weight: 700; }
.timeline strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink-900); }
.timeline span { color: var(--ink-700); font-size: .95rem; }
.callout { border: 1px solid var(--ink-900); padding: 1.6rem 1.6rem 1.4rem; margin: 2.5rem 0; background: var(--paper-100); position: relative; }
.callout::before { content: "บันทึกบรรณาธิการ"; position: absolute; top: -.8rem; left: 1.25rem; background: var(--paper-50); padding: 0 .5rem; font-size: .72rem; letter-spacing: .08em; color: var(--kraak-700); font-weight: 600; }
.callout strong { display: block; font-family: var(--font-display); }

/* หน้าอ่าน */
.reader-bar { position: sticky; top: 4.25rem; z-index: 30; background: rgba(251,248,241,.96); border-bottom: var(--hair); }
.reader-bar .wrap { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; }
.reader-bar__title { font-family: var(--font-display); font-weight: 600; margin-right: auto; }
.seg { display: inline-flex; border: var(--rule); }
.seg button { font: inherit; font-size: .85rem; border: 0; background: transparent; padding: .3rem .85rem; min-height: 2.4rem; cursor: pointer; color: var(--ink-700); }
.seg button + button { border-left: var(--hair); }
.seg button[aria-pressed="true"] { background: var(--ink-900); color: var(--paper-50); }
.book-page { padding: 3.5rem 0 5rem; transition: background .3s, color .3s; }
.book-page article { max-width: 36em; margin: 0 auto; font-size: 1.12rem; line-height: 1.95; }
.book-page article > p:not([class]) { text-indent: 2.2em; margin-bottom: 1.1em; }
.book-page article > p:not([class]):first-of-type::first-line { font-weight: 600; }
.book-page .verse { border-color: var(--paper-200); }
.book-page header { text-align: center; margin-bottom: 2.5rem; padding-bottom: 2rem; border-bottom: var(--rule); }
.book-page header .kicker { justify-content: center; }
.book-page h1 { font-size: clamp(3.2rem, 2rem + 4vw, 5.6rem); font-stretch: 70%; font-weight: 700; line-height: 1.15; margin-bottom: .25em; }
.book-page .byline { margin: 0; }
.book-page .signature { text-align: right; font-family: var(--font-display); color: var(--kraak-800); margin-top: 3rem; line-height: 1.7; }
.listen { display: flex; align-items: center; gap: 1rem; margin: 0 0 2.5rem; padding: 1rem 0; border-top: var(--hair); border-bottom: var(--hair); }
.listen p { margin: 0; font-size: .9rem; color: var(--ink-700); line-height: 1.55; }
.listen strong { color: var(--ink-900); display: block; font-family: var(--font-display); }
.proof-note { margin: 0 0 2.5rem; font-size: .82rem; color: var(--gold-700); border: 1px dashed var(--gold-500); padding: .6rem .9rem; }
[data-theme="sepia"] .book-page { background: #F1E4C9; }
[data-theme="night"] .book-page { background: #1D1915; color: #E8DECB; }
[data-theme="night"] .book-page h1, [data-theme="night"] .book-page .signature, [data-theme="night"] .book-page .verse { color: var(--gold-300); }
[data-theme="night"] .book-page header { border-color: #8C7A5B; }
[data-theme="night"] .book-page .byline, [data-theme="night"] .listen p, [data-theme="night"] .crumbs, [data-theme="night"] .crumbs a { color: #BFB29C; }
[data-theme="night"] .listen strong { color: #E8DECB; }
[data-theme="night"] .listen .play { color: #E8DECB; border-color: #E8DECB; }


/* ---------- คลังภาพ ---------- */
.gallery-head { display: flex; align-items: baseline; gap: 1.5rem; border-bottom: var(--rule); padding-bottom: 1rem; margin-bottom: 2.5rem; }
.gallery-head .chapter__no { font-size: clamp(3.5rem, 2rem + 4vw, 6rem); margin: 0; }
.gallery-head h2 { margin: 0; }
.album-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 2.75rem var(--gutter); }
.album-card { text-decoration: none; color: var(--ink-900); }
.album-card .plate__img { aspect-ratio: 4 / 3; display: block; }
.album-card h3 { margin: .7rem 0 0; font-size: 1.25rem; font-stretch: 85%; line-height: 1.4; }
.album-card:hover h3 { color: var(--kraak-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.album-card:hover .plate__img img { filter: none; }
.album-grid { list-style: none; margin: 0; padding: 0; columns: 4 14rem; column-gap: 1.25rem; }
.album-grid li { break-inside: avoid; margin-bottom: 1.25rem; }
.thumb { all: unset; display: block; cursor: zoom-in; width: 100%; }
.thumb:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.thumb .plate__img { display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) sepia(.3) contrast(1.05) brightness(1.03); mix-blend-mode: multiply; transition: filter .6s var(--ease); }
.thumb:hover img, .thumb:focus-visible img { filter: none; }
.thumb__cap { display: flex; gap: .6rem; align-items: baseline; padding-top: .45rem; margin-top: .45rem; border-top: var(--hair); font-size: .8rem; color: var(--ink-700); line-height: 1.45; }
.thumb__cap b { font-family: var(--font-display); color: var(--gold-700); font-weight: 500; }
.sibs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 2.5rem; }
.sibs a { font-size: .82rem; padding: .3rem .75rem; border: 1px solid var(--paper-200); color: var(--ink-700); text-decoration: none; }
.sibs a:hover { border-color: var(--ink-900); }
.sibs a[aria-current] { background: var(--ink-900); color: var(--paper-50); border-color: var(--ink-900); }
.lightbox { border: 0; padding: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh; background: rgba(29,25,21,.96); color: var(--paper-100); }
.lightbox::backdrop { background: rgba(29,25,21,.9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: min(92vw, 1100px); display: grid; gap: .9rem; }
.lightbox img { max-height: 78dvh; width: auto; height: auto; max-width: 100%; margin: 0 auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox figcaption { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid rgba(230,206,140,.35); padding-top: .6rem; font-size: .85rem; }
.lightbox figcaption b { font-family: var(--font-display); font-weight: 500; color: var(--gold-300); font-size: 1.05rem; }
.lightbox .icon-btn { position: fixed; border-color: rgba(251,248,241,.35); color: var(--paper-50); background: rgba(29,25,21,.6); width: 3rem; height: 3rem; }
.lb-prev { left: 1rem; top: 50%; } .lb-next { right: 1rem; top: 50%; } .lb-close { right: 1rem; top: 1rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 4rem; border-top: var(--rule); padding-top: 1.25rem; }
.pager a { text-decoration: none; color: var(--ink-900); font-family: var(--font-display); font-weight: 600; line-height: 1.4; }
.pager small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .75rem; color: var(--ink-600); }
.pager a:hover { color: var(--kraak-700); }
[data-theme="night"] .pager a { color: #E8DECB; }
.excluded { border-top: var(--hair); padding-top: 1rem; font-size: .85rem; color: var(--ink-600); }
.excluded summary { cursor: pointer; font-weight: 600; color: var(--ink-700); }
.mosaic a.plate, .sign-card a.plate { text-decoration: none; color: inherit; display: block; }
.mosaic a.plate:hover .plate__img img, .sign-card a.plate:hover .plate__img img { filter: none; }
@media (max-width: 640px) { .album-grid { columns: 2; column-gap: .9rem; } .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1rem; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .contents .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contents h2 { grid-column: 1 / -1; border-right: 0; border-bottom: var(--hair); padding: .9rem 0; }
  .contents a:nth-of-type(3n) { border-right: 0; }
  .contents a { border-bottom: var(--hair); }
  .entry { grid-template-columns: 7rem 11rem minmax(0, 1fr); }
  .entry__count { grid-column: 3; }
}
@media (max-width: 900px) {
  .cover__story, .cover__plate, .chapter__head, .chapter__body, .excerpt__title, .excerpt__text, .master__plate, .master__text,
  .mosaic > *, .sign-card, .directory, .visit__map, .bio__aside, .prose, .opening__no, .opening__text, .interlude__mark, .interlude__body, .colophon__brand { grid-column: 1 / -1; }
  .cover__plate { margin-top: 2.5rem; }
  .chapter__head, .bio__aside, .filters { position: static; }
  .chapter__head { margin-bottom: 2rem; }
  .excerpt__title { margin-bottom: 1.5rem; }
  .master__plate { max-width: 26rem; margin-bottom: 2.5rem; }
  .mosaic .m4 { margin-top: 0; }
  .sign-card { grid-template-columns: minmax(0, 1fr); }
  .visit__map { margin-top: 2.5rem; }
  .library { grid-template-columns: minmax(0, 1fr); }
  .bio__aside { max-width: 24rem; margin-bottom: 3rem; }
  .opening__no { display: none; }
  .interlude__mark { line-height: .8; margin-bottom: -1rem; }
  .colophon nav { grid-column: span 4; }
  .colophon__note { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  html { font-size: calc(106.25% * var(--user-scale)); }
  .topbar__note .long, .topbar__note > span, .fontsize span { display: none; }
  .books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.1rem; }
  .cover__title { font-size: 1.2rem; }
  .brand__sub .latin, .brand__branch::before { display: none; }
  .brand__branch { font-size: .7rem; }
  .brand__name { font-size: 1rem; }
  .brand img { width: 1.8rem; }
  .nav-toggle span { display: none; }
  .nav-toggle { padding: .45rem .6rem; }
  .site-header .wrap { gap: .75rem; min-height: 3.9rem; }
  .issue-line { flex-direction: column; gap: .2rem; align-items: center; }
  .issue-line > * + *::before { display: none; }
  .contents .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents a:nth-of-type(3n) { border-right: var(--hair); }
  .contents a:nth-of-type(2n) { border-right: 0; }
  .talk { grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: .8rem; }
  .talk__dur { grid-column: 2; grid-row: 2; margin-top: -.6rem; font-size: .78rem; color: var(--ink-600); }
  .talk .play { grid-column: 3; grid-row: 1 / span 2; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
  .entry__count { grid-column: auto; }
  .directory div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .colophon nav { grid-column: span 6; }
  .timeline li { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; }
  .player { grid-template-columns: auto minmax(0, 1fr); bottom: .5rem; }
  .player__side { grid-column: 1 / -1; justify-content: flex-end; margin-top: -.2rem; }
  .reader-bar { top: 3.9rem; }
  .reader-bar__title { display: none; }
  .reader-bar .wrap { justify-content: space-between; }
  .reader-bar .btn span { display: none; }
  .tabs { gap: 1.25rem; }
  .tab { font-size: 1.1rem; }
  .book-page article { font-size: 1.05rem; }
  .excerpt__text { columns: 1; }
}

/* ---------- ระบบจริง: หน้าเสียงธรรม ข่าว ตัวอย่างก่อนเผยแพร่ ---------- */
.talk-page { max-width: 46rem; }
.listen--big { margin-bottom: 1.5rem; padding: 1.25rem 0; }
.listen--big .play { width: 4rem; height: 4rem; }
.talk-facts { margin-top: 0; }
.talk-book { margin: 2rem 0 0; font-family: var(--font-display); }
.post-photos { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); gap: .6rem; }
.post-photos .plate__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.post-photos img { width: 100%; height: 100%; object-fit: cover; }
.prose figure { margin: 1.75rem 0; }
.prose figure img { max-width: 100%; height: auto; }
.prose figcaption { font-size: .82rem; color: var(--ink-600); margin-top: .4rem; }
.related-title { margin: 0 0 1.5rem; }
.album-note { margin: -1rem 0 0; }
.preview-bar { position: sticky; top: 0; z-index: 60; padding: .5rem 1rem; text-align: center; background: var(--gold-300); color: var(--kraak-900); font-weight: 600; font-size: .9rem; }

/* ---------- ค้นหาทั้งเว็บ ---------- */
.search--big { display: flex; gap: .75rem; align-items: stretch; max-width: 46rem; }
.search--big input { flex: 1; min-width: 0; font-size: 1.15rem; }
.search--big .btn { flex: none; }
.search-page .search-results { max-width: 52rem; margin-top: 2.25rem; }
.search-summary { margin: 0 0 1rem; color: var(--ink-700); }
.search-summary b { color: var(--ink-900); font-weight: 600; }
.search-kinds { margin-bottom: 1.25rem; }
a.chip { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; }
.chip span { font-size: .78rem; color: var(--ink-600); }
.chip[aria-current="true"] { background: var(--ink-900); border-color: var(--ink-900); color: var(--paper-50); }
.chip[aria-current="true"] span { color: var(--paper-200); }
.results { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1.25rem .25rem; border-bottom: var(--hair); }
.result__kind { display: block; margin-bottom: .2rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; color: var(--kraak-700); }
.result__title { margin: 0 0 .15rem; font-size: 1.25rem; font-stretch: 85%; }
.result__title a { color: var(--ink-900); text-decoration: none; }
.result__title a:hover { color: var(--kraak-700); text-decoration: underline; }
.result__meta { margin: 0; font-size: .82rem; color: var(--ink-600); }
.result__snip { margin: .5rem 0 0; font-size: .95rem; line-height: 1.75; color: var(--ink-700); }
.result mark { background: var(--kraak-100); color: var(--ink-900); padding: 0 .12em; border-radius: 2px; }
.result .play { margin-top: 1.35rem; }
.search-tips { max-width: 40rem; color: var(--ink-700); }
.search-tips__eg a { display: inline-block; margin: .25rem .6rem 0 0; }
.search-empty p { margin: .25rem 0; }
.entry__views { display: block; margin-top: .45rem; font-size: .8rem; color: var(--ink-600); }
@media (max-width: 640px) { .search--big .btn { padding-inline: .9rem; } .result__title { font-size: 1.12rem; } }

/* ไฟล์แนบในเนื้อหา (PDF Word Excel) */
.prose p.file { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .6rem; padding: .85rem 1rem; border: var(--hair); border-left: 3px solid var(--kraak-700); background: var(--paper-0); }
.prose p.file a { font-weight: 600; }
.prose p.file a::before { content: "↓ "; }
.prose p.file small { color: var(--ink-600); }

/* ---------- เกี่ยวกับเรา ---------- */
.abbot { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.abbot__photo .plate__img { aspect-ratio: 4 / 5; }
.abbot__photo .plate__img img { width: 100%; height: 100%; object-fit: cover; }
.abbot__mark { display: grid; place-items: center; background: var(--paper-50); outline: 1px solid var(--paper-200); }
.abbot__mark img { width: 34% !important; height: auto !important; object-fit: contain !important; opacity: .55; }
.abbot__text h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); font-stretch: 80%; margin-bottom: .1rem; }
.abbot__monk { margin: 0 0 1.25rem; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-700); }
.abbot__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0 1.5rem; margin: 0 0 1.5rem; border-top: var(--rule); }
.abbot__facts div { padding: .7rem 0; border-bottom: var(--hair); }
.abbot__facts dt { font-size: .75rem; color: var(--ink-600); }
.abbot__facts dd { margin: 0; font-family: var(--font-display); font-weight: 600; }
.about-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); }
.abbots { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.abbots li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: var(--hair); }
.abbots__no { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--gold-700); }
.abbots strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.abbots strong a { color: var(--ink-900); text-decoration: none; }
.abbots strong a:hover { color: var(--kraak-700); text-decoration: underline; }
.abbots span:not(.abbots__no):not(.nowrap) { font-size: .85rem; color: var(--ink-600); }
.about-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media (max-width: 860px) { .abbot, .about-more { grid-template-columns: 1fr; } .abbot__photo { max-width: 22rem; } .abbot__photo .abbot__mark { aspect-ratio: 2 / 1; } }
