/* Tam Tạng Pāli — frontend thư viện học thuật
   Phạm vi #main… để thắng theme Tam Giáo (#main .container) */
#main .container .tam-giao-content .pc-module {
  isolation: isolate;
  box-sizing: border-box;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif !important;
  color: #16332f;
  -webkit-font-smoothing: antialiased;
}
#main .container .tam-giao-content .pc-module *,
#main .container .tam-giao-content .pc-module *::before,
#main .container .tam-giao-content .pc-module *::after {
  box-sizing: border-box;
}
#main .container .tam-giao-content .pc-module a {
  color: #264b46;
  text-decoration: none;
}
#main .container .tam-giao-content .pc-module a:hover {
  color: #16332f;
  text-decoration: underline;
}
#main .container .tam-giao-content .pc-module .pc-h1-v2,
#main .container .tam-giao-content .pc-module .pc-doc-h1,
#main .container .tam-giao-content .pc-module .pc-scholar-title,
#main .container .tam-giao-content .pc-module .pc-section-h,
#main .container .tam-giao-content .pc-module .pc-hero h1 {
  font-family: "Source Serif 4", "Gentium Book Plus", Georgia, serif !important;
  font-weight: 600;
  color: #16332f;
}
#main .container .tam-giao-content .pc-module .phathoc-pali {
  font-family: "Gentium Book Plus", Georgia, serif !important;
}
#main .container .tam-giao-content .pc-module .pc-corpus-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
#main .container .tam-giao-content .pc-module .pc-scholar-actions {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
#main .container .tam-giao-content .pc-module .pc-scholar-metrics {
  display: grid !important;
}
#main .container .tam-giao-content .pc-module button,
#main .container .tam-giao-content .pc-module input,
#main .container .tam-giao-content .pc-module select,
#main .container .tam-giao-content .pc-module textarea {
  font-family: inherit;
}
#main .container .tam-giao-content .pc-module .pc-search-form button,
#main .container .tam-giao-content .pc-module .pc-search-hub-form .pc-btn-solid {
  padding: 10px 20px;
  background: #264b46;
  color: #f7f4ed !important;
  border: 1px solid #264b46;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

/* Tam Tạng Pāli — frontend thư viện học thuật */
.pc-fe {
  --pc-bg: #faf9f6;
  --pc-paper: #fffef9;
  --pc-ink: #1e2a24;
  --pc-muted: #5a6b62;
  --pc-accent: #2d5c45;
  --pc-accent-soft: #e8f0eb;
  --pc-border: #dfe6df;
  --pc-sidebar: #f4f2ec;
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 16px 56px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--pc-ink);
  background: var(--pc-bg);
  min-height: 60vh;
}
.pc-fe a { color: var(--pc-accent); }
.pc-fe a:hover { color: #1a3d2e; text-decoration: underline; }
.pc-bc {
  font-size: 0.8125rem;
  color: var(--pc-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}
.pc-bc .sep { margin: 0 0.35em; color: #b0b8b3; }
.pc-hero h1 {
  font-family: "Gentium Book Plus", "Noto Serif", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 8px;
  color: #1a3d2e;
  font-weight: 600;
}
.pc-hero p { margin: 0; color: var(--pc-muted); line-height: 1.6; }
.pc-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--pc-muted);
}
.pc-stat-row strong { color: var(--pc-ink); font-weight: 600; }

/* Landing cards */
.pc-grid-landing {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.pc-card-landing {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  background: var(--pc-paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  transition: border-color .2s, box-shadow .2s;
}
.pc-card-landing:hover {
  border-color: #c5d4c8;
  box-shadow: 0 6px 20px rgba(45,92,69,.08);
}
.pc-card-landing h2 {
  font-family: "Gentium Book Plus", Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 8px;
  color: #1a3d2e;
}
.pc-card-landing .desc {
  font-size: 0.875rem;
  color: var(--pc-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}
.pc-card-landing .metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.75rem;
  text-align: center;
}
.pc-card-landing .metrics span { display: block; color: var(--pc-muted); text-transform: uppercase; letter-spacing: .04em; }
.pc-card-landing .metrics strong { font-size: 1.05rem; color: var(--pc-ink); }
.pc-btn-primary {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 16px;
  background: var(--pc-accent);
  color: #fff !important;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none !important;
}
.pc-btn-primary:hover { background: #234a38; color: #fff !important; }

/* Collection */
.pc-coll-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(260px, 300px) 1fr;
  align-items: start;
}
@media (max-width: 900px) {
  .pc-coll-layout { grid-template-columns: 1fr; }
}
.pc-tree-box {
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 14px;
  background: var(--pc-sidebar);
}
.pc-tree-box h2 { font-size: 0.95rem; margin: 0 0 10px; color: #1a3d2e; }
.pc-root-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.pc-root-card {
  display: block;
  padding: 14px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  background: var(--pc-paper);
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}
.pc-root-card:hover { border-color: var(--pc-accent); }

/* Book reader */
.pc-reader {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--pc-paper);
  min-height: 420px;
}
@media (max-width: 768px) {
  .pc-reader { grid-template-columns: 1fr; }
}
.pc-reader-sidebar {
  background: var(--pc-sidebar);
  border-right: 1px solid var(--pc-border);
  padding: 12px 0;
  max-height: 75vh;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .pc-reader-sidebar {
    max-height: 200px;
    border-right: 0;
    border-bottom: 1px solid var(--pc-border);
  }
}
.pc-reader-sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pc-muted);
  margin: 0 12px 8px;
}
.pc-reader-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pc-reader-sidebar a {
  display: block;
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--pc-ink);
  text-decoration: none;
}
.pc-reader-sidebar a:hover { background: rgba(45,92,69,.08); }
.pc-reader-sidebar li.active a {
  background: var(--pc-accent-soft);
  font-weight: 600;
  color: var(--pc-accent);
}
.pc-reader-main { padding: 18px 20px 24px; min-width: 0; }
.pc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pc-border);
}
.pc-toolbar label { font-size: 0.75rem; color: var(--pc-muted); display: block; margin-bottom: 4px; }
.pc-toolbar select {
  min-width: 160px;
  padding: 6px 10px;
  border: 1px solid var(--pc-border);
  border-radius: 6px;
  background: #fff;
}
.pc-view-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-view-modes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--pc-ink);
  cursor: pointer;
  margin: 0;
}
.pc-nav-pages {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pc-border);
  font-size: 0.875rem;
}
.pc-nav-pages a { font-weight: 600; }

/* Typography — Pāli */
.pc-pali-body {
  font-family: "Gentium Book Plus", "Noto Serif Devanagari", "Noto Serif Myanmar", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}
/* Translation bodies */
.pc-tr-vi { font-family: "Gentium Book Plus", Georgia, serif; }
.pc-tr-en { font-family: "Gentium Book Plus", Georgia, serif; }
.pc-tr-zh { font-family: "Noto Sans TC", "Noto Sans SC", "Gentium Book Plus", serif; }
.pc-tr-th { font-family: "Noto Sans Thai", "Gentium Book Plus", serif; }
.pc-tr-de { font-family: "Gentium Book Plus", Georgia, serif; }

.pc-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 800px) {
  .pc-dual { grid-template-columns: 1fr; }
}
.pc-panel-read {
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.pc-panel-read h4 {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.8rem;
  background: var(--pc-accent-soft);
  border-bottom: 1px solid var(--pc-border);
  color: #1a3d2e;
}
.pc-panel-read .inner { padding: 14px 16px; }
.pc-empty-tr {
  color: var(--pc-muted);
  font-style: italic;
  margin: 0;
}

/* Search */
.pc-search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.pc-search-form input[type="search"] {
  flex: 1;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  font-size: 0.9375rem;
}
.pc-search-form button {
  padding: 10px 20px;
  background: var(--pc-accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.pc-results { list-style: none; padding: 0; margin: 0; }
.pc-results > li {
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--pc-paper);
}
.pc-results a { font-weight: 600; }
.pc-result-meta { font-size: 0.85rem; color: var(--pc-muted); margin-top: 6px; }
.pc-section-title {
  font-family: "Gentium Book Plus", Georgia, serif;
  font-size: 1.05rem;
  margin: 28px 0 12px;
  color: #1a3d2e;
  font-weight: 600;
}
.pc-filter-select {
  padding: 8px 10px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  font-size: 0.875rem;
  background: #fff;
  color: var(--pc-ink);
}

/* Catalog book cards */
.pc-catalog-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}
.pc-book-card {
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 16px 16px 14px;
  background: var(--pc-paper);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.pc-book-card__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: start;
}
.pc-book-card__cover.pc-shelf-book3d {
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  width: 92px;
  filter: drop-shadow(0 10px 18px rgba(22, 18, 14, 0.16));
}
.pc-book-card__main {
  min-width: 0;
}
.pc-book-title {
  font-size: 1.15rem;
  margin: 0 0 8px;
  line-height: 1.35;
}
.pc-book-title a { text-decoration: none; color: #1a3d2e; }
.pc-book-title a:hover { text-decoration: underline; color: var(--pc-accent); }
.pc-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}
.pc-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--pc-accent-soft);
  color: #1a3d2e;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pc-muted { color: var(--pc-muted); }
