/* ──────────────────────────────────────────────────────────────
   Mandala Atlas · 坛城志
   Museum-grade visual encyclopedia stylesheet
   Lineage: Böshog Tibetan Paper + Penma & Mineral Pigments (Rimé)
   ────────────────────────────────────────────────────────────── */

:root {
  --paper: #f5f1e8;             /* Böshog 狼毒藏纸暖白 */
  --paper-2: #ebe4d5;
  --card: #fcfaf5;
  --ink: #1b1916;               /* Snag-tsha 藏墨松烟 */
  --ink-2: #48443c;
  --ink-3: #7d776a;
  --rule: rgba(27, 25, 22, 0.13);
  --rule-2: rgba(27, 25, 22, 0.065);
  --shadow-soft: 0 1px 2px rgba(27, 23, 18, 0.04), 0 12px 28px -14px rgba(27, 23, 18, 0.06);
  --shadow-hover: 0 4px 12px rgba(27, 23, 18, 0.06), 0 18px 36px -14px rgba(27, 23, 18, 0.09);

  /* Four Himalayan Mineral Pigments (Non-Sectarian Rimé Palette) */
  --accent: #982b20;            /* Penma & Derge Mineral Cinnabar-Maroon 边玛绛朱 */
  --accent-2: #7a2017;
  --accent-soft: rgba(152, 43, 32, 0.08);
  --mineral-lapis: #224469;     /* Azurite / Lapis Lazuli 青金石靛蓝 */
  --mineral-malachite: #28614c; /* Mineral Malachite 孔雀石绿 */
  --mineral-ochre: #946a21;     /* Orpiment / Antique Gold 泥金雌黄 */

  --bg: var(--paper);
  --surface: var(--card);
  --surface-2: var(--paper-2);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --line: var(--rule);
  --line-2: var(--rule-2);

  --serif: 'Newsreader', 'Noto Serif TC', 'Noto Serif SC', 'Songti SC', 'Noto Serif Tibetan', 'Kailasa', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', 'PingFang TC', 'PingFang SC', 'Hiragino Sans GB', 'Noto Serif Tibetan', 'Kailasa', sans-serif;
  --iast: 'Newsreader', Georgia, 'Times New Roman', -apple-system, serif;
  --tibetan: 'Noto Serif Tibetan', 'Kailasa', 'Microsoft Himalaya', serif;
  --devanagari: 'Noto Serif Devanagari', 'Kohinoor Devanagari', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --gutter: clamp(16px, 4.2vw, 56px);
  --max: 1220px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

html[lang='zh-CN'] {
  --serif: 'Noto Serif SC', 'Songti SC', 'Newsreader', 'Noto Serif Tibetan', 'Kailasa', serif;
}
html[lang='zh-TW'] {
  --serif: 'Noto Serif TC', 'Songti TC', 'Newsreader', 'Noto Serif Tibetan', 'Kailasa', serif;
}

html.is-night {
  --bg: #0d0f12;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --fg: #eae5da;
  --fg-2: #aca79b;
  --fg-3: #767268;
  --line: rgba(234, 229, 218, 0.13);
  --line-2: rgba(234, 229, 218, 0.06);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.28), 0 14px 30px -14px rgba(0, 0, 0, 0.42);
  --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.36), 0 20px 38px -14px rgba(0, 0, 0, 0.55);
  --accent: #d45a46;
  --accent-soft: rgba(212, 90, 70, 0.14);
  --mineral-lapis: #6ba0d6;
  --mineral-malachite: #5cb594;
  --mineral-ochre: #deb05b;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font: 16px/1.68 var(--sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.1  0 0 0 0 0.09  0 0 0 .045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
html.is-night body::before {
  opacity: 0.14;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
img,
svg {
  display: block;
  max-width: 100%;
}
::selection {
  background: var(--accent);
  color: #fff;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

[hidden] {
  display: none !important;
}

.ma-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.ma-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ── Top Navigation Bar & Mobile Sheet ──────────────────────── */
.ma-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line);
}
.ma-ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
  flex-shrink: 0;
}
.ma-progress-bar {
  display: none;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.ma-progress-bar.is-enabled {
  display: block;
}
.ma-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ma-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.ma-brand-mark {
  width: 30px;
  height: 30px;
  color: var(--fg);
}
.ma-brand-mark .is-ochre {
  stroke: var(--mineral-ochre);
}
.ma-brand-mark .is-vermilion-stroke {
  stroke: var(--accent);
}
.ma-brand-mark .is-vermilion {
  stroke: var(--accent);
  fill: var(--accent);
}
.ma-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}
.ma-brand-text strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.ma-brand-text small {
  font-size: 0.72rem;
  color: var(--fg-3);
  letter-spacing: 0.04em;
}

.ma-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}
.ma-nav a {
  font-size: 0.85rem;
  color: var(--fg-2);
  padding: 4px 2px;
  white-space: nowrap;
  border-bottom: 1.5px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.ma-nav a:hover,
.ma-nav a[aria-current='page'] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
.ma-nav-sep {
  width: 1px;
  height: 13px;
  background: var(--line);
  margin: 0 2px;
}

.ma-tools-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ma-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--fg-2);
  background: var(--surface);
  transition: border-color 0.18s, color 0.18s;
}
.ma-search-trigger:hover {
  border-color: var(--accent);
  color: var(--fg);
}
.ma-search-trigger kbd {
  font: 0.7rem/1 var(--mono);
  color: var(--fg-3);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}

.ma-locale-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.ma-locale-switch a {
  padding: 4px 9px;
  font-size: 0.76rem;
  color: var(--fg-2);
  transition: background 0.2s, color 0.2s;
}
.ma-locale-switch a[aria-current='true'] {
  background: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.ma-theme-btn,
.ma-menu-btn {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  color: var(--fg-2);
  background: var(--surface);
  font-size: 0.86rem;
}
.ma-theme-btn:hover,
.ma-menu-btn:hover {
  border-color: var(--fg-2);
  color: var(--fg);
}
.ma-menu-btn {
  display: none;
}

.ma-mobile-drawer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}
.ma-mobile-drawer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.ma-mobile-links {
  display: grid;
  gap: 4px;
}
.ma-mobile-links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-2);
}
.ma-mobile-links a:hover {
  border-color: var(--accent);
}
.ma-mobile-tib {
  font-family: var(--tibetan);
  font-size: 0.98rem;
  color: var(--accent);
}

.ma-lang-nudge {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--fg-2);
}
.ma-lang-nudge-inner {
  padding-block: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.ma-lang-nudge-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ma-lang-nudge-link {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.78rem;
  color: var(--fg);
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.ma-lang-nudge-link.is-primary-nudge,
.ma-lang-nudge-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.ma-lang-nudge-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--fg-3);
  font-size: 0.75rem;
}
.ma-lang-nudge-close:hover {
  color: var(--fg);
  background: var(--surface-2);
}

/* ── Typography & Shared Elements ───────────────────────────── */
.ma-eyebrow {
  font: 500 0.74rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 12px;
}
.ma-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3.55rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.ma-display em {
  font-style: italic;
  color: var(--fg-2);
}
html[lang^='zh'] .ma-display em {
  font-style: normal;
  color: var(--accent);
}
.ma-h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  margin: 0 0 10px;
  text-wrap: balance;
}
.ma-h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.38rem, 2.3vw, 1.85rem);
  line-height: 1.3;
  margin: 0 0 14px;
  text-wrap: balance;
}
.ma-lede {
  font-size: clamp(1.03rem, 1.35vw, 1.16rem);
  line-height: 1.72;
  color: var(--fg-2);
  max-width: 62ch;
  margin: 0 0 24px;
}
.ma-tibetan-hero {
  font-family: var(--tibetan);
  font-size: clamp(1.36rem, 2.4vw, 2.02rem);
  line-height: 1.85;
  padding-top: 4px;
  color: var(--fg);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ma-iast-inline {
  font-family: var(--iast);
  font-style: italic;
}
.ma-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.ma-seal {
  color: var(--accent);
  opacity: 0.88;
  flex-shrink: 0;
}

.ma-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--fg);
  transition: transform 0.16s var(--ease), background 0.2s, color 0.2s;
}
.ma-btn.is-primary {
  background: var(--fg);
  color: var(--bg);
}
.ma-btn.is-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ma-btn.is-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--fg);
}
.ma-btn.is-ghost:hover {
  border-color: var(--fg);
}

/* ── Homepage Hero & Interactive Mandala ────────────────────── */
.ma-hero {
  padding: clamp(22px, 3vw, 36px) 0 clamp(24px, 3.2vw, 38px);
  border-bottom: 1px solid var(--line);
}
.ma-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: center;
}
.ma-omnibox {
  width: 100%;
  max-width: 580px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin: 0 0 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  text-align: left;
  color: var(--fg-3);
  font-size: 0.9rem;
  transition: border-color 0.18s, box-shadow 0.18s, color 0.18s;
}
.ma-omnibox:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  color: var(--fg-2);
}
.ma-omnibox-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.ma-omnibox-left span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-omnibox-icon {
  color: var(--accent);
  font-size: 1.08rem;
  flex-shrink: 0;
}
.ma-omnibox kbd {
  font: 500 0.74rem/1 var(--mono);
  color: var(--fg-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 4px 7px;
  border-radius: 6px;
  flex-shrink: 0;
}
.ma-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.ma-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font: 500 0.72rem/1.4 var(--mono);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}
.ma-live-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.ma-explorer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.ma-charter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 0.78rem;
  color: var(--fg-3);
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
}
.ma-charter-strip span::before {
  content: '· ';
  color: var(--accent);
}

.ma-mandala-widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(16px, 2.2vw, 22px);
  box-shadow: var(--shadow-soft);
}
.ma-mandala-svg {
  width: 100%;
  max-width: 288px;
  margin: 0 auto;
  color: var(--fg);
}
.ma-m-layer {
  transition: opacity 0.28s var(--ease);
}
.ma-mandala-widget.has-selection .ma-m-layer:not(.is-active) {
  opacity: 0.22;
}
.ma-mandala-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.ma-ring-btn {
  text-align: left;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--fg-2);
  background: var(--bg);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ma-ring-btn.is-active,
.ma-ring-btn:hover {
  border-color: var(--accent);
  color: var(--fg);
  background: var(--accent-soft);
}
.ma-mandala-caption {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.54;
  color: var(--fg-2);
  min-height: 2.6em;
}

