:root {
  --bg: #09131b;
  --surface: rgba(10, 19, 27, 0.78);
  --surface-soft: rgba(255, 248, 231, 0.07);
  --text: #f7efdc;
  --muted: #ddcba8;
  --accent: #efb347;
  --accent-deep: #d57e1f;
  --peacock: #1aa1a3;
  --border: rgba(255, 226, 177, 0.2);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Georgia", "Palatino Linotype", serif;
  background:
    radial-gradient(circle at top, rgba(40, 133, 155, 0.24), transparent 32%),
    radial-gradient(circle at right, rgba(239, 179, 71, 0.14), transparent 24%),
    linear-gradient(145deg, #03070b, #08131c 30%, #102534 70%, #081018);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 15%, rgba(51, 176, 178, 0.2), transparent 18%),
    radial-gradient(circle at 86% 12%, rgba(239, 179, 71, 0.18), transparent 14%);
}

a,
button {
  font: inherit;
}

.landing-shell,
.main-panel {
  position: relative;
  z-index: 1;
}

.landing-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1.2rem;
}

.landing-hero,
.landing-card,
.control-bar,
.player-card,
.dropdown-nav-card,
.shloka-card,
.jump-grid-wrap,
.chapter-summary-card,
.sidebar {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.landing-hero,
.chapter-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.2rem;
  border-radius: 32px;
}

.landing-hero {
  overflow: hidden;
  padding: 1.3rem;
}

.landing-copy,
.hero-copy,
.chapter-summary-head > div:first-child {
  align-self: center;
}

.landing-hero h1,
.chapter-summary-card h2 {
  margin: 0;
  line-height: 1.08;
  font-size: clamp(2.1rem, 4vw, 4rem);
}

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

.lead,
.chapter-summary,
.landing-card p,
.sidebar-subtitle,
.meaning-block p,
.word-meanings p {
  color: var(--muted);
  line-height: 1.7;
}

.landing-actions,
.top-strip,
.chapter-meta,
.preview-pills,
.verse-rail,
.chapter-rail,
.jump-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.landing-actions,
.chapter-meta {
  margin-top: 1rem;
}

.primary-link,
.secondary-link,
.chapter-chip,
.rail-link,
.jump-link,
.chapter-button,
.jump-actions button {
  border-radius: 999px;
  text-decoration: none;
}

.primary-link,
.secondary-link,
.jump-actions button,
.chapter-button {
  padding: 0.72rem 1rem;
}

.primary-link {
  color: #15110a;
  background: linear-gradient(180deg, #f5c35f, #df8c2f);
}

.secondary-link,
.jump-actions button,
.chapter-button,
.rail-link,
.jump-link,
.chapter-chip {
  color: var(--text);
  border: 1px solid rgba(239, 179, 71, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.button-link {
  cursor: pointer;
}

.landing-art,
.hero-art {
  min-height: 320px;
  position: relative;
}

.landing-art img,
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 26px;
}

.hero-art-circle {
  min-height: 0;
  width: min(320px, 74vw);
  aspect-ratio: 1;
  margin-inline: auto;
  padding: 0.8rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(239, 179, 71, 0.42), transparent 40%),
    linear-gradient(145deg, rgba(9, 78, 103, 0.96), rgba(4, 38, 59, 0.96));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28);
}

.hero-art-circle img {
  border-radius: 999px;
  object-position: center top;
  border: 4px solid rgba(239, 179, 71, 0.56);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.landing-card,
.control-bar,
.player-card,
.dropdown-nav-card,
.shloka-card,
.jump-grid-wrap,
.chapter-summary-card {
  margin-top: 1rem;
  border-radius: 28px;
  padding: 1rem 1.15rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.preview-pills span,
.chapter-meta span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 179, 71, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.native-audio {
  width: 100%;
  margin-top: 0.9rem;
}

.page-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.page-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 1.3rem 1rem 2rem;
  background: linear-gradient(180deg, rgba(6, 11, 17, 0.96), rgba(9, 20, 29, 0.88));
  transition: opacity 180ms ease, transform 180ms ease, padding 180ms ease;
}

.page-shell.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-inline: 0;
  transform: translateX(-16px);
}

.sidebar-portrait {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.sidebar-portrait-ring {
  width: 156px;
  aspect-ratio: 1;
  padding: 0.6rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(239, 179, 71, 0.5), transparent 38%),
    linear-gradient(145deg, rgba(9, 78, 103, 0.96), rgba(4, 38, 59, 0.96));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.sidebar-portrait-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 999px;
  border: 4px solid rgba(239, 179, 71, 0.5);
}

.sidebar-title {
  margin: 0;
  font-size: 1.7rem;
}

.chapter-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.chapter-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.chapter-button strong,
.chapter-button span {
  display: block;
}

.chapter-button span {
  margin-top: 0.2rem;
  color: var(--muted);
}

.chapter-button.active,
.chapter-button:hover,
.rail-link.active,
.jump-link.active {
  background: linear-gradient(135deg, rgba(26, 161, 163, 0.22), rgba(239, 179, 71, 0.18));
  border-color: rgba(239, 179, 71, 0.58);
}

.main-panel {
  padding: 0.9rem 1.2rem 1.2rem;
}

.top-strip {
  margin-bottom: 0.75rem;
}

.edge-pager {
  display: none;
}

.section-head,
.verse-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.verse-header {
  margin-bottom: 1rem;
}

.chapter-summary {
  margin-top: 0.8rem;
}

.chapter-summary-head {
  align-items: center;
  margin-bottom: 1rem;
}

.chapter-summary-art {
  min-height: 0;
}

.chapter-summary-card .chapter-summary {
  margin-top: 0.2rem;
}

.chapter-rail {
  margin-top: 0.8rem;
}

.shloka-text {
  font-size: clamp(1.38rem, 2vw, 2rem);
  line-height: 1.9;
  padding: 1.1rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.transliteration {
  margin-top: 1rem;
  font-size: 1.03rem;
  color: #f4daaa;
  line-height: 1.7;
}

.meaning-block h3 {
  margin-bottom: 0.4rem;
}

.word-meanings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.word-meanings summary {
  cursor: pointer;
  color: var(--accent);
}

.dropdown-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.dropdown-field {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
}

.dropdown-field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(239, 179, 71, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.dropdown-field option {
  color: #15110a;
}

.jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .page-shell.sidebar-collapsed .sidebar {
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    transform: translateY(-12px);
  }
}

@media (max-width: 820px) {
  .landing-hero,
  .chapter-summary-head,
  .dropdown-nav,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .main-panel,
  .landing-shell {
    padding: 0.9rem;
  }

  .section-head,
  .verse-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-art,
  .hero-art {
    min-height: 250px;
  }

  .hero-art-circle {
    width: min(280px, 72vw);
  }

  .edge-pager {
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    width: 56px;
    padding: 0;
    border: 0;
    background: linear-gradient(90deg, rgba(9, 19, 27, 0.26), transparent);
    color: rgba(247, 239, 220, 0.55);
  }

  .edge-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 72px;
    border-radius: 999px;
    background: rgba(7, 14, 20, 0.32);
    border: 1px solid rgba(239, 179, 71, 0.12);
    font-size: 1.8rem;
  }

  .edge-pager-left {
    left: 0;
    justify-content: flex-start;
    padding-left: 8px;
  }

  .edge-pager-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 8px;
    background: linear-gradient(270deg, rgba(9, 19, 27, 0.26), transparent);
  }
}
