/* กล่องให้เกียรติผู้แต่ง/ผู้เรียบเรียงหนังสือต้นทาง — ใช้ร่วมกันหลายหน้า (หลวงพี่สั่ง ๒๑ พ.ย. ๒๕๖๙ "ให้ credit เด่น ๆ")
   /dony (พระมหาโดนี่) · /principle/ (พระมหาธิติพงศ์ อุตฺตมปญฺโญ) · /aupaiyapak (สมเด็จพระมหาสมณเจ้าฯ) · /handbook/ (พระมหาฉัตรชัย สุวีรธมฺโม)
   โครง: .ac-card > (.ac-cover | .ac-covers) + .ac-body > .ac-kicker .ac-role .ac-name .ac-title .ac-book .ac-people .ac-actions .ac-note
   ไม่ผูกชุดไอคอน (หน้าใส่ <i> ของตัวเอง) · สลับสว่าง/มืดตาม html[data-ui] ของทั้งเว็บ · ชื่อบาลีใส่ .pali-font (ฐ ญ ไม่มีเชิง) */
.ac-card {
	--ac-gold: #f5bf45; --ac-gold-ink: #fcd34d; --ac-ink: #f3f6ff; --ac-muted: #b6c0da; --ac-dim: #8d98b5;
	--ac-line: rgba(245, 191, 69, .45); --ac-bg1: rgba(245, 191, 69, .14); --ac-bg2: #131c38; --ac-chip: rgba(255, 255, 255, .06);
	display: flex; gap: clamp(1.1rem, 3vw, 2rem); align-items: center;
	margin: 1.6rem 0; padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.1rem, 3vw, 2rem);
	border-radius: 20px; border: 1.5px solid var(--ac-line);
	background: radial-gradient(circle at 0% 40%, var(--ac-bg1), transparent 60%), var(--ac-bg2);
	color: var(--ac-ink); font-family: "Sarabun", sans-serif; text-align: left;
	box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}
html[data-ui="light"] .ac-card {
	--ac-gold: #a8610b; --ac-gold-ink: #8a4b08; --ac-ink: #141a33; --ac-muted: #475069; --ac-dim: #646d88;
	--ac-line: #e6c472; --ac-bg1: #fff1c8; --ac-bg2: #fffdf6; --ac-chip: #f6efe0;
	box-shadow: 0 14px 36px rgba(120, 80, 10, .1);
}
.ac-card *, .ac-card *::before { box-sizing: border-box; }
.ac-card p, .ac-card h2, .ac-card dl, .ac-card dd { margin: 0; }

/* ปกหนังสือ (ใบเดียว) */
.ac-cover { flex: none; display: block; width: clamp(110px, 16vw, 168px); transform: rotate(-2.5deg); transition: transform .2s ease; }
.ac-cover:hover { transform: rotate(0) translateY(-3px); }
.ac-cover img { display: block; width: 100%; height: auto; border-radius: 6px 10px 10px 6px; box-shadow: -6px 0 0 rgba(0, 0, 0, .18) inset, 0 16px 30px rgba(0, 0, 0, .35); }
/* ปกหลายเล่มเรียงซ้อนแบบพัด */
.ac-covers { flex: none; position: relative; width: clamp(170px, 24vw, 250px); height: clamp(160px, 22vw, 230px); }
.ac-covers img { position: absolute; bottom: 0; width: 46%; height: auto; border-radius: 4px 7px 7px 4px; box-shadow: 0 10px 22px rgba(0, 0, 0, .35); transition: transform .2s ease; }
.ac-covers img:nth-child(1) { left: 0; transform: rotate(-14deg); }
.ac-covers img:nth-child(2) { left: 11%; transform: rotate(-8deg); }
.ac-covers img:nth-child(3) { left: 22%; transform: rotate(-2deg); }
.ac-covers img:nth-child(4) { left: 33%; transform: rotate(3deg); }
.ac-covers img:nth-child(5) { left: 44%; transform: rotate(8deg); }
.ac-covers img:nth-child(6) { left: 54%; transform: rotate(13deg); }
.ac-covers:hover img { transform: none; }
/* ไม่มีปก: ตราอักษรแทน */
.ac-seal { flex: none; display: grid; place-items: center; width: clamp(96px, 13vw, 132px); aspect-ratio: 1; border-radius: 50%; border: 3px double var(--ac-gold); color: var(--ac-gold); font-size: clamp(2.2rem, 5vw, 3rem); background: var(--ac-chip); }