.pc-book-path {
  font-size: 0.75rem;
  color: var(--pc-muted);
  margin-bottom: 6px;
  word-break: break-word;
}
.pc-lang-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pc-lang-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f0f4f1;
  font-size: 0.75rem;
  color: var(--pc-ink);
}
.pc-lang-pill strong { color: var(--pc-accent); }
.pc-draft { color: #8a6d3b; }
.pc-pager { margin-top: 28px; }

@media (min-width: 860px) {
  .pc-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .pc-catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pc-book-card__row {
    grid-template-columns: 96px 1fr;
  }
  .pc-book-card__cover.pc-shelf-book3d {
    width: 96px;
  }
}

/* ——— Tam Tạng Pāli v2: thư viện học thuật (tokens + landing + reader) ——— */
.pc-fe.pc-fe-v2 {
  --pc-bg: #f7f4ed;
  --pc-paper: #fbf9f4;
  --pc-paper-deep: #ece8de;
  --pc-ink: #16332f;
  --pc-ink-soft: #264b46;
  --pc-muted: #4a5c58;
  --pc-accent: #264b46;
  --pc-accent-hover: #16332f;
  --pc-gold: #c8a96b;
  --pc-warm: #bfae8f;
  --pc-rust: #8c4b3b;
  --pc-border: #d9d2c3;
  --pc-sidebar: #ece8de;
  max-width: min(1180px, 100%);
  padding: 28px 20px 64px;
  background: var(--pc-bg);
  border-radius: 0;
}
.pc-fe.pc-fe-v2 a {
  color: var(--pc-ink-soft);
}
.pc-fe.pc-fe-v2 a:hover {
  color: var(--pc-accent-hover);
}

.pc-bc-v2 {
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.pc-bc-v2 a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.pc-bc-v2 a:hover {
  border-bottom-color: rgba(22, 51, 47, 0.35);
}
.pc-bc-v2 .sep {
  margin: 0 0.4em;
  color: #a8a095;
  font-weight: 300;
}

/* Hero */
.pc-hero-v2 {
  margin-bottom: 36px;
}
.pc-hero-v2-grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .pc-hero-v2-grid {
    grid-template-columns: 1fr;
  }
}
.pc-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--pc-muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.pc-h1-v2 {
  font-family: "Source Serif 4", "Gentium Book Plus", Georgia, serif;
  font-size: clamp(1.85rem, 3.2vw, 2.35rem);
  font-weight: 600;
  color: var(--pc-ink);
  margin: 0 0 14px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pc-lead-v2 {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--pc-muted);
  max-width: 52ch;
}
.pc-corpus-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .pc-corpus-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}
.pc-corpus-metric {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 14px 12px;
  text-align: center;
  border-radius: 2px;
}
.pc-corpus-metric .n {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--pc-ink);
  line-height: 1.2;
}
.pc-corpus-metric .l {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pc-muted);
  margin-top: 6px;
  display: block;
}

.pc-hero-v2-aside {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 20px 20px 18px;
  border-radius: 2px;
}
.pc-aside-h {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pc-muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.pc-meta-dl {
  margin: 0;
  display: grid;
  gap: 12px 0;
  font-size: 0.875rem;
}
.pc-meta-dl dt {
  font-weight: 600;
  color: var(--pc-ink);
  margin: 0;
  font-size: 0.8rem;
}
.pc-meta-dl dd {
  margin: 4px 0 0;
  color: var(--pc-muted);
  line-height: 1.55;
}

/* Search hub */
.pc-search-hub {
  margin-bottom: 40px;
}
.pc-search-hub-form {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 20px 20px 16px;
  border-radius: 2px;
}
.pc-search-hub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: stretch;
}
.pc-search-hub-form input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  font-size: 1rem;
  background: #fffef8;
}
.pc-search-hub-form .pc-search-hub-row .pc-btn-solid {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin-bottom: 0;
}
.pc-search-hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}
.pc-select-v2 {
  padding: 8px 12px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  font-size: 0.875rem;
  background: #fffef8;
  color: var(--pc-ink);
  min-width: 180px;
}

.pc-btn-solid {
  display: inline-block;
  padding: 10px 20px;
  background: var(--pc-accent);
  color: #f7f4ed !important;
  border: 1px solid var(--pc-accent);
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.pc-btn-solid:hover {
  background: var(--pc-accent-hover);
  border-color: var(--pc-accent-hover);
  color: #fff !important;
}
.pc-btn-ghost {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 4px;
  background: transparent;
  color: var(--pc-ink-soft) !important;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pc-btn-ghost:hover {
  border-color: var(--pc-warm);
  background: rgba(191, 174, 143, 0.12);
}
.pc-btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

/* Scholarly cards */
.pc-section-h {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--pc-ink);
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pc-border);
}
.pc-collections-v2 {
  margin-bottom: 44px;
}
.pc-scholar-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}
.pc-scholar-card {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 22px 20px 20px;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.pc-scholar-card .pc-badge {
  align-self: flex-start;
  margin-bottom: 12px;
  border-radius: 2px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.pc-badge-canon {
  background: rgba(38, 75, 70, 0.12);
  color: var(--pc-ink);
}
.pc-badge-commentary {
  background: rgba(200, 169, 107, 0.2);
  color: #5c4a2a;
}
.pc-badge-sub {
  background: rgba(191, 174, 143, 0.25);
  color: #4a4336;
}
.pc-badge-related {
  background: rgba(140, 75, 59, 0.12);
  color: #5c3228;
}
.pc-scholar-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 4px;
  color: var(--pc-ink);
  font-weight: 600;
}
.pc-scholar-pali {
  font-style: italic;
  color: var(--pc-muted);
  margin: 0 0 12px;
  font-size: 0.95rem;
}
.pc-scholar-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--pc-muted);
  margin: 0 0 16px;
  flex: 1;
}
.pc-scholar-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  font-size: 0.78rem;
  color: var(--pc-muted);
  margin-bottom: 18px;
}
.pc-scholar-metrics em {
  font-style: normal;
  font-weight: 700;
  color: var(--pc-ink);
  display: block;
  font-size: 1rem;
  font-family: "Source Serif 4", Georgia, serif;
}
.pc-scholar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* Intro + audience + footer */
.pc-intro-academic {
  margin-bottom: 40px;
}
.pc-intro-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.pc-intro-block {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 20px 18px;
  border-radius: 2px;
}
.pc-intro-block h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  margin: 0 0 10px;
  color: var(--pc-ink);
}
.pc-intro-block p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--pc-muted);
}

.pc-quick-audience {
  margin-bottom: 48px;
}
.pc-audience-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.pc-audience-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  text-decoration: none !important;
  color: inherit;
  border-radius: 2px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pc-audience-card:hover {
  border-color: var(--pc-warm);
  box-shadow: 0 0 0 1px rgba(191, 174, 143, 0.35);
}
.pc-audience-card strong {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.05rem;
  color: var(--pc-ink);
}
.pc-audience-card span {
  font-size: 0.85rem;
  color: var(--pc-muted);
  line-height: 1.5;
}

.pc-lib-footer {
  border-top: 1px solid var(--pc-border);
  padding-top: 24px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--pc-muted);
}
.pc-lib-footer strong {
  color: var(--pc-ink);
}
.pc-muted-small {
  font-size: 0.8125rem;
  margin-top: 10px;
  opacity: 0.9;
}

/* ——— Book reader v2 (3 cột) ——— */
.pc-module.pc-fe.pc-fe-v2.pc-book-v2 {
  max-width: min(1720px, 100%);
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}
.pc-book-v2.pc-fe {
  max-width: min(1720px, 100%);
  padding-left: 12px;
  padding-right: 12px;
}
.pc-reader-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  gap: 0 28px;
  align-items: start;
}
.pc-reader-shell.pc-reader-shell-merged {
  grid-template-columns: minmax(0, 1fr) 260px;
}
/* Đọc sách: một cột rộng — metadata chuyển xuống dưới */
.pc-reader-shell.pc-reader-shell-wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.pc-reader-shell.pc-reader-shell-wide .pc-reader-center {
  max-width: none;
  width: 100%;
}
@media (max-width: 1100px) {
  .pc-reader-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .pc-reader-shell.pc-reader-shell-merged {
    grid-template-columns: minmax(0, 1fr);
  }
  .pc-reader-meta {
    grid-column: 1 / -1;
    max-width: 720px;
  }
}
@media (max-width: 820px) {
  .pc-reader-shell {
    grid-template-columns: 1fr;
  }
  .pc-reader-toc {
    position: relative;
    max-height: 220px;
  }
}

.pc-reader-toc {
  position: sticky;
  top: 12px;
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  border-radius: 2px;
  padding: 14px 0 12px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pc-toc-h {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pc-muted);
  margin: 0 14px 10px;
  font-weight: 600;
}
.pc-jump-label {
  display: block;
  font-size: 0.72rem;
  color: var(--pc-muted);
  margin: 0 14px 6px;
}
.pc-jump-row {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--pc-border);
}
.pc-jump-row input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  font-size: 0.875rem;
  background: #fffef8;
}
.pc-toc-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
}
.pc-toc-list li a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 7px 14px;
  font-size: 0.8125rem;
  color: var(--pc-ink);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.pc-toc-list li a:hover {
  background: rgba(38, 75, 70, 0.06);
}
.pc-toc-list li.active a {
  background: rgba(38, 75, 70, 0.1);
  border-left-color: var(--pc-accent);
  font-weight: 600;
}
.pc-toc-num {
  font-variant-numeric: tabular-nums;
  color: var(--pc-muted);
}
.pc-toc-fn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-reader-center {
  min-width: 0;
}

.pc-doc-header {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--pc-border);
}
.pc-doc-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pc-muted);
  margin: 0 0 8px;
}
.pc-doc-h1 {
  font-family: "Source Serif 4", "Gentium Book Plus", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 600;
  color: var(--pc-ink);
  margin: 0 0 8px;
  line-height: 1.25;
}
.pc-doc-sub {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--pc-muted);
}
.pc-doc-sub .pc-fn {
  color: var(--pc-rust);
  font-weight: 500;
}
.pc-doc-meta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px 20px;
  margin: 0 0 14px;
  font-size: 0.85rem;
}
.pc-doc-meta div {
  margin: 0;
}
.pc-doc-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  margin: 0 0 4px;
}
.pc-doc-meta dd {
  margin: 0;
  color: var(--pc-ink);
}
.pc-doc-meta code {
  font-size: 0.8rem;
  background: var(--pc-paper-deep);
  padding: 2px 6px;
  border-radius: 2px;
}
.pc-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-toolbar-v2 {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  border-radius: 2px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.pc-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: flex-end;
}
.pc-toolbar-row + .pc-toolbar-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(217, 210, 195, 0.7);
}
.pc-tb-group label,
.pc-tb-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  margin-bottom: 6px;
}
.pc-tb-group select {
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: #fffef8;
  font-size: 0.875rem;
}
.pc-view-radios,
.pc-dict-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.pc-view-radios .pc-tb-label,
.pc-dict-radios .pc-tb-label {
  margin-bottom: 0;
  margin-right: 4px;
}
.pc-view-radios label,
.pc-dict-radios label {
  font-size: 0.85rem;
  color: var(--pc-ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin: 0;
}
.pc-toolbar-tools {
  align-items: center;
}
.pc-tb-mini {
  font-size: 0.75rem;
  color: var(--pc-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* -------------------------------------------------------------------------- */
/* Pali Canon – "kệ sách" (Mục con)                                            */
/* -------------------------------------------------------------------------- */

.pc-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 190px));
  gap: 14px 14px;
  justify-content: flex-start;
  margin-top: 16px;
}