.ma-hero-plates-wrap {
  margin-top: clamp(18px, 2.4vw, 24px);
  padding-top: clamp(14px, 2vw, 18px);
  border-top: 1px solid var(--line-2);
}
.ma-hero-plates-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.ma-hero-plates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ma-hero-plate-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 11px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ma-hero-plate-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.ma-hero-plate-thumb {
  width: 56px;
  height: 56px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.ma-hero-plate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.ma-hero-plate-card:hover .ma-hero-plate-thumb img {
  transform: scale(1.06);
}
.ma-hero-plate-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ma-hero-plate-tib {
  font-family: var(--tibetan);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-hero-plate-meta strong {
  font-family: var(--serif);
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-hero-plate-meta small {
  font-size: 0.74rem;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Sections, Studio Strip & Entry Cards ───────────────────── */
.ma-section {
  padding: clamp(40px, 5.5vw, 68px) 0;
  border-bottom: 1px solid var(--line);
}
.ma-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ma-studios-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.ma-studios-grid.is-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ma-studios-grid.is-cols-3 .ma-studio-card {
  padding: 22px;
}
.ma-studios-grid.is-cols-3 .ma-mini-syllables {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ma-studio-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s, box-shadow 0.2s var(--ease);
}
.ma-studio-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow-hover);
}
.ma-studio-card h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  margin: 6px 0 8px;
}
.ma-studio-card h3 a {
  transition: color 0.18s;
}
.ma-studio-card h3 a:hover {
  color: var(--accent);
}
.ma-studio-card p {
  margin: 0 0 14px;
  font-size: 0.89rem;
  color: var(--fg-2);
  line-height: 1.56;
}
.ma-studio-preview {
  margin-bottom: 16px;
}
.ma-studio-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ma-swatch-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-size: 0.79rem;
}
.ma-chip.is-accent-chip {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 5px 12px;
}
.ma-chip.is-accent-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.ma-mini-syllables {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}
.ma-mini-syl-btn {
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  transition: border-color 0.18s, background 0.18s, transform 0.14s var(--ease);
}
.ma-mini-syl-btn:hover,
.ma-mini-syl-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.ma-mini-syl-tib {
  font-family: var(--tibetan);
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--fg);
}
.ma-mini-syl-iast {
  font: 600 0.72rem/1.2 var(--iast);
  color: var(--fg-2);
}
.ma-mini-syl-out {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg);
  border-left: 2.5px solid var(--accent);
}
.ma-mini-syl-out strong {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 2px;
}
.ma-mini-syl-out p {
  margin: 0 !important;
  font-size: 0.81rem !important;
  line-height: 1.48 !important;
  color: var(--fg-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ma-cal-live-box {
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
}
.ma-cal-live-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 5px;
}
.ma-cal-live-label {
  font: 500 0.72rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.ma-cal-live-row strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}
.ma-cal-live-sub {
  margin: 0 !important;
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  color: var(--fg-2);
}
.ma-lexicon-specimen {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 11px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: 0.82rem;
  color: var(--fg-2);
}
.ma-lex-tib {
  font-family: var(--tibetan);
  font-size: 1.16rem;
  line-height: 1.5;
  color: var(--accent);
}
.ma-lexicon-specimen code {
  font: 500 0.77rem/1.3 var(--mono);
  color: var(--fg);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
}
.ma-lexicon-specimen em {
  font-family: var(--iast);
  font-style: italic;
  color: var(--fg);
}
.ma-studio-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  margin-top: auto;
}
.ma-studio-cta {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--accent);
}
.ma-studio-cta:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ma-pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.ma-pillar-tile {
  padding: 20px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ma-pillar-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.ma-pillar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.ma-pillar-tib {
  font-family: var(--tibetan);
  font-size: 1.28rem;
  line-height: 1.65;
  color: var(--accent);
  margin: 2px 0 0;
}
.ma-pillar-tile h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  margin: 2px 0;
}
.ma-pillar-tile p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--fg-2);
  line-height: 1.55;
}

.ma-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}
.ma-hero-grid > *,
.ma-hero-plates > *,
.ma-mini-syllables > *,
.ma-article-layout > *,
.ma-cal-wrap > *,
.ma-studios-grid > *,
.ma-pillars-grid > *,
.ma-cards-grid > *,
.ma-glossary-grid > *,
.ma-faq-list > *,
.ma-mobile-drawer-inner > * {
  min-width: 0;
}
.ma-entry-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ma-entry-card.has-media {
  padding: 0;
  overflow: hidden;
  justify-content: flex-start;
}
.ma-entry-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.ma-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line-2);
  flex-shrink: 0;
}
.ma-card-media.is-portrait-43 {
  aspect-ratio: 4 / 3;
}
.ma-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -1px 0 rgba(28, 25, 20, 0.05);
  pointer-events: none;
}
.ma-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.54s var(--ease);
}
.ma-entry-card:hover .ma-card-media img {
  transform: scale(1.036);
}
.ma-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ma-finder-emblem-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ma-finder-emblem-row .ma-deity-emblem {
  width: 42px;
  height: 42px;
}
.ma-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 5px;
  font: 500 0.72rem/1.3 var(--mono);
  letter-spacing: 0.03em;
  color: var(--fg-3);
  min-width: 0;
}
.ma-card-pillar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ma-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(28, 25, 20, 0.22);
}
.ma-chip .ma-color-dot {
  margin-right: 6px;
  vertical-align: -1px;
}
.ma-color-dot.is-white { background: #fbfaf6; border-color: rgba(27, 25, 22, 0.35); }
.ma-color-dot.is-green { background: #28614c; }
.ma-color-dot.is-blue { background: #224469; }
.ma-color-dot.is-gold { background: #a87a28; }
.ma-color-dot.is-crimson { background: #982b20; }

.ma-card-tib {
  font-family: var(--tibetan);
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--accent);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-entry-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  margin: 0 0 4px;
  line-height: 1.3;
}
.ma-entry-card .ma-card-sub {
  font-size: 0.82rem;
  color: var(--accent);
  margin: 0 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-entry-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--fg-2);
  line-height: 1.56;
}
.ma-entry-card .ma-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ma-card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 11px;
}
.ma-card-wylie {
  font: 400 0.72rem/1.3 var(--mono);
  color: var(--fg-3);
  margin-right: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ma-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font: 500 0.69rem/1.35 var(--mono);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg-2);
  white-space: nowrap;
}
.ma-card-tag.is-table {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}
.ma-card-tag.is-audio {
  color: var(--fg-2);
}

/* ── Breadcrumb & Entry Detail Page ─────────────────────────── */
.ma-Subhead {
  padding-top: 20px;
  padding-bottom: 0;
}
.ma-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ma-read-badge {
  font: 500 0.74rem/1 var(--mono);
  color: var(--fg-3);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ma-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.81rem;
  color: var(--fg-3);
  margin-bottom: 20px;
}
.ma-breadcrumb a:hover {
  color: var(--accent);
}

.ma-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 4.5vw, 56px);
  padding: 6px 0 64px;
  align-items: start;
}
.ma-article-head {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.ma-entry-subtitle,
.ma-prose .ma-entry-subtitle {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 1.02rem;
  line-height: 1.5;
}
.ma-copy-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
}
.ma-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.16s, background 0.16s;
}
.ma-copy-pill > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ma-copy-pill:hover,
.ma-copy-pill.is-copied,
.ma-btn.is-copied {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ma-copy-pill.is-meta {
  font: 400 0.8rem/1.4 var(--mono);
  color: var(--fg-2);
  padding: 7px 11px;
}
.ma-copy-icon {
  font-size: 0.78rem;
  color: var(--fg-3);
}
.ma-script-uchen {
  font-family: var(--tibetan);
  font-size: 1.38rem;
  line-height: 1.65;
}
.ma-tldr-box {
  position: relative;
  padding: 16px 20px 16px 23px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--line-2), var(--shadow-soft);
}
.ma-tldr-box::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  pointer-events: none;
}
.ma-tldr-tag {
  display: inline-block;
  font: 600 0.7rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}
.ma-tldr-box p {
  margin: 0 !important;
  font-size: 1.02rem !important;
  line-height: 1.72 !important;
  color: var(--fg) !important;
}

.ma-rail {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.ma-infobox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2.5px solid var(--accent);
  border-radius: 10px;
  padding: 20px;
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px var(--line-2), var(--shadow-soft);
}
.ma-infobox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.ma-deity-emblem {
  width: 68px;
  height: 68px;
}
.ma-infobox dl {
  margin: 0;
  display: grid;
  gap: 12px;
}
.ma-infobox dt {
  font: 500 0.72rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 3px;
}
.ma-infobox dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--fg);
}
.ma-cue-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent-soft);
  border-left: 2.5px solid var(--accent);
  font-size: 0.84rem;
  line-height: 1.55;
}

.ma-prose section {
  margin-bottom: 34px;
}
.ma-anchor-sec {
  scroll-margin-top: 86px;
}
.ma-prose h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.44rem;
  margin: 0 0 12px;
  line-height: 1.32;
}
.ma-prose p {
  margin: 0 0 16px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--fg);
  max-width: 68ch;
}
.ma-prose strong,
.ma-tldr-box strong,
.ma-card-desc strong,
.ma-glossary-card p strong,
.ma-faq-item p strong,
.ma-practice-box strong,
.ma-cue-box strong,
.ma-table td strong {
  font-weight: 700;
  color: var(--fg);
}
.ma-prose code,
.ma-glossary-card code {
  font: 500 0.88em/1.4 var(--mono);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--fg);
}

/* Sticky Right-Rail TOC with Live ScrollSpy */
.ma-toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.ma-toc-label {
  font: 600 0.71rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-3);
}
.ma-toc-links {
  display: grid;
  gap: 3px;
}
.ma-toc-links a {
  display: block;
  font-size: 0.83rem;
  line-height: 1.42;
  color: var(--fg-2);
  padding: 4px 0 4px 10px;
  border-left: 2px solid var(--line-2);
  transition: color 0.16s, border-color 0.16s;
}
.ma-toc-links a:hover,
.ma-toc-links a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Museum Reference & Comparison Tables */
.ma-table-wrap {
  margin: 18px 0 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.ma-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: left;
}
.ma-table caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px 10px;
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--fg-2);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.ma-table th,
.ma-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.ma-table thead th {
  font: 600 0.73rem/1.35 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-2);
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.ma-table tbody th[scope='row'] {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--fg);
  min-width: 132px;
}
.ma-table tbody tr:last-child th,
.ma-table tbody tr:last-child td {
  border-bottom: 0;
}
.ma-table tbody tr:hover {
  background: var(--accent-soft);
}

/* Parallel Passages (Heart Sutra & Dedication Verses) */
.ma-passages {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.ma-passage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}
.ma-passage-classical {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--fg);
  margin: 0 0 8px;
}
.ma-passage-en {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.97rem;
  color: var(--fg-2);
  margin: 0 0 10px;
}
.ma-passage-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.88rem;
  color: var(--fg-2);
}

/* Curated CC0 / Public-Domain Museum Plates inside Entries */
.ma-plate {
  margin: 0 0 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.ma-plate-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: clamp(18px, 3vw, 32px);
  background: radial-gradient(
    circle at 50% 42%,
    color-mix(in srgb, var(--surface-2) 52%, var(--surface)),
    var(--surface-2)
  );
  cursor: zoom-in;
  overflow: hidden;
}
html.is-night .ma-plate-stage {
  background: radial-gradient(circle at 50% 42%, #1d2129, #12151a);
}
.ma-plate-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 480px;
  border-radius: 3px;
  box-shadow:
    0 2px 6px rgba(18, 15, 11, 0.12),
    0 18px 40px -12px rgba(18, 15, 11, 0.24);
  transition: transform 0.38s var(--ease);
}
.ma-plate-stage:hover img {
  transform: scale(1.012);
}
.ma-plate-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font: 500 0.72rem/1.2 var(--mono);
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--fg-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.ma-plate-stage:hover .ma-plate-zoom {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}
.ma-plate-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.ma-plate-credit {
  min-width: 0;
  flex: 1 1 280px;
}
.ma-plate-title {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--fg);
}
.ma-plate-title strong {
  font-family: var(--serif);
  font-weight: 600;
}
.ma-plate-period {
  color: var(--fg-2);
  font-size: 0.84rem;
}
.ma-plate-sub {
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--fg-3);
  margin-top: 2px;
}
.ma-plate-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ma-license-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font: 500 0.69rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  color: var(--mineral-malachite);
  background: color-mix(in srgb, var(--mineral-malachite) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--mineral-malachite) 28%, transparent);
}
.ma-plate-source-link {
  font: 500 0.76rem/1.3 var(--mono);
  color: var(--accent);
  white-space: nowrap;
}
.ma-plate-source-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Diagram Exhibits inside Entries */
.ma-exhibit {
  margin: 0 0 32px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.ma-exhibit-eyebrow {
  font: 500 0.73rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}
.ma-diagram-svg {
  width: 100%;
  height: auto;
  color: var(--fg);
}
.ma-svg-label {
  font: 600 10.5px var(--mono);
  letter-spacing: 0.08em;
  fill: currentColor;
}
.ma-svg-note {
  font: 400 11px var(--sans);
  fill: var(--fg-2);
}

.ma-lungta-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.ma-flag-card {
  padding: 12px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--flag-color);
  border-radius: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ma-flag-card.is-active,
.ma-flag-card:hover {
  border-color: var(--flag-color);
  background: var(--surface-2);
}
.ma-flag-card strong {
  font-size: 0.86rem;
}
.ma-flag-card small {
  font-size: 0.75rem;
  color: var(--fg-2);
}

.ma-symbols-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ma-symbol-card {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  text-align: center;
}
.ma-symbol-card svg {
  width: 54px;
  height: 54px;
  margin: 0 auto 6px;
  color: var(--fg);
}
.ma-symbol-tib {
  font-family: var(--tibetan);
  font-size: 0.92rem;
  color: var(--accent);
}
.ma-symbol-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  margin: 2px 0 4px;
}
.ma-symbol-card p {
  font-size: 0.78rem !important;
  line-height: 1.45 !important;
  color: var(--fg-2) !important;
  margin: 0 !important;
}