.ac-body { min-width: 0; flex: 1; }
.ac-kicker { display: inline-flex; align-items: center; gap: .4rem; color: var(--ac-gold); font-weight: 800; font-size: .92rem; letter-spacing: .01em; }
.ac-role { margin-top: .35rem !important; color: var(--ac-muted); font-weight: 700; font-size: .95rem; }
.ac-name { margin-top: .05rem !important; font-size: clamp(1.55rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.3; color: var(--ac-gold-ink); }
.ac-name small { display: inline-block; margin-left: .35rem; font-size: .55em; font-weight: 800; color: var(--ac-ink); opacity: .85; }
.ac-title { margin-top: .25rem !important; color: var(--ac-ink); font-weight: 600; font-size: 1rem; line-height: 1.6; }
.ac-book { margin-top: .7rem !important; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; padding: .35rem .8rem; border-radius: 10px; background: var(--ac-chip); color: var(--ac-muted); font-size: .95rem; line-height: 1.5; }
.ac-book b { color: var(--ac-ink); font-weight: 800; }
.ac-people { margin-top: .8rem !important; display: grid; grid-template-columns: max-content 1fr; gap: .25rem .9rem; font-size: .92rem; line-height: 1.55; }
.ac-people dt { color: var(--ac-dim); font-weight: 700; }
.ac-people dd { color: var(--ac-ink); font-weight: 600; }
.ac-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.ac-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem 1rem; border-radius: 11px; border: 1px solid var(--ac-line); background: transparent; color: var(--ac-ink) !important; font-weight: 800; font-size: .92rem; text-decoration: none !important; cursor: pointer; }
.ac-btn:hover { background: var(--ac-chip); }
.ac-btn.is-main { background: var(--ac-gold); border-color: transparent; color: #1b1203 !important; }
html[data-ui="light"] .ac-btn.is-main { color: #fff !important; }
.ac-note { margin-top: .85rem !important; color: var(--ac-dim); font-size: .84rem; line-height: 1.6; }

/* ป้ายเล็กในป้ายใหญ่/แถบบน */
.ac-badge { display: inline-flex; align-items: center; gap: .7rem; align-self: flex-start; padding: .4rem 1rem .4rem .45rem; border-radius: 999px; border: 1.5px solid rgba(245, 191, 69, .7); background: rgba(10, 15, 30, .55); backdrop-filter: blur(6px); color: #fff !important; text-decoration: none !important; }
.ac-badge img { flex: none; width: 44px; height: 60px; object-fit: cover; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.ac-badge span { display: flex; flex-direction: column; line-height: 1.3; }
.ac-badge small { font-size: .78rem; font-weight: 700; color: #d7deef; }
.ac-badge strong { font-size: 1.15rem; font-weight: 800; color: #f5bf45; }
.ac-badge em { font-style: normal; font-size: .8rem; color: #e6ebf7; }
html[data-ui="light"] .ac-badge { background: rgba(255, 255, 255, .9); border-color: #d9a43a; color: #141a33 !important; }
html[data-ui="light"] .ac-badge small { color: #525b78; }
html[data-ui="light"] .ac-badge strong { color: #8a4b08; }
html[data-ui="light"] .ac-badge em { color: #333c5c; }

@media (max-width: 640px) {
	.ac-card { flex-direction: column; align-items: flex-start; }
	.ac-cover { width: 120px; }
	.ac-covers { width: 220px; height: 190px; }
	.ac-people { grid-template-columns: 1fr; gap: 0 0; }
	.ac-people dd { margin-bottom: .35rem; }
}
@media (prefers-reduced-motion: reduce) { .ac-cover, .ac-covers img { transition: none; } }