.pc-shelf-grid--roots {
  grid-template-columns: repeat(auto-fill, minmax(170px, 190px));
  gap: 14px 14px;
  justify-content: flex-start;
  margin-top: 16px;
}

.pc-shelf-book {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 9px;
  text-decoration: none;
  color: inherit;
}

.pc-shelf-book:focus-visible {
  outline: 3px solid rgba(167, 131, 59, 0.35);
  outline-offset: 6px;
  border-radius: 10px;
}

.pc-shelf-book3d {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  perspective: 1200px;
  border-radius: 10px;
  filter: drop-shadow(0 12px 22px rgba(22, 18, 14, 0.18));
}

.pc-shelf-book--root .pc-shelf-book3d {
  aspect-ratio: 3 / 4;
}

.pc-shelf-book__back,
.pc-shelf-book__pages,
.pc-shelf-book__front {
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

/* Back cover */
.pc-shelf-book__back {
  background: #ffffff;
  transform: translateZ(-8px);
  border: 1px solid rgba(220, 220, 220, 0.95);
}

/* Pages block */
.pc-shelf-book__pages {
  inset: 6px 0 6px auto;
  width: 14px;
  border-radius: 0 10px 10px 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.09), rgba(255, 255, 255, 0) 42%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.98) 0px,
      rgba(255, 255, 255, 0.98) 3px,
      rgba(245, 245, 245, 0.98) 4px,
      rgba(245, 245, 245, 0.98) 8px
    );
  box-shadow:
    inset 1px 0 0 rgba(255, 255, 255, 0.96),
    inset -1px 0 0 rgba(0, 0, 0, 0.08);
  transform: translateZ(-4px);
}

/* Front cover (opens on hover) */
.pc-shelf-book__front {
  transform-origin: left center;
  transform: translateZ(0) rotateY(0deg);
  transition: transform 260ms ease, box-shadow 260ms ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  border: 0;
  background: transparent;
  overflow: hidden;
}

.pc-shelf-book__front::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 35%),
    linear-gradient(90deg, rgba(0,0,0,0.14), rgba(0,0,0,0) 10%),
    linear-gradient(0deg, rgba(0,0,0,0.08), rgba(0,0,0,0) 28%);
  pointer-events: none;
}

.pc-shelf-book3d::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 12px;
  border-radius: 9px 0 0 9px;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0) 55%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
  box-shadow:
    inset -1px 0 2px rgba(0, 0, 0, 0.22),
    inset 1px 0 0 rgba(255,255,255,0.18);
  z-index: 2;
  pointer-events: none;
}

.pc-shelf-book3d::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.12),
    inset 0 10px 18px rgba(255, 255, 255, 0.10);
  pointer-events: none;
  z-index: 3;
}

.pc-shelf-book__img {
  position: absolute;
  inset: 0;
  background-image: var(--pc-cover);
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  transform: translateZ(0);
  filter: saturate(1.02) contrast(1.02);
}

.pc-shelf-book:hover .pc-shelf-book__front,
.pc-shelf-book:focus-visible .pc-shelf-book__front {
  transform: translateZ(2px) rotateY(-38deg);
  box-shadow: 18px 14px 26px rgba(20, 16, 10, 0.16);
}

.pc-shelf-tag {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 10px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(176, 164, 138, 0.75);
  color: #34473f;
  box-shadow: 0 4px 10px rgba(23, 33, 30, 0.14);
  backdrop-filter: blur(4px);
}

.pc-shelf-tag--book {
  background: rgba(238, 248, 243, 0.9);
  border-color: rgba(72, 115, 94, 0.35);
  color: rgba(24, 66, 47, 0.9);
}

.pc-shelf-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  background: linear-gradient(180deg, #fffefb 0%, #f6f1e7 100%);
  border: 1px solid #d5cebc;
  border-radius: 12px;
  padding: 14px 14px 13px;
  box-shadow: 0 6px 14px rgba(29, 35, 28, 0.06);
  position: relative;
}

.pc-shelf-meta::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  width: 46px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #4f665e, #789288);
  opacity: 0.9;
}

.pc-shelf-title {
  font-size: 1.08rem;
  font-weight: 780;
  line-height: 1.22;
  color: #1f312a;
  letter-spacing: 0.01em;
  margin: 2px 0 0;
}
.pc-shelf-title a {
  color: inherit;
  text-decoration: none;
}
.pc-shelf-title a:hover {
  color: #2d5a4b;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pc-shelf-path {
  font-size: 0.9rem;
  color: #5a635d;
  line-height: 1.5;
  word-break: break-word;
  margin: 0;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.45em;
}

.pc-shelf-meta .pc-pali-tile__actions {
  margin-top: auto;
  padding-top: 4px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.pc-shelf-meta .pc-pali-tile__btn {
  width: 100%;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 8px;
  justify-content: center;
}
.pc-shelf-book--collection .pc-shelf-meta {
  min-height: 195px;
}
@media (max-width: 768px) {
  .pc-shelf-book--collection .pc-shelf-meta {
    min-height: 0;
  }
  .pc-shelf-meta {
    padding: 12px 12px 11px;
  }
  .pc-shelf-meta::before {
    left: 12px;
  }
}
.pc-tb-mini select {
  padding: 6px 8px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: #fffef8;
  font-size: 0.8125rem;
}

.pc-read-body-wrap {
  margin-bottom: 20px;
  --pc-reader-font-size: 18px;
}
.pc-read-body-wrap .pc-pali-body {
  font-size: var(--pc-reader-font-size);
}
.pc-read-body-wrap.pc-fs-sm .pc-pali-body {
  font-size: 1rem;
}
.pc-read-body-wrap.pc-fs-md .pc-pali-body {
  font-size: 1.125rem;
}
.pc-read-body-wrap.pc-fs-lg .pc-pali-body {
  font-size: 1.25rem;
}
.pc-read-body-wrap.pc-fs-xl .pc-pali-body {
  font-size: 1.375rem;
}
.pc-read-body-wrap.pc-lh-tight .pc-pali-body {
  line-height: 1.55;
}
.pc-read-body-wrap.pc-lh-normal .pc-pali-body {
  line-height: 1.85;
}
.pc-read-body-wrap.pc-lh-relaxed .pc-pali-body {
  line-height: 2.05;
}
.pc-read-body-wrap.pc-font-gentium .pc-pali-body {
  font-family: "Gentium Plus", "Gentium Book Plus", Georgia, serif;
}
.pc-read-body-wrap.pc-font-noto-serif .pc-pali-body {
  font-family: "Noto Serif", "Source Serif 4", Georgia, serif;
}
.pc-read-body-wrap.pc-font-eb-garamond .pc-pali-body {
  font-family: "EB Garamond", "Garamond", Georgia, serif;
}
.pc-read-body-wrap.pc-font-pali .pc-pali-body {
  font-family: "Gentium Book Plus", "Source Serif 4", Georgia, serif;
}
.pc-read-body-wrap.pc-font-serif .pc-pali-body {
  font-family: "Source Serif 4", Georgia, serif;
}
.pc-read-body-wrap.pc-font-sans .pc-pali-body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.pc-parallel-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .pc-parallel-v2 {
    grid-template-columns: 1fr;
  }
}

.pc-panel-read-v2 {
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  overflow: hidden;
  background: #fffef8;
  box-shadow: none;
}
.pc-panel-read-v2 .pc-panel-h {
  margin: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--pc-muted);
  background: var(--pc-paper-deep);
  border-bottom: 1px solid var(--pc-border);
}

/* Book reader — tab ngôn ngữ bản dịch + header hàng */
.pc-panel-h-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 16px 10px;
  background: var(--pc-paper-deep);
  border-bottom: 1px solid var(--pc-border);
}
.pc-panel-h-row .pc-panel-h {
  border: none;
  padding: 0;
  background: transparent;
  font-size: 0.88rem;
}
.pc-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  justify-content: flex-end;
}
.pc-lang-tab {
  border: 1px solid var(--pc-border);
  background: #fffef8;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pc-ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pc-lang-tab:hover {
  border-color: rgba(15, 118, 110, 0.45);
  color: #0f766e;
}
.pc-lang-tab.is-active {
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  border-color: rgba(15, 118, 110, 0.55);
  color: #0b574f;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.pc-trans-inner.pc-tr-zh .pc-pali-body {
  font-family: "Noto Sans SC", "Noto Sans TC", "Source Serif 4", Georgia, serif;
}

/* FAB đọc — fixed góc phải; không dùng bottom (tránh kéo giãn + lỗi khi zoom trình duyệt). */
.pc-reader-fab-stack {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  top: max(4.75rem, calc(env(safe-area-inset-top, 0px) + 3.25rem));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center; /* mặc định stretch làm nút bị kéo ngang → méo oval khi zoom */
  gap: 0.625rem;
  width: auto;
  max-height: none;
}
/* Chừa chỗ cho 2 nút (44px + gap + 44px) theo chiều ngang — chữ không lấn dưới FAB khi zoom */
.pc-reader-shell-wide.pc-reader-has-fab .pc-reader-center {
  padding-inline-end: clamp(3.75rem, 5rem, 6.25rem);
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .pc-reader-shell-wide.pc-reader-has-fab .pc-reader-center {
    padding-inline-end: clamp(3.25rem, 4.25rem, 5rem);
  }
}
.pc-reader-fab {
  box-sizing: border-box;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  max-width: 2.75rem;
  max-height: 2.75rem;
  aspect-ratio: 1;
  flex: 0 0 2.75rem;
  align-self: center;
  border-radius: 50%;
  border: none;
  background: #1e3a5f;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pc-reader-fab:hover {
  background: #152a45;
  transform: translateY(-1px);
}
.pc-reader-fab__icon {
  font-size: 1.125rem;
  line-height: 1;
}

