article.door-part > h1 {
  margin-top: 2rem;
}
h1[id], h2[id] { scroll-margin-top: 4.5rem; }
.stotra {
  margin: 0.4rem 0 1rem;
  line-height: 1.75;
}
ol.chapters {
  margin: 0.2rem 0 1.4rem;
  padding-left: 1.5rem;
}
ol.chapters li { margin: 0.15rem 0; }
ol.chapters a { font-weight: 650; }

figure.plate {
  margin: 0.35rem 0 1.15rem;
}
figure.plate svg,
figure.plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
html[data-theme="dark"] figure.plate img {
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
}
figure.plate figcaption {
  margin-top: 0.45rem;
  font-size: 1rem;
  line-height: 1.45;
  color: #5c4636;
}
figure.plate figcaption .deva {
  display: block;
  margin-top: 0.12rem;
}
figure.plate figcaption .photo-credit {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.88;
}
figure.plate figcaption .photo-credit a {
  color: inherit;
}
html[data-theme="dark"] figure.plate figcaption {
  color: #ddcbb8;
}

/* Fix: Keep Devanagari subtitles inside parentheses inline so brackets don't break onto separate lines */
h1 > span.deva,
h2 > span.deva,
h3 > span.deva {
  display: inline;
  font-weight: 500;
}