.ma-lineage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.ma-lineage-col {
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ma-era {
  display: block;
  font: 500 0.7rem/1.3 var(--mono);
  color: var(--accent);
  margin-bottom: 6px;
}
.ma-lineage-col h4 {
  font-family: var(--serif);
  margin: 0 0 6px;
  font-size: 1rem;
}
.ma-lineage-col p {
  font-size: 0.82rem !important;
  line-height: 1.5 !important;
  color: var(--fg-2) !important;
  margin: 0 !important;
}

/* ── Interactive Mantra Syllable Studio ─────────────────────── */
.ma-mantra-box {
  margin: 0 0 32px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}
.ma-mantra-box-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ma-mantra-head-text {
  min-width: 0;
  flex: 1 1 260px;
}
.ma-mantra-orthography {
  font-size: 0.86rem;
  color: var(--fg-2);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ma-mantra-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ma-syllable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.ma-syllable-btn {
  flex: 1 1 92px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.14s var(--ease), border-color 0.2s, background 0.2s;
}
.ma-syllable-btn:hover,
.ma-syllable-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.ma-syl-tib {
  font-family: var(--tibetan);
  font-size: 1.48rem;
  line-height: 1.62;
  padding-top: 2px;
}
.ma-syl-iast {
  font-family: var(--iast);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.ma-syl-pron {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--fg-3);
}
.ma-syllable-detail {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
}
.ma-syllable-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.ma-syllable-detail strong {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0;
}
.ma-syl-wylie-pill {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--fg-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}
.ma-syllable-detail p {
  margin: 0 !important;
  font-size: 0.93rem !important;
  line-height: 1.6 !important;
}
.ma-syl-phonology {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 0.84rem !important;
  color: var(--fg-2);
}
.ma-lineage-chant-bar {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.83rem;
}
.ma-lineage-chant-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ma-lineage-chant-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--fg-1);
}
.ma-lineage-chant-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.ma-lineage-chant-link:hover {
  text-decoration: underline;
}
.ma-lineage-chant-note {
  margin: 0;
  color: var(--fg-3);
  font-size: 0.8rem;
  line-height: 1.52;
}

/* Practice & FAQ & Sources */
.ma-practice-box {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 32px;
}
.ma-faq-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.ma-faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 18px;
}
.ma-faq-item summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.96rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ma-faq-item summary::-webkit-details-marker {
  display: none;
}
.ma-faq-item summary::after {
  content: '+';
  font-family: var(--mono);
  color: var(--accent);
}
.ma-faq-item[open] summary::after {
  content: '−';
}
.ma-faq-item p {
  margin: 10px 0 0 !important;
  font-size: 0.92rem !important;
  color: var(--fg-2) !important;
}

.ma-sources-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--fg-2);
  display: grid;
  gap: 6px;
}
.ma-sources-list a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Studio 1: Iconography Finder ───────────────────────────── */
.ma-filter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.ma-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ma-filter-label {
  font: 500 0.75rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  min-width: 118px;
}
.ma-chip {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.83rem;
  background: var(--bg);
  color: var(--fg-2);
  transition: all 0.16s;
}
.ma-chip.is-active,
.ma-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
  font-weight: 500;
}

.ma-empty-state {
  padding: 32px 24px;
  margin-bottom: 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--fg-2);
  font-size: 0.94rem;
}
.ma-today-btn {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font: 500 0.73rem/1.4 var(--mono);
  color: var(--accent);
}
.ma-today-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ma-cal-cell.is-today {
  border-color: var(--fg);
}
.ma-today-dot {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font: 600 0.6rem/1.3 var(--sans);
  vertical-align: 1px;
}

/* ── Studio 3: Tibetan Auspicious Calendar ──────────────────── */
.ma-cal-wrap {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}
.ma-cal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.ma-cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ma-cal-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  display: block;
}
.ma-cal-submeta {
  font: 500 0.74rem/1.4 var(--mono);
  color: var(--fg-3);
  margin-top: 2px;
}
.ma-cal-weekdays,
.ma-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.ma-cal-weekdays span {
  text-align: center;
  font: 500 0.72rem/1.8 var(--mono);
  color: var(--fg-3);
}
.ma-cal-cell {
  min-height: 72px;
  padding: 7px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.ma-cal-cell:hover:not(.is-empty) {
  border-color: var(--fg-3);
}
.ma-cal-cell.is-empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.ma-cal-cell.is-auspicious {
  border-color: var(--cell-accent, var(--accent));
  background: color-mix(in srgb, var(--cell-accent, var(--accent)) 7%, var(--bg));
}
.ma-cal-cell.is-festival {
  border-width: 1.5px;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, var(--bg));
}
.ma-cal-cell.is-selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ma-cal-solar {
  font: 500 0.82rem/1 var(--mono);
}
.ma-cal-lunar {
  font-size: 0.68rem;
  color: var(--fg-3);
  text-align: right;
  line-height: 1.15;
}
.ma-cal-badge {
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--cell-accent, var(--accent));
  line-height: 1.2;
}
.ma-cal-day-detail {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.ma-cal-day-detail strong {
  color: var(--fg);
  font-family: var(--serif);
}

/* ── Five-Script Reference Lexicon (/glossary) ──────────────── */
.ma-glossary-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.ma-glossary-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.ma-glossary-input {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 1rem;
}
.ma-glossary-input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.ma-glossary-sec {
  margin-bottom: 42px;
}
.ma-glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.ma-glossary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ma-glossary-card:target,
.ma-glossary-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}
.ma-glossary-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.ma-glossary-head h3 {
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 600;
  margin: 0;
}
.ma-glossary-tib {
  font-family: var(--tibetan);
  font-size: 1.24rem;
  line-height: 1.65;
  color: var(--accent);
  flex-shrink: 0;
}
.ma-glossary-scripts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font: 400 0.76rem/1.45 var(--mono);
  color: var(--fg-3);
  margin-bottom: 8px;
}
.ma-glossary-scripts span + span::before {
  content: '· ';
  opacity: 0.55;
  margin-right: 4px;
}
.ma-glossary-card p {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.62;
  color: var(--fg-2);
}
.ma-glossary-link {
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--accent);
  padding-top: 8px;
  border-top: 1px dashed var(--line-2);
}
.ma-glossary-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Search Modal (Cmd+K / /) ───────────────────────────────── */
.ma-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 16, 18, 0.5);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: start center;
  padding: 9vh 16px 24px;
}
.ma-search-dialog {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.26);
}
.ma-search-input-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.ma-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 1rem;
  outline: none;
}
.ma-kbd-btn {
  font: 500 0.72rem/1 var(--mono);
  color: var(--fg-3);
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.ma-search-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.ma-search-quick-label {
  font: 500 0.72rem/1 var(--mono);
  color: var(--fg-3);
  margin-right: 2px;
}
.ma-search-quick a {
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--fg-2);
  transition: border-color 0.15s, color 0.15s;
}
.ma-search-quick a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ma-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px;
}
.ma-search-hit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
}
.ma-search-hit:hover,
.ma-search-hit.is-selected {
  background: var(--accent-soft);
}
.ma-search-hit strong {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 500;
}
.ma-search-badge {
  font: 500 0.68rem/1.3 var(--mono);
  color: var(--fg-3);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.ma-search-hit small {
  display: block;
  color: var(--fg-2);
  font-size: 0.79rem;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-search-tib {
  font-family: var(--tibetan);
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--accent);
  flex-shrink: 0;
}
.ma-search-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 9px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
  font: 400 0.73rem/1.3 var(--mono);
  color: var(--fg-3);
}
.ma-search-footer kbd {
  display: inline-block;
  padding: 1px 5px;
  margin-right: 2px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

/* ── Museum Darkroom Lightbox Modal ─────────────────────────── */
.ma-modal-backdrop.is-darkroom {
  background: rgba(11, 12, 15, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
}
.ma-lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 1040px;
  background: #14161b;
  color: #f0ece2;
  border: 1px solid rgba(240, 236, 226, 0.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
  display: flex;
  flex-direction: column;
}
.ma-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  font: 500 0.74rem/1.2 var(--mono);
  color: #eae5da;
  background: rgba(20, 22, 27, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(240, 236, 226, 0.22);
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.ma-lightbox-close:hover {
  border-color: #d95b40;
  background: rgba(217, 91, 64, 0.24);
  color: #fff;
}
.ma-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.2vw, 36px);
  background: radial-gradient(circle at 50% 45%, #1d2028, #0f1115);
  min-height: 280px;
  cursor: zoom-out;
}
.ma-lightbox-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  border-radius: 3px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  cursor: default;
}
.ma-lightbox-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid rgba(240, 236, 226, 0.12);
  background: #14161b;
}
.ma-lightbox-meta strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 500;
  color: #f4f0e6;
}
.ma-lightbox-meta p {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: #a7a194;
}
.ma-lightbox-link {
  font: 500 0.78rem/1.3 var(--mono);
  color: #eb785e;
  white-space: nowrap;
}
.ma-lightbox-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.ma-footer {
  margin-top: auto;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--fg-2);
}
.ma-footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.ma-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.ma-footer-links a:hover {
  color: var(--accent);
}
.ma-footer-colophon {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  font-size: 0.78rem;
  color: var(--fg-3);
}
.ma-colophon-tib {
  font-family: var(--tibetan);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--accent);
  opacity: 0.9;
}
.ma-colophon-text {
  font-family: var(--serif);
  color: var(--fg-2);
  line-height: 1.55;
}
.ma-colophon-card {
  margin-top: 38px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2.5px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}
.ma-colophon-card-tib {
  font-family: var(--tibetan);
  font-size: 1.24rem;
  line-height: 1.8;
  color: var(--accent);
  margin: 0 0 4px;
}
.ma-colophon-card-wylie {
  font: 400 0.75rem/1.4 var(--mono);
  color: var(--fg-3);
  margin: 0 0 12px;
}
.ma-colophon-card-body {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--fg-2);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .ma-nav {
    display: none;
  }
  .ma-menu-btn {
    display: inline-grid;
  }
}