/* Mục lục (overlay) */
.pc-toc-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pc-toc-overlay[hidden] {
  display: none !important;
}
.pc-toc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.pc-toc-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(72vh, 560px);
  overflow: auto;
  background: var(--pc-paper);
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  padding: 18px 18px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}
.pc-toc-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.pc-toc-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--pc-ink);
}
.pc-toc-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--pc-muted);
  padding: 0 4px;
}
.pc-toc-lead {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--pc-muted);
}
.pc-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pc-toc-list a {
  display: block;
  padding: 10px 12px;
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--pc-ink);
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: #fffef8;
}
.pc-toc-list a:hover {
  border-color: rgba(15, 118, 110, 0.45);
  color: #0f766e;
}
.pc-toc-list a.is-current {
  background: linear-gradient(180deg, #ecfdf5, #d1fae5);
  border-color: rgba(15, 118, 110, 0.55);
}

/* Chuyển trang (theo từng trang — mọi chế độ đọc) */
.pc-page-step-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 18px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  border-radius: 2px;
  font-size: 1.05rem;
}
.pc-page-step-nav__link {
  font-weight: 700;
  color: #0f766e;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.pc-page-step-nav__link:hover {
  border-bottom-color: rgba(15, 118, 110, 0.45);
}
.pc-page-step-nav__pos {
  font-weight: 700;
  color: var(--pc-ink);
}
.pc-page-step-nav__muted {
  color: var(--pc-muted);
  font-weight: 600;
}
.pc-page-step-nav--top {
  margin-top: 0;
  margin-bottom: 14px;
}

.pc-toolbar-v2--pulse {
  animation: pc-toolbar-pulse 1.1s ease-out;
}
@keyframes pc-toolbar-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
  40% {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.2);
  }
}
.pc-panel-read-v2 .pc-panel-inner {
  padding: 22px 24px 28px;
  max-width: 100%;
}
.pc-panel-read-v2 .pc-pali-body {
  margin: 0;
}

.pc-nav-pages-v2 {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 8px;
  border-top: 1px solid var(--pc-border);
  font-size: 0.9rem;
}
.pc-nav-pages-v2 .pc-nav-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--pc-ink-soft);
  border-bottom: 1px solid transparent;
}
.pc-nav-pages-v2 .pc-nav-link:hover {
  border-bottom-color: var(--pc-warm);
}

.pc-reader-meta {
  position: sticky;
  top: 12px;
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  border-radius: 2px;
  padding: 18px 16px 20px;
  font-size: 0.875rem;
}
.pc-meta-h {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pc-muted);
  margin: 0 0 14px;
  font-weight: 600;
}
.pc-meta-dl-v2 {
  margin: 0;
  display: grid;
  gap: 10px 0;
}
.pc-meta-dl-v2 dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--pc-muted);
  margin: 0;
}
.pc-meta-dl-v2 dd {
  margin: 2px 0 0;
  color: var(--pc-ink);
  line-height: 1.45;
}
.pc-meta-dl-v2 code.pc-break {
  word-break: break-all;
  font-size: 0.75rem;
  background: var(--pc-paper-deep);
  padding: 4px 6px;
  display: inline-block;
  max-width: 100%;
}
.pc-meta-note {
  margin: 16px 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--pc-muted);
  font-style: italic;
}
.pc-footnote {
  font-size: 0.8rem;
  color: var(--pc-muted);
  margin: 0;
}

/* Book reader — khung rộng, cột đọc chiếm bề ngang */
.pc-doc-header--book {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
}
.pc-doc-header--book .pc-doc-header-main {
  flex: 1 1 min(100%, 42rem);
  min-width: 0;
}
.pc-doc-actions--top {
  flex: 0 0 auto;
  margin: 0;
}
@media (max-width: 720px) {
  .pc-doc-header--book {
    flex-direction: column;
  }
}
.pc-doc-meta--inline {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px 16px;
  margin: 10px 0 0;
  font-size: 0.82rem;
}
.pc-book-v2 .pc-parallel-v2 {
  gap: 28px clamp(24px, 3vw, 48px);
  width: 100%;
}
.pc-book-v2 .pc-panel-read-v2 .pc-panel-inner {
  padding: clamp(18px, 2vw, 32px) clamp(16px, 2.5vw, 36px) clamp(22px, 2.5vw, 40px);
}
/* Một cột: giới hạn độ rộng để dễ đọc (chỉ dịch / mặc định) */
.pc-book-v2 .pc-doc-h1 {
  font-size: clamp(1.85rem, 2.4vw, 2.35rem);
  line-height: 1.2;
}
.pc-book-v2 .pc-doc-sub {
  font-size: 1.05rem;
  line-height: 1.55;
}
.pc-book-v2 .pc-doc-meta--inline {
  font-size: 0.92rem;
}
.pc-book-v2 .pc-read-body-wrap > .pc-panel-read-v2:only-child {
  max-width: min(48rem, 100%);
  margin-left: auto;
  margin-right: auto;
}
/* Chỉ Pāli: mở rộng theo bề ngang vùng đọc */
.pc-book-v2 .pc-read-body-wrap.pc-vm-pali > .pc-panel-read-v2:only-child {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
.pc-reader-meta-below {
  position: static;
  margin-top: 32px;
  padding: 18px 20px 20px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: var(--pc-paper);
  max-width: none;
}
.pc-reader-meta-below .pc-meta-dl-v2 {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(0, 1fr);
  gap: 6px 16px;
  align-items: baseline;
}
.pc-reader-meta-below .pc-meta-dl-v2 dt {
  margin: 0;
}
.pc-reader-meta-below .pc-meta-dl-v2 dd {
  margin: 0;
}

/* Theme modes for reader */
.pc-book-v2.pc-theme-light {
  --pc-bg: #f7f4ed;
  --pc-paper: #fbf9f4;
  --pc-paper-deep: #ece8de;
  --pc-ink: #16332f;
  --pc-muted: #4a5c58;
  --pc-border: #d9d2c3;
}
.pc-book-v2.pc-theme-ivory {
  --pc-bg: #f3eedf;
  --pc-paper: #f8f2e2;
  --pc-paper-deep: #eadfca;
  --pc-ink: #2d3a35;
  --pc-muted: #5f665f;
  --pc-border: #cdbc9b;
}
.pc-book-v2.pc-theme-dark {
  --pc-bg: #000000;
  --pc-paper: #050607;
  --pc-paper-deep: #0e1113;
  --pc-ink: #f2f5f7;
  --pc-ink-soft: #d2e0e8;
  --pc-muted: #b8c3ca;
  --pc-border: #2a3136;
}
.pc-book-v2.pc-theme-dark .pc-panel-read-v2,
.pc-book-v2.pc-theme-dark .pc-reader-meta-below,
.pc-book-v2.pc-theme-dark .pc-toolbar-v2 {
  background: var(--pc-paper);
  border-color: var(--pc-border);
}
.pc-book-v2.pc-theme-dark .pc-fe,
.pc-book-v2.pc-theme-dark.pc-fe,
.pc-book-v2.pc-theme-dark {
  background: var(--pc-bg);
}
.pc-book-v2.pc-theme-dark .pc-panel-read-v2 .pc-panel-h,
.pc-book-v2.pc-theme-dark .pc-data-table th {
  background: var(--pc-paper-deep);
  color: var(--pc-muted);
  border-color: var(--pc-border);
}
.pc-book-v2.pc-theme-dark .pc-pali-body,
.pc-book-v2.pc-theme-dark .pc-panel-inner,
.pc-book-v2.pc-theme-dark .pc-doc-h1,
.pc-book-v2.pc-theme-dark .pc-doc-sub,
.pc-book-v2.pc-theme-dark .pc-doc-kicker,
.pc-book-v2.pc-theme-dark .pc-doc-meta dd,
.pc-book-v2.pc-theme-dark .pc-meta-dl-v2 dd,
.pc-book-v2.pc-theme-dark .pc-footnote {
  color: var(--pc-ink) !important;
}
.pc-book-v2.pc-theme-dark .pc-doc-meta dt,
.pc-book-v2.pc-theme-dark .pc-meta-dl-v2 dt,
.pc-book-v2.pc-theme-dark .pc-panel-h {
  color: var(--pc-muted) !important;
}
.pc-book-v2.pc-theme-dark .pc-btn-ghost {
  border-color: #425952;
  color: #d6e3de !important;
}
.pc-book-v2.pc-theme-dark input,
.pc-book-v2.pc-theme-dark select {
  background: #121917;
  border-color: #3c4f4b;
  color: #d8e4e0;
}

/* Full width text area inside reading panel */
.pc-panel-read-v2 .pc-panel-inner,
.pc-panel-read-v2 .pc-pali-body {
  width: 100%;
  max-width: none;
}
.pc-panel-read-v2 .pc-pali-body {
  text-align: left;
}

/* Trang phụ: tìm kiếm, catalog, collection, node, page độc lập */
.pc-subnav {
  font-size: 0.875rem;
  margin: -8px 0 20px;
  color: var(--pc-muted);
}
.pc-subnav a {
  color: var(--pc-ink-soft);
}
.pc-subnav-sep {
  margin: 0 0.4em;
  color: #a8a095;
}
.pc-subnav-h {
  font-weight: 600;
  color: var(--pc-ink);
}

.pc-page-hero {
  margin-bottom: 28px;
}
.pc-page-hero .pc-kicker {
  margin-bottom: 8px;
}
.pc-page-hero .pc-badge {
  margin-bottom: 12px;
}
.pc-coll-pali {
  font-style: italic;
  color: var(--pc-muted);
  margin: -4px 0 12px;
  font-size: 1.05rem;
}

.pc-search-advanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.pc-input-v2 {
  padding: 8px 10px;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: #fffef8;
  font-size: 0.875rem;
  color: var(--pc-ink);
  min-width: 0;
}

.pc-stat-inline {
  margin: 16px 0 8px;
  font-size: 0.9rem;
  color: var(--pc-muted);
}
.pc-stat-inline strong {
  color: var(--pc-ink);
}

.pc-pager-v2 {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 8px;
}

.pc-corpus-strip--sm {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  max-width: 480px;
  margin-top: 14px;
}
.pc-corpus-strip--books-only {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 200px;
}
@media (max-width: 520px) {
  .pc-corpus-strip--sm {
    grid-template-columns: 1fr !important;
  }
}

.pc-coll-layout-v2 {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .pc-coll-layout-v2 {
    grid-template-columns: 1fr;
  }
}
.pc-coll-main .pc-section-h {
  margin-top: 0;
}

.pc-tree-panel {
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  padding: 18px 16px 16px;
  border-radius: 2px;
}
.pc-tree-hint {
  font-size: 0.8rem;
  color: var(--pc-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.pali-tree-host {
  padding: 4px 0 0;
  max-height: 70vh;
  overflow: auto;
}
.pali-tree-ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
}
.pali-tree-li {
  margin: 2px 0;
}
.pali-tree-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.pali-tree-toggle {
  background: none;
  border: 0;
  padding: 0 4px 0 0;
  cursor: pointer;
  color: var(--pc-accent);
  font-weight: 600;
}
.pali-tree-link {
  color: var(--pc-ink);
  text-decoration: none;
  font-size: 0.9rem;
}
.pali-tree-link:hover {
  text-decoration: underline;
}
.pali-tree-kids {
  margin-left: 14px;
  padding-left: 8px;
  border-left: 1px solid var(--pc-border);
}

.pc-root-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pc-root-card-title {
  font-weight: 600;
}
.pc-root-card-sub {
  font-size: 0.75rem;
  color: var(--pc-muted);
}

.pc-node-section {
  margin-top: 28px;
}
.pc-node-children {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pc-node-children li {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--pc-border);
}
.pc-node-child-link {
  font-weight: 600;
}
.pc-node-child-meta {
  font-size: 0.8rem;
  margin-top: 4px;
  color: var(--pc-muted);
}
.pc-node-path {
  font-size: 0.85rem;
  color: var(--pc-muted);
  margin: 8px 0 0;
}

.pc-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pc-border);
  border-radius: 2px;
  background: var(--pc-paper);
}
.pc-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pc-data-table th,
.pc-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--pc-border);
  text-align: left;
}
.pc-data-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  background: var(--pc-paper-deep);
}
.pc-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.pc-page-standalone {
  max-width: 920px;
}
.pc-page-standalone .pc-doc-header {
  margin-bottom: 24px;
}
.pc-mt-note {
  margin-top: 12px;
}