/* The patro month is four moon shapes, not four color boxes. */
figure.moon-month .moon-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.55rem;
  margin: 0;
  padding: 0.9rem 0.75rem 0.75rem;
  background: #172033;
  border-radius: 14px;
}
figure.moon-month .moon-step { margin: 0; text-align: center; color: #f6ead4; }
figure.moon-month .moon-step p {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  line-height: 1.35;
}
figure.moon-month .moon-step b { font-weight: 750; }
figure.moon-month .moon-end {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  text-align: center;
  color: #f3e2a8;
  font-weight: 650;
}
figure.moon-month svg {
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 720px) {
  figure.moon-month .moon-strip { grid-template-columns: 1fr 1fr; }
}

/* The sun's month and the moon's month share a name and not a span of days. */
figure.plate.sun-span .sun-board {
  background: #172033;
  border-radius: 14px;
  padding: 0.85rem 0.8rem 0.75rem;
  color: #f6ead4;
}
figure.plate.sun-span .deva { color: inherit; }
figure.plate.sun-span .sun-name,
figure.plate.sun-span .sun-end {
  margin: 0;
  text-align: center;
  color: #f3e2a8;
  font-weight: 750;
}
figure.plate.sun-span .sun-hint {
  margin: 0.2rem 0 0;
  text-align: center;
  color: #f6ead4;
  font-size: 0.88rem;
  line-height: 1.35;
}
figure.plate.sun-span .span-row {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.35rem 0.65rem;
  align-items: center;
  margin-top: 0.85rem;
}
figure.plate.sun-span .span-kicker {
  margin: 0;
  text-align: center;
  font-weight: 750;
  line-height: 1.2;
}
figure.plate.sun-span .span-lane { min-width: 0; }
figure.plate.sun-span .span-note {
  margin: 0.28rem 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
}
figure.plate.sun-span .gate-track,
figure.plate.sun-span .lane-ghost {
  height: 22px;
  border-bottom: 2px solid #f6d56a;
  background-image: repeating-linear-gradient(
    90deg,
    #e7c98a 0 2px,
    transparent 2px calc(100% / 31)
  );
  background-size: 100% 12px;
  background-repeat: no-repeat;
  background-position: left bottom 2px;
}
figure.plate.sun-span .gate-nums {
  position: relative;
  height: 1.15rem;
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  font-weight: 650;
}
figure.plate.sun-span .gate-nums .n1 { position: absolute; left: 0; }
figure.plate.sun-span .gate-nums .n15 {
  position: absolute;
  left: 45%;
  transform: translateX(-50%);
}
figure.plate.sun-span .gate-nums .nlast { position: absolute; right: 0; }
figure.plate.sun-span .moon-lane {
  position: relative;
  height: 48px;
}
figure.plate.sun-span .lane-ghost {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom-color: rgba(246, 213, 106, 0.35);
  opacity: 0.45;
}
figure.plate.sun-span .moon-window {
  position: absolute;
  left: 14%;
  width: 72%;
  top: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #f3e2a8;
  padding: 0 0.15rem 4px;
  box-sizing: border-box;
}
figure.plate.sun-span .moon-window::before,
figure.plate.sun-span .moon-window::after {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 2px;
  height: 14px;
  background: #f3e2a8;
}
figure.plate.sun-span .moon-window::before { left: 0; }
figure.plate.sun-span .moon-window::after { right: 0; }
figure.plate.sun-span .moon-note {
  margin-left: 14%;
  width: 72%;
  text-align: center;
}
figure.plate.sun-span svg.day-mark,
figure.plate.sun-span svg.moon-phase {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 0.15rem;
  border-radius: 0;
  box-shadow: none;
}
figure.plate.sun-span svg.moon-phase {
  width: 34px;
  height: 34px;
  margin: 0;
  flex: 0 0 auto;
}
@media (max-width: 720px) {
  figure.plate.sun-span .span-row { grid-template-columns: 3.4rem minmax(0, 1fr); }
  figure.plate.sun-span svg.day-mark { width: 28px; height: 28px; }
  figure.plate.sun-span svg.moon-phase { width: 26px; height: 26px; }
}

/* Intra-month navigation pill ribbon */
nav.month-toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin: 0.6rem 0 1.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--site-panel, #fffaf0);
  border: 1px solid var(--site-line, #e7d8bf);
  border-radius: var(--site-radius-md, 12px);
}
nav.month-toc .toc-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--site-muted, #6e5e50);
  margin-right: 0.25rem;
}
nav.month-toc a,
nav.month-toc a.month-toc-pill {
  display: inline-block;
  padding: 0.24rem 0.68rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--site-radius-pill, 999px);
  text-decoration: none;
  background: var(--site-bg, #fdf6e9);
  color: var(--site-ink, #2c221a);
  border: 1px solid var(--site-line, #e7d8bf);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
nav.month-toc a:hover,
nav.month-toc a:focus-visible,
nav.month-toc a.month-toc-pill:hover,
nav.month-toc a.month-toc-pill:focus-visible {
  background: var(--site-chip, #f4ecdc);
  color: var(--site-accent-hover, #8a3414);
  border-color: var(--site-accent, #b5451d);
}
html[data-theme="dark"] nav.month-toc a:hover,
html[data-theme="dark"] nav.month-toc a:focus-visible,
html[data-theme="dark"] nav.month-toc a.month-toc-pill:hover,
html[data-theme="dark"] nav.month-toc a.month-toc-pill:focus-visible {
  background: var(--site-panel-hover, #342a22);
  color: var(--site-accent, #f0b089);
  border-color: var(--site-accent, #f0b089);
}

/* Parametric festival metadata table */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.katha-table {
  margin: 0.85rem 0 1.25rem;
  font-size: 0.94rem;
}
.katha-table.col-weighted,
.katha-table.grid-weighted {
  table-layout: fixed;
  width: 100%;
}
.katha-table th {
  width: 32%;
  background: rgba(44, 34, 26, 0.04);
  font-weight: 650;
  color: inherit;
  white-space: normal;
  overflow-wrap: break-word;
}
.katha-table.col-weighted th {
  width: auto;
}
.katha-table td {
  overflow-wrap: anywhere;
}
@media (max-width: 640px) {
  .katha-table {
    font-size: 0.9rem;
  }
  .katha-table th {
    width: 36%;
    min-width: 6.5rem;
  }
  .katha-table th,
  .katha-table td {
    padding: 0.4rem 0.5rem;
  }
}
html[data-theme="dark"] .katha-table th {
  background: rgba(255, 255, 255, 0.05);
}
.katha-table td {
  line-height: 1.5;
}
.katha-table td ul.katha-day-list {
  margin: 0.2rem 0;
  padding-left: 1.25rem;
  list-style-type: disc;
}
.katha-table td ul.katha-day-list > li {
  margin-bottom: 0.5rem;
  line-height: 1.45;
}
.katha-table td ul.katha-day-list > li:last-child {
  margin-bottom: 0;
}
.katha-table td ul.katha-day-list ul {
  margin: 0.25rem 0 0.15rem;
  padding-left: 1.2rem;
  list-style-type: circle;
}
.katha-table td ul.katha-day-list ul li {
  margin-bottom: 0.22rem;
  font-size: 0.94em;
  line-height: 1.4;
}

/* Bilingual Side-by-Side Song Tables (Deusi & Bhailo) */
.katha-table.song-table th:first-child,
.katha-table.song-table td:first-child {
  width: 48%;
}
.katha-table.song-table th:nth-child(2),
.katha-table.song-table td:nth-child(2) {
  width: 52%;
}
.katha-table.song-table .section-row td {
  background: rgba(181, 69, 29, 0.08);
  font-weight: 700;
  text-align: center;
  color: #b5451d;
  padding: 0.55rem 0.65rem;
}
html[data-theme="dark"] .katha-table.song-table .section-row td {
  background: rgba(243, 226, 168, 0.08);
  color: #f3e2a8;
}
.katha-table.song-table td {
  vertical-align: top;
  padding: 0.5rem 0.75rem;
}

/* Thematic motif tag chips */
.katha-motifs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.65rem 0 1.15rem;
  font-size: 0.86rem;
}
.katha-motifs .motifs-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: #7b6452;
  margin-right: 0.2rem;
}
html[data-theme="dark"] .katha-motifs .motifs-label {
  color: #c9b7a4;
}
.katha-motif-tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: rgba(44, 34, 26, 0.06);
  color: inherit;
  text-decoration: none;
  font-weight: 550;
  transition: background 0.15s ease;
}
html[data-theme="dark"] .katha-motif-tag {
  background: rgba(255, 255, 255, 0.08);
}
.katha-motif-tag:hover {
  background: rgba(246, 213, 106, 0.4);
}

/* Gods page: the jump table, drawn as on the Nepali Readings index */
.readings-index-sticky {
  margin: 0.75rem 0 1.25rem;
}
.readings-index-sticky nav.readings-jump-nav {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.85rem 0.75rem;
  background: var(--bg-alt, #faf7f2);
  border: 1px solid var(--border, #e5dec9);
  border-radius: 10px;
}
.readings-index-sticky nav.readings-jump-nav .toc-label {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c5443;
}
.readings-jump-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.readings-jump-table.jump-weighted {
  table-layout: fixed;
}
.readings-jump-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c5443;
  padding: 0 0.35rem 0.45rem;
  border-bottom: 1px solid rgba(44, 34, 26, 0.12);
  vertical-align: bottom;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: break-word;
}
.readings-jump-table td {
  padding: 0.5rem 0.35rem 0;
  vertical-align: top;
}
.readings-jump-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}
.readings-jump-table .readings-jump-list {
  gap: 0.18rem;
}
.readings-jump-table .readings-jump-list > li {
  margin: 0;
}
.readings-jump-list > li.jump-subhead {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c5443;
  margin-top: 0.45rem;
}
.readings-jump-list > li.jump-subhead:first-child {
  margin-top: 0;
}
html[data-theme="dark"] .readings-jump-list > li.jump-subhead {
  color: #c9b7a4;
}
.readings-jump-list a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(44, 34, 26, 0.14);
  background: #fff;
  color: #2c221a;
}
.readings-jump-table .readings-jump-list > li > a {
  padding: 0.18rem 0.55rem;
  line-height: 1.25;
}
.readings-jump-list a:hover,
.readings-jump-list a:focus-visible {
  border-color: #8b3a1a;
  color: #8b3a1a;
}
html[data-theme="dark"] .readings-index-sticky nav.readings-jump-nav .toc-label {
  color: #c9b7a4;
}
html[data-theme="dark"] .readings-jump-list a {
  background: #25201a;
  border-color: #3d332a;
  color: #ede2d3;
}
html[data-theme="dark"] .readings-jump-list a:hover,
html[data-theme="dark"] .readings-jump-list a:focus-visible {
  border-color: #e7a15a;
  color: #e7a15a;
}
html[data-theme="dark"] .readings-jump-table th {
  color: #c9b7a4;
  border-bottom-color: rgba(243, 230, 212, 0.14);
}
@media (max-width: 640px) {
  .readings-jump-table,
  .readings-jump-table thead,
  .readings-jump-table tbody,
  .readings-jump-table tfoot,
  .readings-jump-table tr,
  .readings-jump-table th,
  .readings-jump-table td {
    display: block;
    width: auto;
  }
  .readings-jump-table th {
    padding-top: 0.5rem;
  }
}

/* Gods page: one card for each god, in a grid that wraps */
.group-lead {
  margin: 0.15rem 0 0.9rem;
  line-height: 1.55;
}

/* Gods page: parts hold a note, and some parts hold sections */
.door-part[id],
.god-section[id],
.god-card[id] {
  scroll-margin-top: 4.5rem;
}
.part-note {
  margin: 0.2rem 0 1.1rem;
  padding: 0.7rem 0.95rem;
  line-height: 1.6;
  background: var(--bg-alt, #faf7f2);
  border: 1px solid var(--border, #e5dec9);
  border-left: 4px solid #8b3a1a;
  border-radius: 0 10px 10px 0;
}
.god-section {
  margin: 1.5rem 0 0.4rem;
}
#top {
  scroll-margin-top: 4.5rem;
}
p.to-top {
  margin: 0.85rem 0 0.2rem;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 650;
}
.god-section-title {
  margin: 0 0 0.35rem;
  padding-bottom: 0.3rem;
  font-size: 1.2rem;
  line-height: 1.3;
  border-bottom: 1px solid rgba(44, 34, 26, 0.18);
}
html[data-theme="dark"] .part-note {
  background: #1f1a15;
  border-color: #3d332a;
  border-left-color: #e7a15a;
}
html[data-theme="dark"] .god-section-title {
  border-bottom-color: rgba(243, 230, 212, 0.2);
}

/* Gods page: the jump table lists parts, then sections, then the gods */
.readings-jump-list > li.jump-part {
  width: 100%;
}
.readings-jump-list a.jump-part-link {
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  line-height: 1.25;
}
ul.jump-sections {
  list-style: none;
  margin: 0.22rem 0 0.08rem;
  padding: 0 0 0 0.6rem;
  border-left: 2px solid rgba(44, 34, 26, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
ul.jump-sections > li {
  margin: 0;
}
.readings-jump-list a.jump-section-link {
  font-size: 0.82rem;
  padding: 0.14rem 0.5rem;
  line-height: 1.25;
}
.jump-gods {
  list-style: none;
  margin: 0.12rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  font-size: 0.78rem;
  line-height: 1.2;
}
.jump-gods > li {
  margin: 0;
  padding: 0;
}
.readings-jump-list .jump-gods a {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: rgba(44, 34, 26, 0.3);
  text-underline-offset: 0.12em;
}
.readings-jump-table td.jump-beside {
  padding-top: 0.75rem;
  font-size: 0.88rem;
}
.readings-jump-table tfoot td.jump-beside a {
  font-weight: 600;
}
html[data-theme="dark"] ul.jump-sections {
  border-left-color: rgba(243, 230, 212, 0.18);
}
html[data-theme="dark"] .readings-jump-list .jump-gods a {
  background: none;
  text-decoration-color: rgba(243, 230, 212, 0.35);
}

/* Gods page: the eight-direction table at the top of the quarters section */
.compass-wrap {
  margin: 0.8rem 0 1.2rem;
  padding: 0.7rem 0.9rem 0.6rem;
  background: var(--bg-alt, #faf7f2);
  border: 1px solid var(--border, #e5dec9);
  border-radius: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
table.compass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.45;
}
table.compass-table th,
table.compass-table td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(44, 34, 26, 0.14);
}
table.compass-table th {
  font-weight: 650;
  color: #6c5443;
}
table.compass-table td:first-child {
  white-space: nowrap;
}
table.compass-table a {
  font-weight: 650;
}
.compass-source {
  margin: 0.6rem 0 0.1rem;
  font-size: 0.84rem;
  line-height: 1.55;
}
html[data-theme="dark"] .compass-wrap {
  background: #1f1a15;
  border-color: #3d332a;
}
html[data-theme="dark"] table.compass-table th,
html[data-theme="dark"] table.compass-table td {
  border-bottom-color: rgba(243, 230, 212, 0.16);
}
html[data-theme="dark"] table.compass-table th {
  color: #c9b7a4;
}
@media (max-width: 640px) {
  .compass-wrap {
    padding: 0.5rem 0.55rem;
  }
  table.compass-table {
    font-size: 0.84rem;
  }
  table.compass-table th,
  table.compass-table td {
    padding: 0.35rem 0.4rem;
  }
  table.compass-table td:first-child {
    white-space: normal;
  }
}
.god-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
  margin: 0.9rem 0 1.6rem;
}
/* Gods index only: one reading column. Other shelves keep .god-grid. */
.god-grid.god-stack {
  grid-template-columns: minmax(0, 1fr);
}
.god-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 0.85rem;
  background: var(--bg-alt, #faf7f2);
  border: 1px solid var(--border, #e5dec9);
  border-radius: 10px;
  min-width: 0;
  overflow-wrap: break-word;
}
.god-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
  line-height: 1.3;
}
.god-card h3 a {
  color: inherit;
  text-decoration: none;
}
.god-card h3 a:hover,
.god-card h3 a:focus-visible {
  text-decoration: underline;
}
.god-card h3 .deva,
.god-card h3.deva {
  font-weight: 650;
}
.god-summary {
  margin: 0.1rem 0 0.7rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
p.god-summary:first-of-type {
  margin-top: 0.4rem;
}
dl.god-facts {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0 0;
  border-top: 1px solid rgba(44, 34, 26, 0.12);
  font-size: 0.86rem;
  line-height: 1.45;
}
dl.god-facts > div {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr);
  gap: 0.15rem 0.6rem;
  margin: 0 0 0.35rem;
}
dl.god-facts dt {
  font-weight: 650;
  color: #6c5443;
}
dl.god-facts dd {
  margin: 0;
}
.god-more {
  margin: auto 0 0;
  font-size: 0.9rem;
  font-weight: 650;
}
html[data-theme="dark"] .god-card {
  background: #1f1a15;
  border-color: #3d332a;
}
html[data-theme="dark"] dl.god-facts {
  border-top-color: rgba(243, 230, 212, 0.14);
}
html[data-theme="dark"] dl.god-facts dt {
  color: #c9b7a4;
}
@media (max-width: 480px) {
  dl.god-facts > div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Gods page: the ten avatars, one column, companions inside the card */
.avatar-numbering {
  margin: 0.9rem 0 1.4rem;
  padding: 0.9rem 1rem 0.5rem;
  background: var(--bg-alt, #faf7f2);
  border: 1px solid var(--border, #e5dec9);
  border-radius: 10px;
}
.avatar-numbering h3 {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}
.avatar-sources-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 0.6rem 0 0.4rem;
}
table.avatar-sources {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
}
table.avatar-sources th,
table.avatar-sources td {
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(44, 34, 26, 0.14);
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
table.avatar-sources th {
  font-weight: 650;
  color: #6c5443;
}
.avatar-row {
  display: block;
  margin: 0 0 1.3rem;
  scroll-margin-top: 4.5rem;
}
.avatar-main {
  position: relative;
  min-width: 0;
}
.avatar-main > .god-card {
  padding-left: 4.2rem;
}
.avatar-num {
  position: absolute;
  top: 0.75rem;
  left: 0.8rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 2.6rem;
  margin: 0;
  line-height: 1;
}
.avatar-num-label {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c5443;
}
.avatar-num-digit {
  margin-top: 0.15rem;
  font-size: 2.1rem;
  font-weight: 750;
  color: #8a3b12;
}
.avatar-companions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(44, 34, 26, 0.14);
}
.avatar-companions .god-card {
  height: auto;
  padding-left: 0.8rem;
}
.avatar-side-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6c5443;
}
.avatar-none {
  margin: 0;
  font-size: 0.9rem;
  font-style: italic;
  opacity: 0.8;
}
.god-card.god-mini {
  padding: 0.6rem 0.8rem 0.55rem;
}
.god-mini h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}
.god-role {
  font-size: 0.88rem;
  line-height: 1.5;
}
p.god-role {
  margin: 0 0 0.4rem;
}
.god-mini .god-more {
  margin-top: 0.1rem;
  font-size: 0.85rem;
}
.god-chip {
  padding: 0.5rem 0.8rem;
  border: 1px dashed var(--border, #e5dec9);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.god-chip p {
  margin: 0;
}
.god-chip a {
  font-weight: 650;
}
.avatar-others {
  display: block;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(44, 34, 26, 0.14);
}
.avatar-others-title {
  margin: 0.6rem 0 0.3rem;
  font-size: 1.08rem;
}
.avatar-others-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin-top: 0.6rem;
}
html[data-theme="dark"] .avatar-numbering {
  background: #1f1a15;
  border-color: #3d332a;
}
html[data-theme="dark"] table.avatar-sources th,
html[data-theme="dark"] table.avatar-sources td,
html[data-theme="dark"] table.avatar-sources tr {
  border-bottom-color: rgba(243, 230, 212, 0.16);
}
html[data-theme="dark"] table.avatar-sources th,
html[data-theme="dark"] table.avatar-sources td::before,
html[data-theme="dark"] .avatar-num-label,
html[data-theme="dark"] .avatar-side-title {
  color: #c9b7a4;
}
html[data-theme="dark"] .avatar-num-digit {
  color: #f0b48a;
}
html[data-theme="dark"] .god-chip {
  border-color: #3d332a;
}
html[data-theme="dark"] .avatar-others,
html[data-theme="dark"] .avatar-companions {
  border-top-color: rgba(243, 230, 212, 0.16);
}
@media (max-width: 760px) {
  .avatar-main > .god-card {
    padding-left: 3.8rem;
  }
}
@media (max-width: 640px) {
  table.avatar-sources,
  table.avatar-sources thead,
  table.avatar-sources tbody,
  table.avatar-sources tr,
  table.avatar-sources th,
  table.avatar-sources td {
    display: block;
    width: auto;
  }
  table.avatar-sources thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  table.avatar-sources tr {
    margin: 0 0 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(44, 34, 26, 0.14);
  }
  table.avatar-sources td::before {
    content: attr(data-en);
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 650;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: #6c5443;
  }
  html[data-lang="ne"] table.avatar-sources td::before {
    content: attr(data-ne);
  }
}

/* The Thirty-Three Koti page */
.god-grid.koti-families {
  margin-top: 0.5rem;
}
.katha-table.koti-table th {
  width: auto;
  vertical-align: top;
}
.katha-table.koti-table td {
  vertical-align: top;
}
.koti-sources {
  font-size: 0.9rem;
  line-height: 1.5;
}
.koti-sources li {
  margin-bottom: 0.35rem;
}

/* Reading time sits under the title, not inside the door note */
.reading-time {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.78;
}

/* Tales of the Gods */
.tale-card .tale-gods,
.tale-card .tale-time {
  font-size: 0.92rem;
  line-height: 1.5;
}
.tale-card .tale-time {
  opacity: 0.8;
}
.tale-box {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid #d9cfba;
  border-left: 4px solid #b3652f;
  border-radius: 6px;
  background: #fbf6ea;
}
html[data-theme="dark"] .tale-box {
  background: #222018;
  border-color: #4a4432;
  border-left-color: #d08a52;
}
.tale-box h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.tale-box p {
  margin: 0.35rem 0;
}
.tale-box .tale-box-title {
  font-weight: 600;
}
nav.tale-chips {
  margin-top: 0.5rem;
}

/* Phone: scroll boxes (.table-wrap, etc.) stay inside the viewport — do not cap main
   at 100% here; book.css keeps the 48rem reading column via main { max-width }. */
html[data-shelf="katha"] .shell {
  min-width: 0;
}

/* Tablet: keep jump columns, but scroll inside the nav box if the table is wider than the screen */
@media (min-width: 641px) and (max-width: 960px) {
  .readings-index-sticky nav.readings-jump-nav {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .readings-jump-table.jump-weighted {
    width: max-content;
    min-width: 100%;
  }
}