@media (max-width: 1140px) {
  .ma-hero-plates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .ma-hero-grid,
  .ma-article-layout,
  .ma-cal-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .ma-rail {
    position: static;
    max-height: none;
  }
  .ma-toc {
    display: none;
  }
  .ma-pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ma-symbols-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ma-studios-grid.is-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  /* 1. Compact, balanced mobile header & drawer */
  .ma-header-inner {
    padding: 10px var(--gutter);
    gap: 8px;
  }
  .ma-brand {
    gap: 8px;
    min-width: 0;
  }
  .ma-brand-mark {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
  }
  .ma-brand-text strong {
    font-size: 0.98rem;
    white-space: nowrap;
  }
  .ma-brand-text small {
    display: none;
  }
  .ma-tools-bar {
    gap: 6px;
  }
  .ma-search-trigger-label,
  .ma-search-trigger kbd {
    display: none;
  }
  .ma-search-trigger,
  .ma-theme-btn,
  .ma-menu-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    gap: 0;
  }
  .ma-locale-switch a {
    padding: 6px 8px;
    font-size: 0.73rem;
    line-height: 1.15;
  }
  .ma-mobile-drawer {
    max-height: calc(100dvh - 55px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .ma-mobile-drawer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 16px var(--gutter) 22px;
  }
  .ma-mobile-links a {
    min-height: 44px;
    padding: 9px 12px;
  }

  /* 2. Homepage Hero proportions & Mandala jewel box */
  .ma-hero {
    padding: 22px 0 28px;
  }
  .ma-hero-grid {
    gap: 22px;
  }
  .ma-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
  }
  .ma-display {
    font-size: clamp(1.78rem, 7.2vw, 2.25rem);
    line-height: 1.18;
    margin-bottom: 12px;
  }
  .ma-lede {
    font-size: 0.95rem;
    line-height: 1.64;
    margin-bottom: 16px;
  }
  .ma-omnibox {
    max-width: 100%;
    padding: 11px 14px;
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  .ma-omnibox kbd {
    display: none;
  }
  .ma-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }
  .ma-hero-actions .ma-btn {
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.84rem;
    white-space: nowrap;
  }
  .ma-hero-actions .ma-btn.is-primary {
    grid-column: 1 / -1;
    padding: 11px 16px;
    font-size: 0.9rem;
  }
  .ma-charter-strip {
    font-size: 0.74rem;
    gap: 6px 14px;
    padding-top: 12px;
  }
  .ma-mandala-widget {
    padding: 16px;
  }
  .ma-mandala-svg {
    max-width: 220px;
  }
  .ma-mandala-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 14px;
  }
  .ma-ring-btn {
    padding: 7px 9px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ma-mandala-caption {
    font-size: 0.8rem;
    min-height: 0;
    margin-top: 10px;
  }
  .ma-hero-plates-wrap {
    margin-top: 20px;
    padding-top: 16px;
  }
  .ma-hero-plates-head {
    margin-bottom: 10px;
  }
  .ma-hero-plates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ma-hero-plate-card {
    padding: 7px 8px 7px 7px;
    gap: 8px;
  }
  .ma-hero-plate-thumb {
    width: 44px;
    height: 44px;
  }
  .ma-hero-plate-tib {
    font-size: 0.82rem;
  }
  .ma-hero-plate-meta strong {
    font-size: 0.84rem;
  }
  .ma-hero-plate-meta small {
    font-size: 0.68rem;
  }
  .ma-mini-syllables {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* 3. Sections, studios, swipeable explorer tabs & cards */
  .ma-section {
    padding: 32px 0;
  }
  .ma-section-head {
    margin-bottom: 18px;
    gap: 10px;
  }
  .ma-studios-grid,
  .ma-studios-grid.is-cols-3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .ma-studio-card,
  .ma-studios-grid.is-cols-3 .ma-studio-card {
    padding: 18px;
  }
  .ma-studio-card h3 {
    font-size: 1.12rem;
    margin: 4px 0 6px;
  }
  .ma-studio-card p {
    font-size: 0.87rem;
    margin-bottom: 12px;
  }
  .ma-explorer-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    padding-bottom: 4px;
    margin-bottom: 16px;
  }
  .ma-explorer-tabs::-webkit-scrollbar {
    display: none;
  }
  .ma-explorer-tabs .ma-chip {
    flex-shrink: 0;
  }
  .ma-cards-grid {
    gap: 14px;
  }
  .ma-card-body {
    padding: 14px 16px 16px;
  }
  .ma-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .ma-pillars-grid .ma-pillar-tile:last-child {
    grid-column: 1 / -1;
  }
  .ma-pillar-tile {
    padding: 14px 15px;
  }

  /* 4. Entry detail, museum plates, panoramic diagrams, mantra box & tables */
  .ma-h1 {
    font-size: clamp(1.56rem, 6.4vw, 2rem);
    line-height: 1.24;
  }
  .ma-article-layout {
    gap: 28px;
    padding-bottom: 44px;
  }
  .ma-article-head {
    padding-bottom: 18px;
    margin-bottom: 22px;
  }
  .ma-script-uchen {
    font-size: 1.18rem;
  }
  .ma-plate {
    margin-bottom: 24px;
  }
  .ma-plate-stage {
    padding: 14px;
  }
  .ma-plate-stage img {
    max-height: 330px;
  }
  .ma-plate-caption {
    padding: 12px 14px;
    gap: 8px 12px;
  }
  .ma-plate-credit {
    flex: 1 1 100%;
  }
  .ma-exhibit {
    padding: 16px 14px;
    margin-bottom: 24px;
  }
  .ma-diagram-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-inline: -4px;
    padding-inline: 4px;
  }
  .ma-diagram-scroll .ma-diagram-svg {
    min-width: 480px;
  }
  .ma-lungta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ma-lungta-strip .ma-flag-card:last-child {
    grid-column: 1 / -1;
  }
  .ma-symbols-grid {
    gap: 10px;
  }
  .ma-symbol-card {
    padding: 12px 10px;
  }
  .ma-mantra-box {
    padding: 16px;
    margin-bottom: 24px;
  }
  .ma-mantra-box-top {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ma-mantra-head-text {
    flex: none;
  }
  .ma-mantra-actions {
    width: 100%;
  }
  .ma-mantra-actions .ma-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.83rem;
  }
  .ma-syllable-row {
    gap: 8px;
  }
  .ma-syllable-btn {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 82px;
    padding: 10px 6px;
  }
  .ma-syl-tib {
    font-size: 1.3rem;
  }
  .ma-table th,
  .ma-table td {
    padding: 8px 11px;
    font-size: 0.82rem;
  }
  .ma-table tbody th[scope='row'] {
    min-width: 104px;
  }

  /* 5. Finder, Tibetan Calendar 7-col grid, Glossary, Modals & Footer */
  .ma-filter-panel {
    padding: 16px;
    gap: 14px;
  }
  .ma-filter-label {
    width: 100%;
    min-width: 0;
    margin-bottom: 2px;
  }
  .ma-chip {
    padding: 6px 11px;
    font-size: 0.8rem;
  }
  [data-export-ics] {
    width: 100%;
    justify-content: center;
  }
  .ma-cal-card {
    padding: 14px 12px;
  }
  .ma-cal-toolbar {
    gap: 8px;
  }
  .ma-cal-toolbar [data-cal-prev],
  .ma-cal-toolbar [data-cal-next] {
    width: 38px;
    height: 38px;
    padding: 0 !important;
    justify-content: center;
    flex-shrink: 0;
  }
  .ma-cal-title {
    font-size: 1.08rem;
  }
  .ma-cal-submeta {
    font-size: 0.68rem;
    line-height: 1.35;
  }
  .ma-cal-weekdays,
  .ma-cal-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }
  .ma-cal-cell {
    min-height: 56px;
    padding: 5px 4px;
    border-radius: 6px;
    min-width: 0;
    overflow: hidden;
  }
  .ma-cal-cell > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 1px !important;
  }
  .ma-cal-solar {
    font-size: 0.76rem;
  }
  .ma-today-dot {
    width: 5px;
    height: 5px;
    padding: 0;
    font-size: 0;
    vertical-align: middle;
    background: var(--accent);
  }
  .ma-cal-lunar {
    font-size: 0.56rem;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .ma-cal-badge {
    font-size: 0.55rem;
    line-height: 1.15;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ma-glossary-bar {
    padding: 14px 16px;
  }
  .ma-modal-backdrop {
    padding: 12px;
  }
  .ma-search-input-row {
    padding: 12px 14px;
  }
  .ma-search-results {
    max-height: 52dvh;
  }
  .ma-search-footer span:nth-child(1),
  .ma-search-footer span:nth-child(2) {
    display: none;
  }
  .ma-modal-backdrop.is-darkroom {
    padding: 10px;
  }
  .ma-lightbox-stage {
    padding: 44px 12px 14px;
    min-height: 220px;
  }
  .ma-lightbox-stage img {
    max-height: 62dvh;
  }
  .ma-lightbox-meta {
    padding: 12px 14px;
    gap: 8px;
  }
  .ma-footer {
    padding: 30px 0 38px;
  }
  .ma-footer-links {
    gap: 12px 16px;
  }
}

@media (max-width: 359px) {
  .ma-locale-switch a {
    padding: 5px 6px;
    font-size: 0.68rem;
  }
  .ma-brand-text strong {
    font-size: 0.9rem;
  }
}

/* ── Phase 2 Studios, Inline Glossary Popovers & Calm IA ────── */
.ma-studio-subnav {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 2px 0 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}
.ma-studio-subnav .ma-chip {
  flex-shrink: 0;
  padding: 5px 11px;
  font-size: 0.81rem;
  line-height: 1.3;
  border-color: var(--line-2);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--fg-2);
}
.ma-studio-subnav .ma-chip:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--fg);
}
.ma-studio-subnav .ma-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fcfaf5;
  font-weight: 600;
}

.ma-labs-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.ma-lab-tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--mineral-ochre);
  border-radius: 6px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.ma-lab-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.ma-lab-tile strong {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.35;
}
.ma-lab-tile small {
  font-size: 0.8rem;
  color: var(--fg-3);
  line-height: 1.45;
}

.ma-inline-studio-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--mineral-ochre);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--fg-2);
}

/* 84000-style Inline Five-Script Glossary Terms & Popover */
.ma-term-ref {
  display: inline;
  font: inherit;
  color: inherit;
  border-bottom: 1.5px dotted var(--mineral-ochre);
  padding: 0 1px;
  border-radius: 2px;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.ma-term-ref:hover,
.ma-term-ref:focus-visible,
.ma-term-ref.is-open {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.ma-term-popover {
  position: fixed;
  z-index: 80;
  width: min(360px, calc(100vw - 24px));
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
}
.ma-term-popover-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}
.ma-term-popover-tib {
  font-family: var(--tibetan);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--accent);
}
.ma-term-popover-title {
  font-family: var(--serif);
  font-size: 1rem;
  display: block;
}
.ma-term-popover-close {
  font-size: 0.85rem;
  color: var(--fg-3);
  padding: 2px 6px;
}
.ma-term-popover-meta {
  font-size: 0.8rem;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.ma-term-popover-meta code {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
}
.ma-term-popover-def {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.ma-term-popover-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
}

/* Studio 03: Thangka Hotspot Anatomy */
.ma-anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}
.ma-anatomy-stage {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #141210;
}
.ma-anatomy-stage img {
  width: 100%;
  height: auto;
}
.ma-hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(27, 25, 22, 0.86);
  color: #fcfaf5;
  border: 2px solid #deb05b;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}
.ma-hotspot-pin:hover,
.ma-hotspot-pin.is-active {
  background: var(--accent);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.16);
  z-index: 3;
}
.ma-anatomy-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 16px;
}
.ma-anatomy-step {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.ma-anatomy-step.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.ma-anatomy-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ma-anatomy-step.is-active .ma-anatomy-step-num {
  background: var(--accent);
  color: #fff;
}
.ma-anatomy-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
}