.pc-search-hub-row .pc-select-v2 {
  flex: 1;
  min-width: 160px;
}
.pc-select-catalog {
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 340px;
}

.pc-page-standalone .pc-panel-read-v2 + .pc-panel-read-v2 {
  margin-top: 18px;
}

/* ——— Full viewport width: Tam Tạng Pāli (`.pc-module` trong layout Tam Giáo) ——— */
#main:has(.tam-giao-content .pc-module) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
#main .container:has(.tam-giao-content .pc-module) {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(10px, 1.5vw, 28px) !important;
  padding-right: clamp(10px, 1.5vw, 28px) !important;
  box-sizing: border-box;
}
#main .container:has(.tam-giao-content .pc-module) .row {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
#main .container:has(.tam-giao-content .pc-module) .row > .col-xs-12.col-sm-12.col-md-12 {
  width: 100%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
#main .container:has(.tam-giao-content .pc-module) .tam-giao-content {
  width: 100%;
  max-width: none !important;
}
#main .container:has(.tam-giao-content .pc-module) .pc-module.pc-fe,
#main .container:has(.tam-giao-content .pc-module) .pc-module.pc-fe.pc-fe-v2,
#main .container:has(.tam-giao-content .pc-module) .pc-module.pc-fe.pc-fe-v2.pc-book-v2,
#main .container:has(.tam-giao-content .pc-module) .pc-book-v2.pc-fe {
  max-width: none !important;
  width: 100% !important;
}

/* ——— Tam Tạng Pāli v3: Kangyur-style hero, ảnh Phật (minh họa), danh mục dạng danh sách ——— */
.pc-pali-v3 .pc-section-h--gold {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-gold);
  border-bottom: 1px solid rgba(200, 169, 107, 0.55);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.pc-pali-v3 .pc-aside-h--gold {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pc-gold);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(200, 169, 107, 0.45);
}

.pc-btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  background: #7c2d32;
  color: #fff8f6 !important;
  border: 1px solid #6a262b;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pc-btn-pill:hover {
  background: #5f2226;
  border-color: #4a1a1d;
  color: #fff !important;
}
.pc-btn-pill--ghost {
  background: transparent;
  color: var(--pc-ink-soft) !important;
  border-color: var(--pc-border);
}
.pc-btn-pill--ghost:hover {
  background: rgba(191, 174, 143, 0.15);
  border-color: var(--pc-warm);
  color: var(--pc-accent-hover) !important;
}

.pc-pali-hero-kangyur {
  margin-bottom: 40px;
  text-align: left;
}
.pc-pali-hero-kangyur__grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
  justify-items: start;
}
.pc-pali-hero-kangyur__copy {
  text-align: left;
  max-width: none;
}
@media (max-width: 900px) {
  .pc-pali-hero-kangyur__grid {
    grid-template-columns: 1fr;
  }
}
.pc-pali-hero-kangyur__visual {
  margin: 0;
}
.pc-pali-hero-kangyur__img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(22, 51, 47, 0.12);
}
.pc-pali-hero-kangyur__caption {
  margin: 10px 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--pc-muted);
  font-family: Inter, system-ui, sans-serif;
}
.pc-pali-hero-kangyur__label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--pc-ink-soft);
  margin: 0 0 8px;
}
.pc-pali-hero-kangyur__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  color: #1a4a45;
  margin: 0 0 14px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.pc-pali-hero-kangyur__lead {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--pc-muted);
  max-width: 54ch;
  font-family: Inter, system-ui, sans-serif;
}
.pc-pali-hero-kangyur__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.pc-corpus-strip--hero {
  margin-top: 4px;
}

.pc-pali-collections-v3 {
  margin-bottom: 48px;
  text-align: left;
}
.pc-pali-collections-v3__sub {
  margin: -6px 0 22px;
  font-size: 0.92rem;
  color: var(--pc-muted);
  max-width: none;
  line-height: 1.55;
  text-align: left;
}
.pc-pali-tile-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
/* Danh sách dọc: mỗi hàng một thẻ chữ nhật ngang (ảnh | nội dung) */
.pc-pali-tile-grid--list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-self: stretch;
  grid-template-columns: none;
}
.pc-pali-tile-grid--list .pc-pali-tile--row {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  flex-direction: unset;
}
.pc-pali-tile-grid--list .pc-pali-tile__media {
  aspect-ratio: auto;
  min-height: 200px;
  height: 100%;
  align-self: stretch;
  border-radius: 14px 0 0 14px;
}
.pc-pali-tile-grid--list .pc-pali-tile__media img {
  min-height: 200px;
  height: 100%;
}
.pc-pali-tile-grid--list .pc-pali-tile__body {
  padding: 22px 24px 24px;
  justify-content: center;
  text-align: left;
}
.pc-pali-tile-grid--list .pc-pali-tile__works-line {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--pc-muted);
}
.pc-pali-tile-grid--list .pc-pali-tile__works-line strong {
  font-weight: 700;
  color: var(--pc-ink);
}
.pc-pali-tile-grid--list .pc-pali-tile__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
}
.pc-pali-tile-grid--list .pc-pali-tile__title a {
  font-weight: 700;
}
.pc-pali-tile-grid--list .pc-pali-tile__pali {
  font-size: 18px;
  margin: 0 0 10px;
}
.pc-pali-tile-grid--list .pc-pali-tile__intro {
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 16px;
}
.pc-pali-tile__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 3px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid var(--pc-accent);
  background: var(--pc-accent);
  color: #f7f4ed !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pc-pali-tile__btn:hover {
  background: var(--pc-accent-hover);
  border-color: var(--pc-accent-hover);
  color: #fff !important;
}
.pc-pali-tile__btn--ghost {
  background: transparent;
  color: var(--pc-ink-soft) !important;
  border-color: var(--pc-border);
}
.pc-pali-tile__btn--ghost:hover {
  background: rgba(191, 174, 143, 0.12);
  border-color: var(--pc-warm);
  color: var(--pc-accent-hover) !important;
}
@media (max-width: 700px) {
  .pc-pali-tile-grid--list .pc-pali-tile--row {
    grid-template-columns: 1fr;
  }
  .pc-pali-tile-grid--list .pc-pali-tile__media {
    border-radius: 14px 14px 0 0;
    min-height: 200px;
    max-height: 240px;
  }
  .pc-pali-tile-grid--list .pc-pali-tile__media img {
    min-height: 0;
    max-height: 240px;
  }
}
.pc-pali-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--pc-paper);
  box-shadow: 0 2px 12px rgba(22, 51, 47, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pc-pali-tile:hover {
  border-color: rgba(200, 169, 107, 0.45);
  box-shadow: 0 10px 32px rgba(22, 51, 47, 0.08);
}
.pc-pali-tile__media {
  display: block;
  aspect-ratio: 280 / 200;
  overflow: hidden;
  background: var(--pc-sidebar);
}
.pc-pali-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pc-pali-tile__body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}
.pc-pali-tile__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 10px 0 4px;
  line-height: 1.3;
}
.pc-pali-tile__title a {
  color: var(--pc-ink);
  text-decoration: none;
}
.pc-pali-tile__title a:hover {
  color: var(--pc-accent);
  text-decoration: underline;
}
.pc-pali-tile__pali {
  font-style: italic;
  color: var(--pc-muted);
  margin: 0 0 10px;
  font-size: 0.92rem;
}
.pc-pali-tile__intro {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--pc-muted);
  margin: 0 0 14px;
  flex: 1;
}
.pc-pali-tile__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  font-size: 0.78rem;
  color: var(--pc-muted);
  margin-bottom: 16px;
}
.pc-pali-tile__metrics--books-only {
  grid-template-columns: 1fr;
  max-width: 12rem;
}
.pc-pali-tile__metrics em {
  font-style: normal;
  font-weight: 700;
  color: var(--pc-ink);
  display: block;
  font-size: 1rem;
  font-family: "Source Serif 4", Georgia, serif;
}
.pc-pali-tile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pc-coll-hero-kangyur {
  margin-bottom: 32px;
}
.pc-coll-hero-kangyur__grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (max-width: 768px) {
  .pc-coll-hero-kangyur__grid {
    grid-template-columns: 1fr;
  }
}
.pc-coll-hero-kangyur__img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(22, 51, 47, 0.1);
}
.pc-coll-hero-kangyur__caption {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--pc-muted);
  font-style: italic;
}
.pc-coll-hero-kangyur__h1 {
  margin-top: 12px !important;
}
.pc-coll-hero-kangyur__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--pc-muted);
  margin: 0 0 8px;
  max-width: 60ch;
}

