:root {
  --paper: #f5f0e7;
  --surface: #fffdf8;
  --surface-soft: #ebe5d9;
  --ink: #26312e;
  --muted: #66716d;
  --accent: #48685d;
  --accent-dark: #304b42;
  --line: #d8d0c2;
  --shadow: 0 16px 40px rgba(57, 58, 47, 0.09);
  --radius: 18px;
  --shell: min(1120px, calc(100% - 32px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.65;
}
button, input, select { font: inherit; }
a { color: var(--accent-dark); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #946d36; outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.shell { width: var(--shell); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 240, 231, 0.96);
  border-bottom: 1px solid rgba(216, 208, 194, 0.85);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; font-weight: 700; }
.brand small { color: var(--muted); font-weight: 400; margin-top: 4px; }
nav { display: flex; gap: 20px; }
nav a { text-decoration: none; font-size: 0.94rem; font-weight: 700; }

.hero { padding: 84px 0 72px; text-align: center; background: radial-gradient(circle at top, #fffdf8 0%, var(--paper) 66%); }
.hero-inner { max-width: 760px; }
.eyebrow { margin: 0 0 10px; font-family: Arial, sans-serif; color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: clamp(2.4rem, 7vw, 4.9rem); line-height: 1.02; font-weight: 500; letter-spacing: -0.035em; }
.byline { margin-bottom: 28px; color: var(--accent-dark); font-size: 1.3rem; }
.intro { max-width: 680px; margin: 0 auto 30px; color: #4f5a56; font-size: 1.12rem; }

.primary-button, .secondary-button, .listen-button, .share-button, .stop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 11px 19px;
  cursor: pointer;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-weight: 750;
}
.primary-button, .listen-button { color: white; background: var(--accent-dark); }
.primary-button:hover, .listen-button:hover { background: #233a32; }
.secondary-button, .share-button, .stop-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }

.browse-section { padding: 68px 0 78px; }
.section-heading { max-width: 800px; margin-bottom: 26px; }
h2 { margin-bottom: 10px; font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.12; font-weight: 500; }
h2 span { color: var(--muted); font-size: 0.72em; white-space: nowrap; }
.filters { display: grid; grid-template-columns: 1.05fr 1fr 1.3fr; gap: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.language-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.language-group legend, .field label { display: block; margin-bottom: 8px; font-family: Arial, sans-serif; font-size: 0.82rem; font-weight: 800; }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.language-button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: transparent; color: var(--ink); cursor: pointer; }
.language-button.active { border-color: var(--accent-dark); background: var(--accent-dark); color: white; }
.field input, .field select { width: 100%; min-height: 48px; border: 1px solid #c8c0b2; border-radius: 10px; padding: 10px 12px; background: white; color: var(--ink); }
.filter-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 28px 2px 18px; }
.results-toolbar p { margin: 0; color: var(--muted); }

.meditation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.meditation-card { display: flex; flex-direction: column; min-height: 280px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 9px 26px rgba(57, 58, 47, 0.06); }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.meta-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: var(--surface-soft); color: #47524e; font-family: Arial, sans-serif; font-size: 0.76rem; font-weight: 700; }
.meditation-card h3 { margin-bottom: 10px; font-size: 1.45rem; line-height: 1.2; font-weight: 600; }
.meditation-card p { color: #55605c; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.download-link { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 8px; font-family: Arial, sans-serif; font-weight: 750; }
.empty-state { padding: 30px; text-align: center; background: var(--surface); border-radius: var(--radius); }

.about-section { padding: 76px 0 94px; background: #e9e3d7; }
.about-grid { display: grid; grid-template-columns: 1.45fr 0.8fr; gap: 44px; align-items: start; }
.disclaimer { padding: 22px; background: rgba(255,255,255,0.62); border: 1px solid #d0c7b8; border-radius: var(--radius); }
.disclaimer h3 { margin-bottom: 8px; font-size: 1.05rem; }
.disclaimer p { margin-bottom: 0; font-size: 0.95rem; }
footer { padding: 30px 0 112px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.9rem; }

.player-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px; background: #fffdf9; border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(35, 42, 39, 0.11); }
.player-inner { width: min(1120px, 100%); margin: auto; display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(300px, 1.4fr) auto; gap: 14px; align-items: center; }
.now-playing { min-width: 0; display: flex; flex-direction: column; }
.player-label { font-family: Arial, sans-serif; color: var(--muted); font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; }
#current-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#audio-player { width: 100%; min-height: 42px; }
.stop-button { min-height: 42px; padding-inline: 14px; }

@media (max-width: 820px) {
  :root { --shell: min(100% - 24px, 720px); }
  .nav-wrap { align-items: flex-start; flex-direction: column; gap: 10px; padding: 13px 0; }
  nav { width: 100%; justify-content: space-between; gap: 8px; overflow-x: auto; }
  .hero { padding: 58px 0 52px; }
  .filters { grid-template-columns: 1fr; padding: 16px; }
  .filter-actions { grid-column: auto; }
  .meditation-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .player-inner { grid-template-columns: 1fr auto; }
  .now-playing { grid-column: 1 / -1; }
  #audio-player { grid-column: 1; }
  .stop-button { grid-column: 2; }
  footer { padding-bottom: 155px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  nav a { font-size: 0.82rem; white-space: nowrap; }
  h2 span { white-space: normal; display: block; margin-top: 6px; }
  .results-toolbar { align-items: flex-start; flex-direction: column; }
  .share-button { width: 100%; }
  .meditation-card { padding: 19px; }
  .card-actions { flex-direction: column; }
  .listen-button, .download-link { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; }
  .player-bar { padding: 9px 10px; }
  .player-inner { gap: 8px; }
}