/* Studio 02: Look-Alike Deity Disambiguator */
.ma-diff-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}
.ma-diff-group {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.ma-diff-head {
  margin-bottom: 18px;
}
.ma-diff-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.ma-diff-cards.is-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ma-diff-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.ma-diff-dl {
  margin: 8px 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.ma-diff-dl dt {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.ma-diff-dl dd {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--fg-2);
  line-height: 1.5;
}

/* Studio 06: Tibetan Script & Phonetics Decoder */
.ma-slot-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.ma-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  background: var(--surface);
}
.ma-slot-pill small {
  font-size: 0.72rem;
  opacity: 0.78;
}
.ma-slot-pill.is-prefix {
  border-left: 3px solid var(--mineral-lapis);
}
.ma-slot-pill.is-super {
  border-left: 3px solid var(--mineral-ochre);
}
.ma-slot-pill.is-root {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.ma-slot-pill.is-sub {
  border-left: 3px solid var(--mineral-malachite);
}
.ma-slot-pill.is-vowel {
  border-left: 3px solid var(--fg-2);
}
.ma-slot-pill.is-suffix {
  border-left: 3px solid var(--fg-3);
}
.ma-script-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 16px;
}
.ma-syllable-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.ma-syl-anatomy-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ma-syl-anatomy-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.ma-slot-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ma-live-decoder-box {
  padding: 20px 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 24px;
}
.ma-live-decoder-head {
  margin-bottom: 12px;
}
.ma-live-decoder-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}
.ma-live-decoder-input {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  font-family: var(--mono), var(--tibetan);
  font-size: 1rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.ma-live-decoder-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.ma-try-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
}
.ma-try-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-3);
  margin-right: 2px;
}
.ma-tone-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}
@media (max-width: 640px) {
  .ma-live-decoder-box {
    padding: 16px 14px;
  }
  .ma-live-decoder-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Studio 08: Tibetan Thangka Sacred Himalayan Geography Map */
.ma-geo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
[data-geo-toggle-styles][aria-pressed='true'] {
  background: var(--accent);
  color: #fcfaf5;
  border-color: var(--accent);
}
.ma-geo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.ma-thangka-map-stage {
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  background: #182d46;
}
.ma-geo-svg.ma-thangka-map {
  width: 100%;
  min-width: 760px;
  height: auto;
  display: block;
  border: 0;
  border-radius: 8px;
}
.ma-geo-pin {
  cursor: pointer;
  outline: none;
  transition: opacity 0.2s var(--ease);
}
.ma-geo-pin-halo {
  fill: rgba(214, 167, 74, 0.22);
  transition: fill 0.18s var(--ease);
}
.ma-geo-pin-ring {
  fill: rgba(252, 249, 242, 0.95);
  stroke: #b98a32;
  stroke-width: 1.5;
  transition: stroke 0.18s var(--ease), fill 0.18s var(--ease);
}
.ma-geo-pin:hover .ma-geo-pin-halo,
.ma-geo-pin:focus-visible .ma-geo-pin-halo,
.ma-geo-pin.is-active .ma-geo-pin-halo {
  fill: rgba(152, 43, 32, 0.36);
}
.ma-geo-pin:hover .ma-geo-pin-ring,
.ma-geo-pin:focus-visible .ma-geo-pin-ring,
.ma-geo-pin.is-active .ma-geo-pin-ring {
  stroke: #982b20;
  stroke-width: 2.3;
  fill: #fffaf0;
}
.ma-geo-tag-bg {
  fill: rgba(252, 249, 242, 0.95);
  stroke: #946a21;
  stroke-width: 0.95;
  transition: fill 0.16s var(--ease), stroke 0.16s var(--ease);
}
.ma-geo-tag-text {
  fill: #221e19;
  font-family: var(--serif);
  font-size: 9.8px;
  font-weight: 600;
  transition: fill 0.16s var(--ease);
}
.ma-geo-pin:hover .ma-geo-tag-bg,
.ma-geo-pin:focus-visible .ma-geo-tag-bg,
.ma-geo-pin.is-active .ma-geo-tag-bg {
  fill: #982b20;
  stroke: #f2cf78;
  stroke-width: 1.25;
}
.ma-geo-pin:hover .ma-geo-tag-text,
.ma-geo-pin:focus-visible .ma-geo-tag-text,
.ma-geo-pin.is-active .ma-geo-tag-text {
  fill: #fcfaf5;
}
.ma-geo-quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ma-geo-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.83rem;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease), opacity 0.16s var(--ease);
}
.ma-geo-quick-pill:hover {
  border-color: var(--mineral-ochre);
}
.ma-geo-quick-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.ma-geo-quick-num {
  font-family: var(--mono);
  font-size: 0.73rem;
  color: var(--fg-3);
}
.ma-geo-quick-pill.is-active .ma-geo-quick-num {
  color: var(--accent);
}
.ma-geo-dossier {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: center;
}
.ma-geo-dossier-head {
  padding-right: 18px;
  border-right: 1px solid var(--line-2);
}

/* Studio 04: Five Wisdoms Wheel & Traditional Shrine Spatial Diagram */
.ma-wisdom-stage {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ma-wisdom-bija {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  font-family: var(--tibetan);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ma-wisdom-transform {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ma-wisdom-box {
  flex: 1 1 200px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.ma-wisdom-box.is-awakened {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ma-wisdom-box small {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-3);
}
.ma-wisdom-arrow {
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--accent);
}

.ma-shrine-diagram {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.ma-shrine-upper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--mineral-ochre);
  text-align: center;
}
.ma-shrine-support {
  padding: 12px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ma-shrine-support.is-center {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ma-shrine-support small {
  font-size: 0.76rem;
  color: var(--fg-3);
}
.ma-shrine-bowls {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.ma-bowl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-align: center;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.ma-bowl-btn.is-active,
.ma-bowl-btn:hover {
  border-color: var(--mineral-ochre);
  background: var(--accent-soft);
}
.ma-bowl-rim {
  width: 34px;
  height: 15px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #6ba0d6 0%, #224469 45%, #946a21 48%, #deb05b 100%);
  border: 1px solid var(--mineral-ochre);
}
.ma-shrine-readout {
  padding: 16px 18px;
  border-radius: 6px;
  background: var(--surface-2);
  border-left: 3px solid var(--mineral-lapis);
}

@media (max-width: 980px) {
  .ma-labs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ma-anatomy-grid,
  .ma-geo-dossier,
  .ma-diff-cards.is-cols-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .ma-geo-dossier-head {
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line-2);
  }
}

@media (max-width: 720px) {
  .ma-labs-strip,
  .ma-diff-cards,
  .ma-shrine-upper {
    grid-template-columns: minmax(0, 1fr);
  }
  .ma-shrine-bowls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ma-wisdom-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Authentic Tibetan Neural Audio Controls (Penma Mineral Styling) ── */
.ma-ico-speaker {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.ma-btn.is-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.ma-btn.is-audio:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
.ma-copy-pill.is-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.ma-copy-pill.is-audio-pill:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
.ma-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.74rem/1.35 var(--sans);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease), transform 0.14s var(--ease);
}
.ma-audio-pill:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
}
.ma-glossary-tib-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.ma-audio-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease), transform 0.14s var(--ease);
}
.ma-audio-icon-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  transform: scale(1.04);
}
.ma-term-popover-tib-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
[data-play-tibetan-phrase].is-playing,
[data-play-tibetan-syl].is-playing {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fcfaf5 !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.ma-syl-anatomy-card.is-speaking {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

/* ── Studio 07: Interactive Sacred Pantheon & Five-Family Mandala Graph ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Unified 7-Studio Page Shell & Compact Museum Masthead (Zero Cross-Tab Shift) */
.ma-studio-page {
  --max: 1280px;
  padding-top: 12px;
  padding-bottom: 64px;
}
.ma-studio-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ma-studio-masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
}
.ma-studio-title-col {
  min-width: 0;
  flex: 1 1 420px;
}
.ma-studio-kicker {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 3px;
  font: 600 0.74rem/1.3 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}
.ma-studio-kicker-tib {
  font-family: var(--tibetan);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent);
}
.ma-studio-h1 {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: clamp(1.42rem, 2.15vw, 1.82rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-wrap: balance;
}
.ma-studio-sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--fg-2);
  max-width: 78ch;
}
.ma-studio-head-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ma-studio-stat-seal {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--mineral-ochre);
  font: 500 0.79rem/1.25 var(--sans);
  color: var(--fg-2);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}
.ma-studio-stat-seal strong {
  font: 600 0.9rem/1 var(--mono);
  color: var(--accent);
}

.ma-pantheon-notes-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 84px;
}
.ma-pantheon-notes-heading {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
}
.ma-pantheon-guardrails {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ma-pantheon-guard-card {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}
.ma-pantheon-guard-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 5px;
}
.ma-pantheon-guard-card p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.58;
  color: var(--fg-2);
}

.ma-pantheon-studio {
  gap: 10px;
}
.ma-pantheon-note-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.ma-pantheon-note-link:hover {
  opacity: 0.82;
}

.ma-pantheon-nav-group {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.ma-pantheon-mode-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  gap: 3px;
  flex-shrink: 0;
}
.ma-pantheon-mode-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.ma-pantheon-mode-tib {
  font-family: var(--tibetan);
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.72;
}
.ma-pantheon-mode-btn strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
}
.ma-pantheon-mode-btn.is-active {
  background: var(--surface);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 1px 3px rgba(27, 23, 18, 0.08);
}
.ma-pantheon-mode-btn.is-active .ma-pantheon-mode-tib {
  opacity: 1;
  color: var(--accent);
}
.ma-pantheon-mode-btn.is-active strong {
  color: var(--fg);
}
.ma-pantheon-mode-btn.is-gilt-tab.is-active {
  background: linear-gradient(135deg, #16243d, #0f192c);
  border-color: rgba(224, 180, 92, 0.72);
  box-shadow: 0 2px 8px rgba(14, 22, 38, 0.25);
}
.ma-pantheon-mode-btn.is-gilt-tab.is-active .ma-pantheon-mode-tib {
  color: #f4d284;
}
.ma-pantheon-mode-btn.is-gilt-tab.is-active strong {
  color: #fcf7eb;
}

.ma-pantheon-studio .ma-studio-masthead {
  position: relative;
  z-index: 35;
}

.ma-pantheon-finder-popover[hidden],
.ma-pantheon-finder-clear[hidden],
.ma-finder-reset-inline[hidden],
.ma-finder-group[hidden],
.ma-finder-item[hidden],
.ma-finder-empty[hidden] {
  display: none !important;
}

.ma-pantheon-finder {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 0;
}
.ma-pantheon-finder-pill {
  display: inline-flex;
  align-items: stretch;
  padding: 0;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(27, 23, 18, 0.05);
  transition:
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}
.ma-pantheon-finder-pill:hover,
.ma-pantheon-finder-pill:has(.ma-pantheon-finder-btn[aria-expanded='true']),
.ma-pantheon-finder-pill:has(.ma-pantheon-finder-btn.is-has-selection) {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
}
.ma-pantheon-finder-pill:has(.ma-pantheon-finder-btn.is-has-selection) {
  box-shadow: 0 1px 5px color-mix(in srgb, var(--accent) 15%, transparent);
}
.ma-pantheon-finder-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.ma-finder-btn-lead {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.ma-finder-mandala-ico {
  width: 15px;
  height: 15px;
  display: block;
}
.ma-finder-mini-avatar {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1.5px solid var(--fam-color, var(--accent));
  background: #1a1612;
}
.ma-finder-btn-text {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg);
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-finder-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  color: var(--accent);
  font: 600 0.69rem/1 var(--mono);
}
.ma-finder-count[lang='bo'] {
  font-family: var(--tibetan);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 1px 6px 0;
}
.ma-finder-chevron {
  width: 11px;
  height: 11px;
  color: var(--fg-3);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), color 0.18s var(--ease);
}
.ma-pantheon-finder-btn[aria-expanded='true'] .ma-finder-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}
.ma-pantheon-finder-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line-2);
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--fg-2);
  font: 600 0.96rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.16s, color 0.16s;
}
.ma-pantheon-finder-clear:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