.pc-coll-layout-v3 {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 960px) {
  .pc-coll-layout-v3 {
    grid-template-columns: 1fr;
  }
}
.pc-tree-panel--list {
  position: sticky;
  top: 12px;
}
@media (max-width: 960px) {
  .pc-tree-panel--list {
    position: static;
  }
}
.pali-dir-list-host {
  padding: 4px 0 0;
  max-height: min(70vh, 720px);
  overflow: auto;
}

.pc-dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pc-dir-list--nested {
  margin: 4px 0 8px 0;
  padding-left: 8px;
  border-left: 2px solid rgba(200, 169, 107, 0.35);
}
.pc-dir-li {
  margin: 0 0 6px;
}
.pc-dir-row {
  display: grid;
  grid-template-columns: 48px 1fr 36px;
  gap: 12px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 10px;
  background: rgba(255, 254, 248, 0.65);
  border: 1px solid rgba(217, 210, 195, 0.65);
  transition: border-color 0.15s, background 0.15s;
}
.pc-dir-row:hover {
  border-color: rgba(200, 169, 107, 0.45);
  background: #fffef8;
}
.pc-dir-row--nested {
  background: rgba(255, 254, 248, 0.4);
}
.pc-dir-thumb {
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.pc-dir-thumb img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
}
.pc-dir-body {
  min-width: 0;
}
.pc-dir-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.pc-dir-link {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--pc-ink) !important;
  text-decoration: none !important;
}
.pc-dir-link:hover {
  text-decoration: underline !important;
  color: var(--pc-accent) !important;
}
.pc-dir-kind {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pc-muted);
  font-weight: 600;
}
.pc-dir-expand {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: var(--pc-paper);
  color: var(--pc-ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.pc-dir-expand:hover {
  border-color: var(--pc-gold);
  background: rgba(200, 169, 107, 0.12);
}
.pc-dir-expand-spacer {
  width: 36px;
  height: 36px;
  display: inline-block;
}
.pc-dir-children {
  display: none;
  margin-top: 4px;
}

.pc-pitaka-intro {
  margin: -8px 0 20px;
  font-size: 0.92rem;
  color: var(--pc-muted);
  max-width: 62ch;
  line-height: 1.55;
}
.pc-pitaka-panels {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.pc-pitaka-panel {
  display: grid;
  grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  gap: 22px 28px;
  align-items: start;
  padding: 22px 22px 24px;
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  background: #faf8f3;
  box-shadow: 0 2px 14px rgba(22, 51, 47, 0.05);
}
@media (max-width: 640px) {
  .pc-pitaka-panel {
    grid-template-columns: 1fr;
  }
}
.pc-pitaka-panel__fig {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(22, 51, 47, 0.08);
  line-height: 0;
}
.pc-pitaka-panel__fig img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.pc-pitaka-panel__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.25;
}
.pc-pitaka-panel__title a {
  color: var(--pc-ink);
  text-decoration: none;
}
.pc-pitaka-panel__title a:hover {
  color: var(--pc-accent);
  text-decoration: underline;
}
.pc-pitaka-panel__intro {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--pc-muted);
  margin: 0 0 12px;
  max-width: 56ch;
}
.pc-pitaka-panel__meta {
  font-size: 0.8rem;
  color: var(--pc-muted);
  margin: 0 0 14px;
}
.pc-pitaka-panel .pc-btn-pill {
  align-self: flex-start;
}

.pc-node-list-v3 {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pc-node-list-v3__item {
  margin: 0;
}
.pc-node-list-v3__row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 12px;
  background: var(--pc-paper);
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pc-node-list-v3__row:hover {
  border-color: rgba(200, 169, 107, 0.45);
  box-shadow: 0 4px 16px rgba(22, 51, 47, 0.06);
}
.pc-node-list-v3__thumb {
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
}
.pc-node-list-v3__thumb img {
  display: block;
  width: 48px;
  height: 48px;
}
.pc-node-list-v3__main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-node-list-v3__title {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--pc-ink);
}
.pc-node-list-v3__path {
  font-size: 0.72rem;
  color: var(--pc-muted);
  word-break: break-all;
}
.pc-node-list-v3__path code {
  font-size: 0.72rem;
  background: transparent;
}
.pc-node-list-v3__badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #5c4a2a;
  background: rgba(200, 169, 107, 0.2);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pc-node-list-v3__badge--folder {
  color: var(--pc-ink-soft);
  background: rgba(38, 75, 70, 0.1);
}

/* ——— Tam Tạng Pāli: trang nghiêm · thanh tịnh (Theravāda.jpg) ——— */
.pc-pali-v3--serene.pc-fe-v2 {
  --pc-bg: #f2efe8;
  --pc-paper: #faf8f4;
  --pc-paper-deep: #e8e4da;
  --pc-ink: #3a403d;
  --pc-ink-soft: #4d5652;
  --pc-muted: #6f756f;
  --pc-accent: #4d5c54;
  --pc-accent-hover: #3d4a44;
  --pc-gold: #9a8560;
  --pc-warm: #b5a892;
  --pc-border: #dcd5c8;
  --pc-sidebar: #ebe6dc;
  --pc-lib-fs: 24px;
  --pc-lib-fs-sm: 20px;
  --pc-lib-fs-xs: 18px;
  background: var(--pc-bg);
  color: var(--pc-ink);
}
.pc-pali-v3--serene .pc-bc-v2,
.pc-pali-v3--serene .pc-subnav {
  color: var(--pc-muted);
  font-size: var(--pc-lib-fs-xs);
  line-height: 1.55;
}
.pc-pali-v3--serene .pc-section-h--gold,
.pc-pali-v3--serene .pc-aside-h--gold {
  color: #8a7a62;
  border-bottom-color: rgba(154, 133, 96, 0.4);
  font-weight: 500;
  letter-spacing: 0.16em;
}
.pc-pali-v3--serene .pc-btn-pill {
  background: #4d5c54;
  border-color: #3f4c46;
  color: #f7f5f0 !important;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.pc-pali-v3--serene .pc-btn-pill:hover {
  background: #3f4c46;
  border-color: #343e39;
  color: #fff !important;
}
.pc-pali-v3--serene .pc-btn-pill--ghost {
  background: transparent;
  color: var(--pc-ink-soft) !important;
  border-color: var(--pc-border);
}
.pc-pali-v3--serene .pc-btn-pill--ghost:hover {
  background: rgba(77, 92, 84, 0.08);
  border-color: #c4bba8;
}
.pc-pali-v3--serene .pc-btn-solid {
  background: #4d5c54;
  border-color: #4d5c54;
  color: #f7f5f0 !important;
}
.pc-pali-v3--serene .pc-btn-solid:hover {
  background: #3f4c46;
  border-color: #3f4c46;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__title,
.pc-pali-v3--serene .pc-pali-hero-kangyur__title.pc-h1-v2 {
  color: #3d4540;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__lead {
  color: var(--pc-muted);
  line-height: 1.75;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__label {
  color: #6f756f;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__caption,
.pc-pali-v3--serene .pc-coll-hero-kangyur__caption {
  color: #8a8f88;
  font-style: normal;
  letter-spacing: 0.02em;
}

/* Khung ảnh chung — Theravāda.jpg */
.pc-pali-v3--serene .pc-pali-v3__photo {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(180, 172, 158, 0.45);
  background: #e8e4dc;
  box-shadow: 0 4px 24px rgba(45, 48, 44, 0.08);
}
.pc-pali-v3--serene .pc-pali-v3__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(45, 48, 44, 0.04) 100%
  );
}
.pc-pali-v3--serene .pc-pali-v3__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(0.97);
  transform: scale(1.01);
}
.pc-pali-v3--serene .pc-pali-v3__photo--hero {
  max-width: 300px;
  aspect-ratio: 4 / 5;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__img {
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
.pc-pali-v3--serene .pc-pali-v3__photo--coll-hero {
  max-width: 280px;
  aspect-ratio: 7 / 5;
}
.pc-pali-v3--serene .pc-coll-hero-kangyur__img {
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
.pc-pali-v3--serene .pc-pali-v3__photo--tile {
  aspect-ratio: 280 / 200;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile__media.pc-pali-v3__photo--tile {
  aspect-ratio: auto;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list {
  gap: 28px;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile--row {
  box-shadow: 0 2px 16px rgba(45, 48, 44, 0.06);
}
.pc-pali-v3--serene .pc-pitaka-panel__fig.pc-pali-v3__photo--tile {
  aspect-ratio: 200 / 143;
  max-width: 200px;
}
.pc-pali-v3--serene .pc-pitaka-panel {
  background: var(--pc-paper);
  border-color: var(--pc-border);
  box-shadow: none;
}
.pc-pali-v3--serene .pc-pitaka-panel__title {
  font-weight: 500;
}
.pc-pali-v3--serene .pc-pali-v3__photo--thumb {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 10px;
}
.pc-pali-v3--serene .pc-pali-v3__photo--thumb img {
  transform: none;
}

.pc-pali-v3--serene .pc-pali-tile {
  border-color: var(--pc-border);
  background: var(--pc-paper);
  box-shadow: none;
}
.pc-pali-v3--serene .pc-pali-tile:hover {
  border-color: #c9c2b4;
  box-shadow: 0 8px 28px rgba(45, 48, 44, 0.06);
}
.pc-pali-v3--serene .pc-pali-tile__title {
  font-weight: 500;
}
.pc-pali-v3--serene .pc-badge {
  font-weight: 500;
  letter-spacing: 0.06em;
}
.pc-pali-v3--serene .pc-tree-panel--list {
  border-color: var(--pc-border);
  background: var(--pc-paper);
}
.pc-pali-v3--serene .pc-tree-hint {
  color: var(--pc-muted);
  line-height: 1.65;
}
.pc-pali-v3--serene .pc-dir-row {
  background: rgba(250, 248, 244, 0.85);
  border-color: var(--pc-border);
}
.pc-pali-v3--serene .pc-dir-row:hover {
  background: var(--pc-paper);
  border-color: #c9c2b4;
}
.pc-pali-v3--serene .pc-dir-link {
  font-weight: 500;
}
.pc-pali-v3--serene .pc-corpus-metric {
  background: var(--pc-paper);
  border-color: var(--pc-border);
}
.pc-pali-v3--serene .pc-corpus-metric .n {
  color: var(--pc-ink);
  font-weight: 500;
}
.pc-pali-v3--serene .pc-search-hub-form {
  border-color: var(--pc-border);
  background: var(--pc-paper);
}
.pc-pali-v3--serene .pc-node-list-v3__row {
  border-color: var(--pc-border);
  background: var(--pc-paper);
}
.pc-pali-v3--serene .pc-node-list-v3__row:hover {
  border-color: #c9c2b4;
  box-shadow: 0 4px 16px rgba(45, 48, 44, 0.05);
}
.pc-pali-v3--serene .pc-node-list-v3__title {
  font-weight: 500;
}

/* Tam Tạng Pāli — cỡ chữ lớn: đoạn chính 24px, tiêu đề & phụ đề tỷ lệ theo */
.pc-pali-v3--serene .pc-pali-hero-kangyur__label {
  font-size: 1rem;
  letter-spacing: 0.14em;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__title {
  font-size: clamp(2.25rem, 4.2vw, 3rem);
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__lead {
  font-size: var(--pc-lib-fs);
  line-height: 1.65;
}
.pc-pali-v3--serene .pc-pali-hero-kangyur__caption {
  font-size: 1rem;
  line-height: 1.45;
}
.pc-pali-v3--serene .pc-btn-pill {
  font-size: 1.125rem;
  padding: 14px 28px;
}
.pc-pali-v3--serene .pc-btn-solid {
  font-size: 1.0625rem;
  padding: 12px 22px;
}
.pc-pali-v3--serene .pc-section-h--gold {
  font-size: 1.375rem;
  letter-spacing: 0.12em;
  text-align: left;
}
.pc-pali-v3--serene .pc-pali-collections-v3__sub {
  font-size: var(--pc-lib-fs-sm);
  line-height: 1.6;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile__title {
  font-size: 24px;
  font-weight: 700;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile__pali {
  font-size: 18px;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile__intro {
  font-size: 18px;
  line-height: 1.55;
}
.pc-pali-v3--serene .pc-pali-tile-grid--list .pc-pali-tile__works-line {
  font-size: 18px;
}
.pc-pali-v3--serene .pc-pali-tile__btn {
  border-radius: 3px;
  padding: 10px 18px;
  font-size: 1.0625rem;
  background: #4d5c54;
  border-color: #3f4c46;
  color: #f7f5f0 !important;
}
.pc-pali-v3--serene .pc-pali-tile__btn:hover {
  background: #3f4c46;
  border-color: #343e39;
  color: #fff !important;
}
.pc-pali-v3--serene .pc-pali-tile__btn--ghost {
  background: transparent;
  color: var(--pc-ink-soft) !important;
  border-color: var(--pc-border);
}
.pc-pali-v3--serene .pc-pali-tile__btn--ghost:hover {
  background: rgba(77, 92, 84, 0.08);
  border-color: #c4bba8;
  color: var(--pc-accent-hover) !important;
}
.pc-pali-v3--serene .pc-coll-hero-kangyur__lead {
  font-size: var(--pc-lib-fs);
  line-height: 1.65;
}
.pc-pali-v3--serene .pc-coll-hero-kangyur__caption {
  font-size: 1rem;
}
.pc-pali-v3--serene .pc-corpus-metric .n {
  font-size: 2rem;
}
.pc-pali-v3--serene .pc-corpus-metric .l {
  font-size: 0.9375rem;
  letter-spacing: 0.1em;
}
.pc-pali-v3--serene .pc-aside-h--gold {
  font-size: 0.9375rem;
}
.pc-pali-v3--serene .pc-tree-hint {
  font-size: var(--pc-lib-fs-sm);
  line-height: 1.6;
}
.pc-pali-v3--serene .pc-dir-link {
  font-size: 1.125rem;
}
.pc-pali-v3--serene .pc-dir-kind {
  font-size: 0.875rem;
}
.pc-pali-v3--serene .pc-pitaka-panel__title {
  font-size: 1.75rem;
}
.pc-pali-v3--serene .pc-pitaka-panel__intro {
  font-size: var(--pc-lib-fs);
  line-height: 1.65;
}
.pc-pali-v3--serene .pc-pitaka-panel__meta {
  font-size: var(--pc-lib-fs-sm);
}
.pc-pali-v3--serene .pc-pitaka-intro {
  font-size: var(--pc-lib-fs-sm);
  line-height: 1.6;
}
.pc-pali-v3--serene .pc-page-hero .pc-h1-v2,
.pc-pali-v3--serene .pc-h1-v2.pc-pali-hero-kangyur__title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
}
.pc-pali-v3--serene .pc-page-hero .pc-h1-v2:not(.pc-pali-hero-kangyur__title) {
  font-size: clamp(2rem, 3.2vw, 2.6rem);
}
.pc-pali-v3--serene .pc-lead-v2 {
  font-size: var(--pc-lib-fs);
  line-height: 1.65;
}
.pc-pali-v3--serene .pc-kicker {
  font-size: 1rem;
  letter-spacing: 0.08em;
}
.pc-pali-v3--serene .pc-node-path {
  font-size: var(--pc-lib-fs-sm);
}
.pc-pali-v3--serene .pc-node-list-v3__title {
  font-size: 1.25rem;
}
.pc-pali-v3--serene .pc-node-list-v3__path,
.pc-pali-v3--serene .pc-node-list-v3__path code {
  font-size: 1rem;
}
.pc-pali-v3--serene .pc-node-list-v3__badge {
  font-size: 0.8125rem;
}
.pc-pali-v3--serene .pc-section-h:not(.pc-section-h--gold) {
  font-size: 1.35rem;
}
.pc-pali-v3--serene .pc-search-hub-form input[type="search"],
.pc-pali-v3--serene .pc-search-hub-form .pc-select-v2,
.pc-pali-v3--serene .pc-input-v2 {
  font-size: 1.0625rem;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-book-title {
  font-size: 1.25rem;
}
.pc-pali-v3--serene .pc-book-meta,
.pc-pali-v3--serene .pc-stat-inline {
  font-size: var(--pc-lib-fs-sm);
}
.pc-pali-v3--serene .pc-catalog-grid .pc-book-parent-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #5f564c;
  font-size: 1rem;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-book-parent-meta__label {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8a7f72;
  font-weight: 600;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-book-parent-meta__value {
  color: #2f2a24;
  font-weight: 600;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-book-path,
.pc-pali-v3--serene .pc-catalog-grid .pc-book-path code {
  font-size: 1rem;
  line-height: 1.45;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-lang-pill {
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 10px;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-lang-pill strong {
  font-size: 1rem;
}
.pc-pali-v3--serene .pc-catalog-grid .pc-draft {
  font-size: 1rem;
}
.pc-pali-v3--serene .pc-results .pc-result-meta {
  font-size: 1rem;
}

/* -------------------------------------------------------------------------- */
/* /pali-canon — trang chủ: Kho tàng Thánh điển Pāli (v4: trang nghiêm, rõ lớp) */
/* -------------------------------------------------------------------------- */

#main .container:has(.pc-pali-index-v4) {
  max-width: min(94vw, 1680px);
  width: 100%;
  padding-left: clamp(1rem, 2.5vw, 2rem);
  padding-right: clamp(1rem, 2.5vw, 2rem);
}

@media (min-width: 1600px) {
  #main .container:has(.pc-pali-index-v4) {
    max-width: min(92vw, 1720px);
  }
}

.pc-pali-hero-canon {
  --pc-canon-gold: #a68b4a;
  --pc-canon-ink: #1a2332;
  --pc-canon-muted: #6b6a63;
  position: relative;
  margin-bottom: clamp(36px, 5vw, 56px);
  border-radius: 0 0 1.75rem 1.75rem;
  overflow: hidden;
  font-family: Inter, system-ui, sans-serif;
  color: #3d3d38;
  background: linear-gradient(180deg, #faf8f3 0%, #f5f3ef 38%, #f0ebe2 100%);
}

.pc-pali-hero-canon__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.pc-pali-hero-canon__wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}

.pc-pali-hero-canon__wash--a {
  width: min(90vw, 52rem);
  height: min(90vw, 52rem);
  left: -18%;
  top: -8%;
  background: radial-gradient(circle, rgba(45, 74, 62, 0.12) 0%, transparent 68%);
}

.pc-pali-hero-canon__wash--b {
  width: min(80vw, 42rem);
  height: min(80vw, 42rem);
  right: -12%;
  bottom: 5%;
  background: radial-gradient(circle, rgba(166, 139, 74, 0.09) 0%, transparent 65%);
}

.pc-pali-hero-canon__orbit {
  position: absolute;
  right: -4rem;
  top: 18%;
  width: min(32rem, 75vw);
  height: min(32rem, 75vw);
  border-radius: 50%;
  border: 1px solid rgba(120, 113, 97, 0.12);
  opacity: 0.85;
}

.pc-pali-hero-canon__orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(120, 113, 97, 0.06);
}

.pc-pali-hero-canon__inner {
  position: relative;
  z-index: 1;
  max-width: min(100%, 1680px);
  margin: 0 auto;
  padding: clamp(2rem, 4.5vw, 3.25rem) clamp(1.25rem, 3.5vw, 3rem) clamp(2.75rem, 5vw, 4rem);
}

.pc-pali-hero-canon__bc {
  font-size: clamp(0.9rem, 1.15vw, 1.05rem);
  letter-spacing: 0.05em;
  color: #8a877c;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.pc-pali-hero-canon__bc a {
  color: #6f6c62;
  text-decoration: none;
  transition: color 0.2s ease;
}

.pc-pali-hero-canon__bc a:hover {
  color: var(--pc-canon-ink);
}

.pc-pali-hero-canon__bc-dot {
  margin: 0 0.5rem;
  color: #c4bfb2;
  font-weight: 300;
}

.pc-pali-hero-canon__bc-current {
  color: #4a4840;
  font-weight: 500;
}

.pc-pali-hero-canon__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .pc-pali-hero-canon__grid {
    grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.12fr);
    align-items: stretch;
  }
}

.pc-pali-hero-cover-card {
  border-radius: 1.35rem;
  border: 1px solid rgba(120, 113, 97, 0.15);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 248, 242, 0.98) 100%);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 50px rgba(26, 35, 50, 0.06);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.pc-pali-hero-cover-card__img-wrap {
  overflow: hidden;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.pc-pali-hero-cover-card__img-wrap .pc-pali-hero-banner {
  max-width: none;
  margin: 0 auto;
  width: 100%;
  aspect-ratio: auto;
  height: min(52vh, 560px);
  min-height: 300px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.pc-pali-hero-cover-card__body {
  padding: clamp(1.5rem, 2.8vw, 2rem) clamp(1.5rem, 2.8vw, 2.15rem);
}

.pc-pali-hero-cover-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.pc-pali-hero-cover-card__kicker {
  font-size: clamp(0.7rem, 1vw, 0.78rem);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: #9c988a;
  margin: 0;
}

.pc-pali-hero-cover-card__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 600;
  color: #1e2d3a;
  margin: 0.45rem 0 0;
  line-height: 1.2;
}

.pc-pali-hero-cover-card__tag {
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(166, 139, 74, 0.45);
  background: rgba(255, 252, 245, 0.9);
  color: #6b5c38;
  font-size: clamp(0.72rem, 1vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
}

.pc-pali-hero-cover-card__desc {
  margin: 1rem 0 0;
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  line-height: 1.75;
  color: #6f6d65;
}

.pc-pali-hero-cover-card__stats {
  margin: 1rem 0 0;
}

.pc-pali-hero-canon__main {
  position: relative;
  padding: 0 0 0 clamp(0.75rem, 2vw, 1.5rem);
}

@media (min-width: 640px) {
  .pc-pali-hero-canon__main {
    padding-left: 1.85rem;
  }
}

.pc-pali-hero-canon__accent {
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 2.75rem;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(166, 139, 74, 0.55), rgba(45, 74, 62, 0.2) 55%, transparent);
  opacity: 0.95;
}

@media (max-width: 639px) {
  .pc-pali-hero-canon__accent {
    width: 1px;
    opacity: 0.75;
  }
}

.pc-pali-hero-canon__kicker {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pc-canon-gold);
}

.pc-pali-hero-canon__kicker-line {
  display: block;
  width: 3rem;
  height: 1px;
  background: linear-gradient(90deg, var(--pc-canon-gold), rgba(166, 139, 74, 0.15));
}

.pc-pali-hero-canon__kicker-txt {
  font-family: Inter, system-ui, sans-serif;
}

.pc-pali-hero-canon__h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.65rem, 6.2vw, 4.5rem);
  font-weight: 600;
  color: #152433;
  line-height: 1.08;
  margin: 1.5rem 0 0;
  letter-spacing: 0.02em;
}

.pc-pali-hero-canon__rule {
  height: 1px;
  max-width: 16rem;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  background: linear-gradient(90deg, rgba(166, 139, 74, 0.55), rgba(45, 74, 62, 0.12), transparent);
  border: 0;
}

.pc-pali-hero-canon__lead {
  margin-top: clamp(1.35rem, 2.6vw, 2rem);
  max-width: 50rem;
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  line-height: 1.9;
  color: #5a5850;
  font-weight: 400;
}

.pc-pali-hero-canon__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.15rem 0;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  border-top: 1px solid rgba(90, 88, 80, 0.1);
}

.pc-pali-hero-canon__meta-pair {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 6.5rem;
  padding-right: 1.5rem;
}

.pc-pali-hero-canon__meta-pair dt {
  margin: 0;
  font-size: clamp(0.68rem, 0.95vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9c988a;
}

.pc-pali-hero-canon__meta-pair dd {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.55rem, 2.6vw, 1.85rem);
  font-weight: 600;
  color: #2a3540;
  line-height: 1.2;
}

.pc-pali-hero-canon__meta-sep {
  align-self: stretch;
  width: 1px;
  min-height: 3.25rem;
  margin: 0 0.45rem;
  background: linear-gradient(180deg, transparent, rgba(166, 139, 74, 0.35), transparent);
}

@media (max-width: 520px) {
  .pc-pali-hero-canon__meta-sep {
    display: none;
  }

  .pc-pali-hero-canon__meta-pair {
    flex: 1 1 45%;
    border-bottom: 1px solid rgba(90, 88, 80, 0.08);
    padding-bottom: 1rem;
  }
}

.pc-pali-hero-canon__actions {
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 0;
}

.pc-pali-hero-banner {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(176, 168, 148, 0.45);
  box-shadow:
    0 4px 6px rgba(45, 48, 44, 0.04),
    0 22px 48px rgba(30, 42, 38, 0.12);
  background: linear-gradient(165deg, #f0ebe3 0%, #e4dfd4 100%);
}

.pc-pali-hero-banner__slides {
  position: absolute;
  inset: 0;
}

.pc-pali-hero-banner__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.pc-pali-hero-banner__img--a {
  animation: pcPaliHeroFadeA 14s ease-in-out infinite;
}

.pc-pali-hero-banner__img--b {
  animation: pcPaliHeroFadeB 14s ease-in-out infinite;
}

@keyframes pcPaliHeroFadeA {
  0%,
  44% {
    opacity: 1;
    transform: scale(1);
  }
  50%,
  94% {
    opacity: 0;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pcPaliHeroFadeB {
  0%,
  44% {
    opacity: 0;
    transform: scale(1.05);
  }
  50%,
  94% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
  }
}

.pc-pali-hero-banner__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(45, 52, 48, 0.08) 45%,
    rgba(30, 38, 34, 0.18) 100%
  );
  mix-blend-mode: multiply;
}

.pc-pali-hero-banner__glow {
  position: absolute;
  inset: -40%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 30% 20%,
    rgba(255, 248, 230, 0.35) 0%,
    transparent 55%
  );
  animation: pcPaliHeroGlow 10s ease-in-out infinite alternate;
}

@keyframes pcPaliHeroGlow {
  from {
    opacity: 0.65;
    transform: translate(0, 0);
  }
  to {
    opacity: 1;
    transform: translate(4%, 2%);
  }
}

.pc-pali-index-v4 .pc-pali-hero-kangyur__caption {
  text-align: center;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.pc-pali-hero-kangyur__caption--stats {
  margin-top: 8px;
}

.pc-pali-stat-views {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: #6f756f;
}

.pc-pali-stat-views .pc-icon-eye {
  flex-shrink: 0;
  opacity: 0.75;
  color: #5c6b62;
}

.pc-pali-stat-views strong {
  font-variant-numeric: tabular-nums;
  color: #3d4540;
  font-weight: 600;
}

.pc-pali-stat-views__label {
  font-size: 0.88rem;
  color: #8a8f88;
}

.pc-pali-v3--serene.pc-pali-index-v4 .pc-btn-pill--search-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px !important;
  font-weight: 650 !important;
  letter-spacing: 0.02em;
  border: 2px solid #2d4a42 !important;
  background: linear-gradient(180deg, #3d5c52 0%, #2a433c 100%) !important;
  color: #faf9f6 !important;
  box-shadow: 0 6px 22px rgba(32, 58, 50, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.pc-pali-v3--serene.pc-pali-index-v4 .pc-btn-pill--search-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(32, 58, 50, 0.34);
  filter: brightness(1.05);
  color: #fff !important;
  background: linear-gradient(180deg, #456a5e 0%, #2f4a42 100%) !important;
  border-color: #243d35 !important;
}

.pc-pali-v3--serene.pc-pali-index-v4 .pc-btn-pill--search-primary:active {
  transform: translateY(0);
}

.pc-pali-v3--serene.pc-pali-index-v4 .pc-btn-pill--enter-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px !important;
  font-weight: 600 !important;
  background: #fffef8 !important;
  color: #2a3d36 !important;
  border: 2px solid #c4bba8 !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.pc-pali-v3--serene.pc-pali-index-v4 .pc-btn-pill--enter-cta:hover {
  transform: translateY(-1px);
  border-color: #9aae9e !important;
  background: #f6f3ec !important;
  color: #1f312a !important;
}

.pc-icon-inline {
  flex-shrink: 0;
  vertical-align: middle;
}

.pc-pali-collections-v4__head {
  margin-bottom: 8px;
}

.pc-shelf-grid--collections {
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: clamp(22px, 3vw, 36px);
  margin-top: 28px;
  align-items: stretch;
}

.pc-pali-index-v4 .pc-shelf-book--collection {
  transition: transform 0.25s ease;
}

.pc-pali-index-v4 .pc-shelf-book--collection:hover {
  transform: translateY(-4px);
}

.pc-pali-index-v4 .pc-shelf-book--collection .pc-shelf-meta {
  min-height: 0;
  transition:
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.pc-pali-index-v4 .pc-shelf-book--collection:hover .pc-shelf-meta {
  border-color: #b8b09e;
  box-shadow: 0 12px 32px rgba(29, 35, 28, 0.1);
}

.pc-shelf-pali-line {
  margin: 0;
  font-size: 0.82rem;
  font-style: italic;
  color: #6d7a72;
  line-height: 1.35;
}

.pc-shelf-teaser {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #5a635d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-shelf-detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-height 0.45s ease,
    opacity 0.3s ease,
    margin 0.3s ease;
  margin: 0;
}

.pc-shelf-detail__inner {
  margin: 0;
  padding-top: 8px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #4d5650;
  border-top: 1px dashed rgba(180, 172, 158, 0.65);
}

.pc-pali-index-v4 .pc-shelf-book--collection:hover .pc-shelf-detail,
.pc-pali-index-v4 .pc-shelf-book--collection:focus-within .pc-shelf-detail {
  max-height: 220px;
  opacity: 1;
  margin-top: 4px;
}

.pc-shelf-views {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5c665e;
  font-variant-numeric: tabular-nums;
}

.pc-shelf-views__ic {
  display: flex;
  color: #7a8a80;
  opacity: 0.9;
}

.pc-shelf-views__ic .pc-icon-eye {
  width: 15px;
  height: 15px;
}

.pc-pali-index-v4 .pc-shelf-meta .pc-pali-tile__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pc-pali-index-v4 .pc-shelf-meta .pc-pali-tile__btn .pc-icon-inline {
  opacity: 0.92;
}

@media (max-width: 900px) {
  .pc-pali-hero-kangyur__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pc-btn-pill--search-primary,
  .pc-btn-pill--enter-cta {
    width: 100%;
    justify-content: center;
  }

  .pc-shelf-grid--collections {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pc-pali-hero-banner__img--a,
  .pc-pali-hero-banner__img--b {
    animation: none !important;
    opacity: 1 !important;
  }

  .pc-pali-hero-banner__img--b {
    display: none;
  }

  .pc-pali-hero-banner__glow {
    animation: none !important;
  }

  .pc-pali-index-v4 .pc-shelf-book--collection:hover {
    transform: none;
  }
}