@keyframes maFinderPopIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ma-pantheon-finder-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(444px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-top: 2.5px solid var(--accent);
  border-radius: 12px;
  box-shadow:
    0 22px 50px rgba(20, 16, 12, 0.22),
    0 2px 10px rgba(20, 16, 12, 0.08);
  overflow: hidden;
  z-index: 60;
  animation: maFinderPopIn 0.15s var(--ease);
}
.ma-finder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.ma-finder-search-ico {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.ma-finder-search-ico svg {
  width: 14px;
  height: 14px;
}
.ma-finder-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 500 0.84rem/1.35 var(--sans);
  outline: none;
  padding: 2px 0;
}
.ma-finder-input::placeholder {
  color: var(--fg-3);
  font-weight: 400;
}
.ma-finder-reset-inline {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  background: var(--surface);
  color: var(--accent);
  font: 600 0.72rem/1.3 var(--sans);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.ma-finder-reset-inline:hover {
  background: var(--accent);
  color: #fffaf2;
  border-color: var(--accent);
}
.ma-finder-body {
  max-height: min(432px, 60dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.ma-finder-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ma-finder-group-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 2px;
}
.ma-finder-roman {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  padding: 1px 5px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  color: var(--accent);
  font: 700 0.65rem/1.25 var(--mono);
  letter-spacing: 0.03em;
}
.ma-finder-group-head strong {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-2);
}
.ma-finder-group-tib {
  font-family: var(--tibetan);
  font-size: 0.78rem;
  color: var(--fg-3);
  margin-left: auto;
}
.ma-finder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.ma-finder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px 5px 6px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--surface-2) 48%, var(--surface));
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.15s var(--ease),
    background-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.ma-finder-item:hover,
.ma-finder-item.is-kbd-focus {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--fam-color, var(--accent)) 56%, var(--line));
  box-shadow: 0 2px 8px rgba(24, 19, 14, 0.08);
}
.ma-finder-item.is-selected {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: var(--accent);
  box-shadow: inset 2.5px 0 0 var(--accent);
}
.ma-finder-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--fam-color, var(--accent));
  background: #1a1612;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.ma-finder-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ma-finder-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 1px;
}
.ma-finder-name {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.22;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-finder-tib {
  font-family: var(--tibetan);
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--fg-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ma-finder-bija {
  font-family: var(--tibetan);
  font-size: 0.84rem;
  line-height: 1;
  color: var(--fam-color, var(--accent));
  opacity: 0.85;
  flex-shrink: 0;
  padding-left: 2px;
}
.ma-finder-empty {
  margin: 6px 0;
  padding: 18px 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--fg-3);
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px dashed var(--line);
}

/* Synchronized Mthing-thang Lapis & Gilt-Gold Quick-Locator in Sanctuary 3D Mode */
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-pill {
  background: linear-gradient(135deg, #16243d, #0f192c);
  border-color: rgba(224, 180, 92, 0.54);
  box-shadow: 0 2px 8px rgba(14, 22, 38, 0.22);
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-pill:hover,
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-pill:has(.ma-pantheon-finder-btn[aria-expanded='true']),
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-pill:has(.ma-pantheon-finder-btn.is-has-selection) {
  border-color: rgba(244, 210, 132, 0.85);
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-btn {
  color: #fcf7eb;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-clear {
  border-left-color: rgba(224, 180, 92, 0.26);
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-clear:hover {
  background: rgba(224, 180, 92, 0.18);
  color: #fff8ea;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-btn-lead {
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-btn-text {
  color: #fcf7eb;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-count {
  background: rgba(224, 180, 92, 0.16);
  border-color: rgba(224, 180, 92, 0.42);
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-chevron {
  color: rgba(244, 210, 132, 0.78);
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-finder-popover {
  background: linear-gradient(170deg, #13213a 0%, #0b1424 100%);
  border-color: rgba(224, 180, 92, 0.44);
  border-top-color: #e0b45c;
  box-shadow:
    0 24px 56px rgba(5, 10, 20, 0.56),
    0 2px 12px rgba(5, 10, 20, 0.35);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-head {
  background: rgba(10, 18, 34, 0.75);
  border-bottom-color: rgba(224, 180, 92, 0.24);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-search-ico {
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-input {
  color: #fcf7eb;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-input::placeholder {
  color: rgba(232, 220, 196, 0.55);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-reset-inline {
  background: rgba(224, 180, 92, 0.14);
  border-color: rgba(224, 180, 92, 0.44);
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-reset-inline:hover {
  background: #e0b45c;
  color: #0b1424;
  border-color: #e0b45c;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-roman {
  background: rgba(224, 180, 92, 0.16);
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-group-head strong {
  color: #f5ebd4;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-group-tib {
  color: rgba(244, 210, 132, 0.72);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-item {
  background: rgba(21, 36, 62, 0.72);
  border-color: rgba(224, 180, 92, 0.18);
  color: #fcf7eb;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-item:hover,
.ma-pantheon-studio.is-gilt3d-active .ma-finder-item.is-kbd-focus {
  background: rgba(31, 51, 86, 0.92);
  border-color: rgba(244, 210, 132, 0.56);
  box-shadow: 0 3px 12px rgba(4, 8, 18, 0.35);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-item.is-selected {
  background: rgba(224, 180, 92, 0.16);
  border-color: #e0b45c;
  box-shadow: inset 2.5px 0 0 #e0b45c;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-name {
  color: #fcf7eb;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-tib {
  color: rgba(235, 221, 194, 0.72);
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-bija {
  color: #f4d284;
}
.ma-pantheon-studio.is-gilt3d-active .ma-finder-empty {
  background: rgba(15, 26, 46, 0.72);
  border-color: rgba(224, 180, 92, 0.28);
  color: rgba(235, 221, 194, 0.78);
}

/* Unified Two-Axis Curatorial Filter Ledger + Directly Attached Explanation Drawer */
.ma-pantheon-ledger {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid color-mix(in srgb, var(--accent) 68%, var(--line));
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.ma-pantheon-ledger-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
}
.ma-pantheon-ledger-row.is-family-row {
  border-top: 1px dashed var(--line-2);
  background: color-mix(in srgb, var(--surface-2) 45%, var(--surface));
}
.ma-pantheon-axis-label {
  flex-shrink: 0;
  min-width: 64px;
  font: 600 0.73rem/1.2 var(--sans);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.ma-pantheon-pill-track {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}
.ma-pantheon-seal-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font: 500 0.8rem/1.3 var(--sans);
  color: var(--fg-2);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.16s var(--ease),
    color 0.16s var(--ease),
    border-color 0.16s var(--ease),
    opacity 0.16s var(--ease),
    box-shadow 0.16s var(--ease);
}
.ma-pantheon-seal-pill small {
  font: 600 0.68rem/1 var(--mono);
  color: var(--fg-3);
  opacity: 0.88;
}
.ma-pantheon-seal-pill:hover {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--fg);
}
/* Default panoramic "All" pills stay calm ink-neutral so active filters stand out unmistakably */
.ma-pantheon-seal-pill[data-pantheon-constellation='all'].is-active,
.ma-pantheon-seal-pill[data-pantheon-family='all'].is-active,
.ma-pantheon-seal-pill[data-geo-region='all'].is-active,
.ma-pantheon-seal-pill[data-hall-group-btn='all'].is-active {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--fg) 22%, var(--line));
  color: var(--fg);
  font-weight: 600;
}
/* Specific active Constellation / Masterwork / Region / Gallery Group pill (Penma mineral cinnabar seal) */
.ma-pantheon-seal-pill:not([data-pantheon-constellation='all']):not([data-pantheon-family='all']):not([data-geo-region='all']):not([data-hall-group-btn='all']):not(.is-mineral).is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fcfaf5;
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(152, 43, 32, 0.24);
}
.ma-pantheon-seal-pill:not([data-pantheon-constellation='all']):not([data-pantheon-family='all']):not([data-geo-region='all']):not([data-hall-group-btn='all']):not(.is-mineral).is-active small {
  color: rgba(252, 250, 245, 0.88);
}

.ma-pantheon-graph-panel,
.ma-pantheon-gallery-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ma-pantheon-graph-panel[hidden],
.ma-pantheon-gallery-panel[hidden] {
  display: none !important;
}
.ma-gallery-ledger-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}
.ma-gallery-group-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--fg-2);
}
.ma-gallery-quick-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.ma-pantheon-gallery-grid {
  margin-top: 6px;
}
.ma-entry-card.is-jump-target {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent), var(--shadow-soft);
}
.ma-pantheon-seal-pill.is-accent-toggle {
  padding: 6px 13px;
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  color: var(--accent);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}
.ma-pantheon-seal-pill.is-accent-toggle[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fcfaf5;
}
/* Specific active Five-Buddha-Family pill (lit with its canonical mineral pigment) */
.ma-pantheon-seal-pill.is-mineral.is-active {
  background: var(--pill-color, var(--accent));
  border-color: var(--pill-color, var(--accent));
  color: #fcfaf5;
  font-weight: 600;
  box-shadow: 0 2px 7px rgba(24, 20, 15, 0.22);
}
.ma-pantheon-seal-pill.is-mineral.is-active .ma-fam-dot {
  background: #fcfaf5 !important;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35);
}
/* Cross-axis stacking cue: gently dim pills that yield 0 intersection with the other active axis */
.ma-pantheon-seal-pill.is-zero-overlap:not(.is-active) {
  opacity: 0.35;
  border-color: var(--line-2);
  border-style: dashed;
}
.ma-pantheon-seal-pill.is-zero-overlap:not(.is-active):hover {
  opacity: 0.78;
}

.ma-pantheon-ledger-drawer[hidden] {
  display: none !important;
}
.ma-pantheon-ledger-drawer:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px 10px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent) 4.2%, var(--surface-2));
}
.ma-ledger-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.ma-ledger-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ma-ledger-kicker {
  font: 600 0.72rem/1.2 var(--sans);
  color: var(--fg-3);
  letter-spacing: 0.03em;
}
.ma-ledger-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8.5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent);
  font: 600 0.76rem/1.35 var(--sans);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.ma-ledger-chip.is-fam {
  border-color: color-mix(in srgb, var(--pill-color, var(--accent)) 52%, var(--line));
  color: var(--fg);
}
.ma-ledger-chip:hover {
  background: var(--accent-soft);
}
.ma-ledger-join {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.71rem/1.25 var(--mono);
}
.ma-ledger-count {
  font: 600 0.74rem/1.2 var(--mono);
  color: var(--fg-2);
  margin-left: 2px;
}
.ma-ledger-desc {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--fg-2);
}
.ma-ledger-desc p {
  margin: 0;
  flex: 1 1 280px;
}
.ma-ledger-desc.is-empty {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.ma-ledger-recovery {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ma-pantheon-reset-link {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 0.75rem/1.25 var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.ma-pantheon-reset-link:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.ma-fam-dot {
  display: inline-block;
  width: 8.5px;
  height: 8.5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ma-pantheon-summary-tib {
  font-family: var(--tibetan);
  font-size: 0.96rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.ma-pantheon-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 396px;
  gap: 18px;
  align-items: start;
}
.ma-pantheon-canvas-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ma-pantheon-viewport {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 46%, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.ma-pantheon-viewport.is-dragging {
  cursor: grabbing;
}
.ma-pantheon-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ma-pantheon-stage {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.ma-pantheon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.ma-pantheon-band-rect {
  fill: var(--surface);
  fill-opacity: 0.72;
  stroke: var(--line);
  stroke-width: 1.1;
}
.ma-pantheon-band-kicker {
  font: 600 12.5px/1 var(--sans);
  letter-spacing: 0.04em;
  fill: var(--accent);
}
.ma-pantheon-band-tib {
  font-family: var(--tibetan);
  font-size: 14.5px;
  letter-spacing: 0;
  fill: var(--fg-2);
}

.ma-mandala-ring-outer {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 8 5;
}
.ma-mandala-ring-lotus {
  fill: var(--surface);
  fill-opacity: 0.36;
  stroke: #946a21;
  stroke-opacity: 0.38;
  stroke-width: 1.5;
}
.ma-mandala-palace-wall {
  fill: var(--surface);
  fill-opacity: 0.56;
  stroke: var(--fg);
  stroke-opacity: 0.35;
  stroke-width: 2.2;
}
.ma-mandala-ring-tathagata {
  fill: var(--surface);
  fill-opacity: 0.62;
  stroke: #946a21;
  stroke-opacity: 0.55;
  stroke-width: 1.6;
}
.ma-mandala-ring-bindu {
  fill: color-mix(in srgb, var(--accent) 6%, var(--surface));
  stroke: var(--accent);
  stroke-opacity: 0.52;
  stroke-width: 1.8;
}
.ma-mandala-gate-label {
  font: 600 13.5px/1.2 var(--mono);
  letter-spacing: 0.05em;
}
.ma-mandala-gate-label tspan {
  font-family: var(--tibetan);
  font-size: 17px;
  letter-spacing: 0;
}
.ma-mandala-gate-sub {
  font: 500 12px/1.2 var(--sans);
}
.ma-mandala-compass-note {
  font: 400 12.5px/1.3 var(--sans);
  fill: var(--fg-2);
}

.ma-pantheon-edge {
  fill: none;
  stroke-width: 1.85;
  stroke-opacity: 0.42;
  transition: stroke-opacity 0.22s var(--ease), stroke-width 0.22s var(--ease);
}
.ma-pantheon-edge.is-active-edge {
  stroke-width: 3.1;
  stroke-opacity: 0.96;
}
.ma-pantheon-edge.is-dimmed {
  stroke-opacity: 0.07;
}

.ma-pantheon-nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ma-pantheon-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
  transition:
    left 0.54s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.54s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s var(--ease),
    transform 0.2s var(--ease);
}
.ma-pantheon-node:hover {
  z-index: 6;
  transform: translate(-50%, -50%) scale(1.07);
}
.ma-pantheon-portrait {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--fam-color, var(--accent));
  box-shadow: 0 5px 14px rgba(20, 17, 12, 0.18), 0 0 0 2px var(--surface);
  overflow: visible;
  display: block;
}
.ma-pantheon-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.ma-pantheon-node-bija {
  position: absolute;
  right: -5px;
  bottom: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--fam-color, var(--accent));
  color: var(--fam-color, var(--accent));
  font: 600 12px/19px var(--tibetan);
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
}
.ma-pantheon-node-label {
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  color: var(--fg);
  font: 600 12.2px/1.35 var(--sans);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}
.ma-pantheon-node.is-selected {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.11);
}
.ma-pantheon-node.is-selected .ma-pantheon-portrait {
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 6px var(--fam-color, var(--accent)),
    0 10px 24px rgba(152, 43, 32, 0.28);
}
.ma-pantheon-node.is-selected .ma-pantheon-node-label {
  background: var(--fam-color, var(--accent));
  border-color: var(--fam-color, var(--accent));
  color: #fcfaf5;
}
.ma-pantheon-node.is-neighbor {
  z-index: 5;
}
.ma-pantheon-node.is-neighbor .ma-pantheon-portrait {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px color-mix(in srgb, var(--fam-color, var(--accent)) 68%, transparent),
    0 6px 16px rgba(20, 17, 12, 0.22);
}
.ma-pantheon-node.is-neighbor .ma-pantheon-node-label {
  border-color: var(--fam-color, var(--accent));
}
.ma-pantheon-node.is-dimmed {
  opacity: 0.2;
}
.ma-pantheon-node.is-dimmed:hover {
  opacity: 0.88;
}

/* ── 3D Blos-bslangs Modes: Scheme A (Tsashog Ortho SVG) & Scheme B (Mthing-thang Gilt Sanctuary) ── */
.ma-pantheon-gilt-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}
.ma-pantheon-gilt-canvas[hidden] {
  display: none !important;
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-stage {
  z-index: 2;
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-node {
  left: 0 !important;
  top: 0 !important;
  gap: 4px;
  transition: opacity 0.2s var(--ease) !important;
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-node:hover {
  z-index: 260 !important;
  opacity: 1 !important;
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-portrait {
  width: 52px;
  height: 52px;
  border-width: 2.5px;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s;
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-node:hover .ma-pantheon-portrait {
  transform: scale(1.15);
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-node-bija {
  right: -4px;
  bottom: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 3.5px;
  font: 600 11.2px/17px var(--tibetan);
}
.ma-pantheon-viewport.is-3d-mode .ma-pantheon-node-label {
  padding: 1.5px 7px;
  font: 600 11.2px/1.3 var(--sans);
  transform-origin: center top;
}
.ma-pantheon-viewport.is-ortho3d .ma-pantheon-edge:not(.is-active-edge):not(.is-inspector-edge):not(.is-dimmed) {
  stroke-opacity: 0.17;
  stroke-width: 1.3;
}
.ma-pantheon-viewport.is-ortho3d .ma-pantheon-edge.is-inspector-edge {
  stroke-opacity: 0.68;
  stroke-width: 2.15;
}

/* Scheme A: Derge Tsashog Architectural Thig-rtsa Linework */
.ma-ortho-vajra-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.8;
  stroke-dasharray: 7 5;
}
.ma-ortho-lotus-petals {
  fill: none;
  stroke: #946a21;
  stroke-opacity: 0.45;
  stroke-width: 1.35;
}
.ma-ortho-terrace-disc {
  fill: var(--surface);
  fill-opacity: 0.42;
  stroke: #946a21;
  stroke-opacity: 0.44;
  stroke-width: 1.4;
}
.ma-ortho-terrace-disc.is-base {
  fill-opacity: 0.34;
}
.ma-ortho-terrace-disc.is-upper {
  fill-opacity: 0.56;
  stroke-opacity: 0.58;
}
.ma-ortho-terrace-disc.is-bindu {
  fill: color-mix(in srgb, var(--accent) 8%, var(--surface));
  fill-opacity: 0.72;
  stroke: var(--accent);
  stroke-opacity: 0.62;
  stroke-width: 1.75;
}
.ma-ortho-palace-parapet {
  fill: none;
  stroke: var(--fg);
  stroke-opacity: 0.42;
  stroke-width: 2.1;
}
.ma-ortho-srog-shing {
  stroke: var(--accent);
  stroke-opacity: 0.58;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}
.ma-ortho-gate-txt {
  font: 600 12px/1.2 var(--sans);
}
.ma-ortho-gate-txt tspan {
  font-family: var(--tibetan);
  font-size: 14.5px;
}

/* Scheme B: Royal Mthing-thang Lapis-Azurite & Burnished-Gold Sanctuary */
.ma-pantheon-viewport.is-gilt3d {
  background: #0b1322;
  border-color: rgba(216, 172, 86, 0.52);
  box-shadow: 0 12px 34px rgba(10, 15, 26, 0.32);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-portrait {
  background: #101a2d;
  border: 2.5px solid var(--fam-color, #d8aa52);
  box-shadow:
    0 0 0 1.5px rgba(244, 208, 128, 0.78),
    0 8px 20px rgba(4, 8, 16, 0.65);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-node.is-selected .ma-pantheon-portrait {
  box-shadow:
    0 0 0 2.5px #fae2a0,
    0 0 0 5.5px var(--fam-color, #982b20),
    0 0 28px rgba(246, 206, 118, 0.56);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-node.is-neighbor .ma-pantheon-portrait {
  box-shadow:
    0 0 0 2px #f2cf82,
    0 0 0 4px color-mix(in srgb, var(--fam-color, #d8aa52) 72%, transparent),
    0 6px 18px rgba(4, 8, 16, 0.6);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-node-bija {
  background: #10192b;
  border-color: #e4b966;
  color: #f8de9c;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-node-label {
  background: rgba(12, 20, 35, 0.88);
  border-color: rgba(226, 184, 98, 0.44);
  color: #f6efe0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-node.is-selected .ma-pantheon-node-label {
  background: linear-gradient(135deg, #982b20, #782017);
  border-color: #f6d88e;
  color: #fffaf0;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-canvas-hud {
  background: rgba(13, 22, 38, 0.84);
  border-color: rgba(226, 184, 98, 0.4);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-hud-btn {
  color: #efe6d4;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-hud-btn:hover {
  background: rgba(244, 208, 128, 0.16);
  color: #fae09e;
}

/* Floating 3D Camera Presets & Clockwise Kora Bar */
.ma-pantheon-3d-bar[hidden] {
  display: none !important;
}
.ma-pantheon-3d-bar {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 14;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.ma-pantheon-3d-presets {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(20, 16, 12, 0.12);
  pointer-events: auto;
}
.ma-pantheon-3d-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-2);
  font: 600 0.74rem/1 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s, color 0.16s, border-color 0.16s;
}
.ma-pantheon-3d-btn [lang='bo'] {
  font-family: var(--tibetan);
  font-size: 0.82rem;
  opacity: 0.82;
}
.ma-pantheon-3d-btn:hover {
  background: var(--surface-2);
  color: var(--fg);
}
.ma-pantheon-3d-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fcfaf5;
}
.ma-pantheon-3d-btn.is-active [lang='bo'] {
  opacity: 1;
  color: #fcfaf5;
}
.ma-pantheon-3d-btn.is-kora.is-active {
  background: color-mix(in srgb, #946a21 16%, var(--surface));
  border-color: rgba(148, 106, 33, 0.5);
  color: #7e5816;
}
html.is-night .ma-pantheon-3d-btn.is-kora.is-active {
  color: #edd089;
}
.ma-pantheon-3d-sep {
  width: 1px;
  height: 15px;
  background: var(--line);
  margin: 0 2px;
}
.ma-pantheon-3d-medium {
  padding: 4px 11px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font: 600 0.71rem/1.3 var(--sans);
  color: var(--fg-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-presets,
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-medium {
  background: rgba(12, 20, 36, 0.84);
  border-color: rgba(226, 184, 98, 0.42);
  color: #efe6d4;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-btn {
  color: rgba(242, 232, 212, 0.82);
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-btn:hover {
  background: rgba(244, 208, 128, 0.14);
  color: #fff8e8;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-btn.is-active {
  background: linear-gradient(135deg, #c99738, #9c6f1d);
  border-color: #f7dc96;
  color: #0e1626;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-btn.is-active [lang='bo'] {
  color: #0e1626;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-btn.is-kora.is-active {
  background: rgba(152, 43, 32, 0.72);
  border-color: rgba(246, 212, 132, 0.68);
  color: #fff6e4;
}
.ma-pantheon-viewport.is-gilt3d .ma-pantheon-3d-sep {
  background: rgba(226, 184, 98, 0.32);
}

.ma-pantheon-canvas-hud {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(20, 16, 12, 0.12);
}
.ma-pantheon-hud-btn {
  height: 27px;
  min-width: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font: 600 0.84rem/1 var(--mono);
  color: var(--fg-2);
  cursor: pointer;
  transition: background-color 0.16s, color 0.16s;
}
.ma-pantheon-hud-btn.is-text {
  font: 500 0.74rem/1 var(--sans);
}
.ma-pantheon-hud-btn:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.ma-pantheon-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.77rem;
  color: var(--fg-2);
  transition: background-color 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease);
}
.ma-pantheon-legend-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.ma-pantheon-legend-item {
  --rel-swatch: var(--rel-swatch-day);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ma-pantheon-legend-tip {
  font: 500 0.73rem/1.3 var(--sans);
  color: var(--fg-3);
  white-space: nowrap;
}

/* Mthing-thang Sanctuary 3D Legend Adaptation: Lapis-Azurite Plaque + Bespoke Mineral-on-Lapis Ray Swatches */
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend {
  background: linear-gradient(180deg, #101b30, #0a1221);
  border-color: rgba(226, 182, 94, 0.48);
  color: rgba(242, 233, 214, 0.88);
  box-shadow: 0 6px 18px rgba(8, 14, 26, 0.22);
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend strong {
  color: #fff8ea;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-tip {
  color: rgba(238, 198, 114, 0.88);
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-kula-crown {
  --rel-swatch: #f4c96b;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-compassion-ushnisha {
  --rel-swatch: #4ad4a3;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-wrathful-manifestation {
  --rel-swatch: #f26649;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-consort-triad {
  --rel-swatch: #70baff;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-consort-triad .ma-rel-swatch-line {
  stroke-dasharray: 7 4.2 !important;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-lineage-transmission {
  --rel-swatch: #eadcc4;
}
.ma-pantheon-studio.is-gilt3d-active .ma-pantheon-legend-item.is-rel-lineage-transmission .ma-rel-swatch-line {
  stroke-dasharray: 1.5 5.2 !important;
  stroke-linecap: round;
  stroke-width: 3;
}

/* Sticky Side Inspector (Full-Bleed Museum Plate Hero) */
.ma-pantheon-inspector {
  position: sticky;
  top: 78px;
  max-height: calc(100dvh - 96px);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 0;
}
.ma-pantheon-inspector-inner {
  display: flex;
  flex-direction: column;
}
.ma-pantheon-hero-frame {
  position: relative;
  width: 100%;
  flex-shrink: 0;
}
.ma-pantheon-hero-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(410px, 45dvh);
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #1a1612;
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
}
.ma-pantheon-hero-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}
.ma-pantheon-hero-stage:hover img {
  transform: scale(1.03);
}
.ma-pantheon-hero-frame.is-loupe .ma-pantheon-hero-stage img {
  transform: scale(2.15);
}
.ma-pantheon-hero-frame.is-loupe .ma-pantheon-hero-stage:hover img {
  transform: scale(2.22);
}
.ma-pantheon-hero-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 28px 66px 9px 13px;
  background: linear-gradient(to top, rgba(16, 13, 10, 0.82), rgba(16, 13, 10, 0.34) 56%, transparent);
  color: #f8f4ec;
  pointer-events: none;
}
.ma-pantheon-hero-credit {
  font: 500 0.72rem/1.3 var(--sans);
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ma-pantheon-hero-zoom {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(248, 244, 236, 0.16);
  border: 1px solid rgba(248, 244, 236, 0.32);
  font: 600 0.67rem/1.35 var(--sans);
  color: #fcfaf5;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ma-pantheon-loupe-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(248, 244, 236, 0.38);
  background: rgba(22, 18, 14, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fcfaf5;
  font: 600 0.69rem/1.3 var(--sans);
  cursor: pointer;
  transition: background-color 0.16s, border-color 0.16s, transform 0.16s;
}
.ma-pantheon-loupe-btn:hover {
  background: rgba(152, 43, 32, 0.88);
  border-color: rgba(252, 250, 245, 0.65);
}
.ma-pantheon-loupe-btn.is-active {
  background: var(--accent);
  border-color: #fcfaf5;
  color: #fcfaf5;
}
.ma-pantheon-seed-seal {
  position: absolute;
  right: 14px;
  bottom: -19px;
  z-index: 4;
  min-width: 38px;
  height: 38px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fcfaf5;
  border: 2px solid var(--accent);
  color: var(--accent);
  font: 600 1.08rem/33px var(--tibetan);
  text-align: center;
  box-shadow: 0 4px 12px rgba(20, 16, 12, 0.22);
}
html.is-night .ma-pantheon-seed-seal {
  background: var(--surface-2);
}
.ma-pantheon-inspector-pad {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ma-pantheon-inspector-meta {
  min-width: 0;
}
.ma-pantheon-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
  padding-right: 44px;
}
.ma-pantheon-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  font: 600 0.69rem/1.35 var(--sans);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg-2);
}
.ma-pantheon-badge.is-family {
  border-color: color-mix(in srgb, var(--fam-color, var(--accent)) 45%, var(--line));
  color: var(--fg);
}
.ma-pantheon-badge.is-family i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fam-color, var(--accent));
}
.ma-pantheon-badge.is-secondary {
  border-style: dashed;
}
.ma-pantheon-inspector-title {
  margin: 0 0 5px;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.28;
  color: var(--fg);
}
.ma-pantheon-inspector-script {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.ma-pantheon-inspector-tib {
  font-family: var(--tibetan);
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--accent);
}
.ma-pantheon-inspector-script code {
  font: 400 0.74rem/1.3 var(--mono);
  color: var(--fg-3);
}

.ma-pantheon-note-box,
.ma-pantheon-cue-box {
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.ma-pantheon-cue-box {
  border-left: 3px solid var(--accent);
}
.ma-pantheon-note-box strong,
.ma-pantheon-cue-box strong {
  display: block;
  font: 600 0.71rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}
.ma-pantheon-note-box p,
.ma-pantheon-cue-box p {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.58;
  color: var(--fg-2);
}

.ma-pantheon-rel-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ma-pantheon-rel-heading {
  margin: 0;
  font: 600 0.73rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-3);
}
.ma-pantheon-rel-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ma-pantheon-rel-chip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s, background-color 0.16s, transform 0.16s var(--ease);
}
.ma-pantheon-rel-chip:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateX(2px);
}
.ma-pantheon-rel-avatar {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.ma-pantheon-rel-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ma-pantheon-rel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.ma-pantheon-rel-top strong {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--fg);
}
.ma-pantheon-rel-tag {
  padding: 1px 6px;
  border-radius: 999px;
  font: 600 0.65rem/1.35 var(--sans);
  color: var(--rel-color, var(--accent));
  background: color-mix(in srgb, var(--rel-color, var(--accent)) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--rel-color, var(--accent)) 35%, transparent);
  white-space: nowrap;
}
.ma-pantheon-rel-edge {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-2);
}
.ma-pantheon-rel-basis {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--fg-3);
}
.ma-pantheon-rel-tib {
  font-family: var(--tibetan);
  font-size: 0.92rem;
  color: var(--accent);
  opacity: 0.8;
  flex-shrink: 0;
}
.ma-pantheon-inspector-actions .ma-btn {
  width: 100%;
  justify-content: center;
}

.ma-pantheon-matrix-details {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ma-pantheon-matrix-details > summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--fg);
}

/* ── Deity Detail Page: Sacred Genealogy & Five-Family Mandala Section (#sec-genealogy) ── */
.ma-genealogy-box {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2.5px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ma-genealogy-coords {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.ma-genealogy-coord-cell {
  padding: 11px 13px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ma-genealogy-kicker {
  font: 600 0.69rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.ma-genealogy-coord-cell strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--serif);
  font-size: 0.94rem;
  line-height: 1.35;
  color: var(--fg);
}
.ma-genealogy-coord-cell small {
  font-size: 0.77rem;
  line-height: 1.45;
  color: var(--fg-2);
}
.ma-genealogy-note {
  margin: 0 !important;
  padding: 11px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-2));
  border-left: 3px solid var(--accent);
  font-size: 0.91rem !important;
  line-height: 1.65 !important;
  color: var(--fg-2);
}
.ma-genealogy-group h3 {
  margin: 0 0 9px !important;
  font: 600 0.76rem/1.3 var(--mono) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-3) !important;
}
.ma-genealogy-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ma-genealogy-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-decoration: none !important;
  transition: border-color 0.18s, background-color 0.18s, transform 0.18s var(--ease);
}
.ma-genealogy-card:hover {
  border-color: var(--accent);
  background: var(--surface);
  transform: translateY(-1px);
}
.ma-genealogy-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid var(--line);
}
.ma-genealogy-card-body {
  min-width: 0;
  flex: 1;
}
.ma-genealogy-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.ma-genealogy-card-top strong {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--fg);
}
.ma-genealogy-edge-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 3px;
}
.ma-genealogy-edge-basis {
  margin: 0 !important;
  font-size: 0.79rem !important;
  line-height: 1.5 !important;
  color: var(--fg-2);
}
.ma-genealogy-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 0.86rem;
  color: var(--fg-2);
}
.ma-genealogy-cta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .ma-pantheon-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .ma-pantheon-inspector {
    position: static;
    max-height: none;
  }
  .ma-pantheon-hero-stage {
    aspect-ratio: 16 / 11;
    max-height: 420px;
  }
  .ma-pantheon-guardrails {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .ma-pantheon-hero-stage {
    aspect-ratio: 1 / 1;
    max-height: 360px;
  }
  .ma-pantheon-studio .ma-studio-head-aside {
    width: 100%;
  }
  .ma-pantheon-nav-group {
    position: relative;
    width: 100%;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .ma-pantheon-mode-switch {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    padding: 3px;
    gap: 2px;
  }
  .ma-pantheon-mode-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 6px 5px;
  }
  .ma-pantheon-mode-btn strong {
    font-size: 0.8rem;
  }
  html[lang='en'] .ma-pantheon-mode-btn strong {
    font-size: 0.74rem;
  }
  .ma-pantheon-mode-tib,
  .ma-pantheon-3d-medium {
    display: none;
  }
  .ma-pantheon-3d-btn [lang='bo'] {
    display: none;
  }
  .ma-pantheon-finder {
    position: static;
    flex: 0 0 auto;
  }
  .ma-pantheon-finder-btn {
    padding: 0 9px;
    gap: 5px;
  }
  .ma-pantheon-finder-btn.is-has-selection .ma-finder-chevron {
    display: none;
  }
  .ma-finder-btn-text {
    font-size: 0.8rem;
    max-width: 64px;
  }
  html[lang='en'] .ma-finder-btn-text {
    font-size: 0.75rem;
    max-width: 56px;
  }
  .ma-finder-count {
    display: none;
  }
  .ma-pantheon-finder-clear {
    width: 24px;
  }
  .ma-pantheon-finder-popover {
    left: 0;
    right: 0;
    width: 100%;
  }
  .ma-pantheon-ledger-row {
    align-items: center;
    padding: 6px 10px;
    gap: 8px;
  }
  .ma-pantheon-axis-label {
    min-width: 54px;
    padding-top: 0;
  }
  .ma-pantheon-pill-track {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }
  .ma-pantheon-pill-track::-webkit-scrollbar {
    display: none;
  }
  .ma-pantheon-legend-tip {
    display: none;
  }
  .ma-genealogy-coords,
  .ma-genealogy-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .ma-genealogy-box {
    padding: 16px;
  }
  .ma-genealogy-cta-actions {
    width: 100%;
  }
  .ma-genealogy-cta-bar .ma-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .ma-finder-count {
    display: none;
  }
  .ma-finder-btn-text {
    max-width: 56px;
  }
  .ma-finder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Museum Gallery-Sheet Print Styles ──────────────────────── */
@media print {
  :root,
  html.is-night {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f4ef;
    --fg: #111111;
    --fg-2: #333333;
    --fg-3: #666666;
    --line: #d4d0c8;
    --line-2: #e6e2da;
    color-scheme: light;
  }
  body::before,
  .ma-header,
  .ma-modal-backdrop,
  .ma-plate-zoom,
  .ma-hero-actions,
  [data-play-sequence],
  [data-play-tibetan-phrase],
  [data-play-tibetan-syl],
  [data-export-card],
  [data-export-ics] {
    display: none !important;
  }
  .ma-article-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ma-infobox {
    position: static;
    break-inside: avoid;
  }
  .ma-plate,
  .ma-exhibit,
  .ma-passage-card,
  .ma-faq-item {
    break-inside: avoid;
  }
}
