/* ═══════════════════════════════════════════════════════
   Hymnal Adventist — Modern Design System
   ════════════════════════════════════════════════════════ */

/* ── Design tokens (light mode) ──────────────────────── */
:root {
  --primary:        #5046e4;
  --primary-hover:  #4338ca;
  --primary-light:  #ede9fd;
  --primary-text:   #3730a3;
  --accent:         #b45309;
  --gold:           #d97706;

  --bg:             #f8f7f3;
  --surface:        #ffffff;
  --surface-2:      #f2f1ed;
  --surface-3:      #e9e8e3;

  --text:           #1c1a2e;
  --text-muted:     #6b6888;
  --text-light:     #9997b0;
  --border:         #e2e1dc;
  --border-strong:  #ccc9c0;

  --refrain-bg:     #ede9fd;
  --refrain-border: #c4b5fd;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:      0 4px 12px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg:   0 8px 28px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);

  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;

  --font-ui:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-hymn:  "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-size:  18px;
  --line-height:1.85;

  --header-h:   60px;
  --max-w:      720px;
  --transition: 200ms ease;
}

/* ── Dark mode tokens ────────────────────────────────── */
[data-theme="dark"] {
  --bg:            #0d0c14;
  --surface:       #17162a;
  --surface-2:     #1e1d33;
  --surface-3:     #27263d;

  --text:          #eeedf8;
  --text-muted:    #8b89a8;
  --text-light:    #5e5c78;
  --border:        #2a2840;
  --border-strong: #3c3a58;

  --primary:       #7c72f0;
  --primary-hover: #9d95f5;
  --primary-light: #1c1a35;
  --primary-text:  #a5b4fc;

  --refrain-bg:    #1e1d33;
  --refrain-border:#3730a3;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow:    0 4px 12px rgba(0,0,0,.3);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.4);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: var(--line-height);
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ── Layout ─────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.main { padding-block: 1.5rem 4rem; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}
.site-header__inner {
  max-width: calc(var(--max-w) + 10rem);
  margin-inline: auto;
  padding-inline: 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo svg { width: 28px; height: 28px; color: var(--primary); }
.site-logo span { color: var(--text); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.site-nav__link {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.site-nav__link:hover,
.site-nav__link--active {
  background: var(--primary-light);
  color: var(--primary-text);
  text-decoration: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ── Theme toggle ────────────────────────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── Font controls ───────────────────────────────────── */
.font-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.font-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.font-btn:hover { background: var(--surface-2); color: var(--text); }
.font-btn + .font-btn { border-left: 1px solid var(--border); }
.font-btn--lg { font-size: 0.9rem; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-3); text-decoration: none; }
.btn--sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn--app {
  background: #1c1c1e;
  color: #fff;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  gap: 0.6rem;
}
.btn--app svg { width: 20px; height: 20px; }
.btn--app:hover { background: #333; text-decoration: none; }

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-light); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ── iOS App Banner ──────────────────────────────────── */
.app-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 -4px 16px rgba(0,0,0,.12);
  animation: slideUp 0.3s ease;
}
.app-banner.visible { display: flex; }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.app-banner__icon {
  width: 40px; height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  background: var(--primary-light);
}
.app-banner__text { flex: 1; font-size: 0.85rem; line-height: 1.3; }
.app-banner__text strong { display: block; }
.app-banner__close {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.app-banner__close:hover { background: var(--surface-2); }

/* ── Hymn header ─────────────────────────────────────── */
.hymn-header {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.hymn-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.2rem 0.6rem;
  background: var(--primary-light);
  color: var(--primary-text);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 100px;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}
.hymn-title {
  font-family: var(--font-hymn);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1rem;
}
.hymn-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.hymn-meta__item { display: flex; flex-direction: column; gap: 0.15rem; }
.hymn-meta dt { font-weight: 600; font-size: 0.7rem; text-transform: uppercase;
                letter-spacing: 0.08em; color: var(--text-light); }
.hymn-meta dd { color: var(--text); }

/* ── Hymn body (verses & refrains) ───────────────────── */
.hymn-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.verse, .refrain {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.verse:first-child, .refrain:first-child { border-top: none; }
.verse__label, .refrain__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
}
.refrain__label { color: var(--primary-text); }
.verse__text, .refrain__text {
  font-family: var(--font-hymn);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text);
  white-space: pre-wrap;
}
.refrain {
  background: var(--refrain-bg);
  border-left: 3px solid var(--refrain-border);
  border-bottom: 1px solid var(--border);
  border-top: none;
  border-right: none;
  padding: 1rem 1.25rem;
  margin-block: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.refrain__text { color: var(--primary-text); }

/* ── Action bar ──────────────────────────────────────── */
.action-bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block: 2rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.audio-section { display: flex; flex-direction: column; gap: 0.6rem; }
.audio-label {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
}
.audio-label svg { width: 16px; height: 16px; }
.audio-player {
  width: 100%;
  accent-color: var(--primary);
  border-radius: var(--radius-sm);
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
}
.action-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.action-btn:hover { background: var(--surface-2); text-decoration: none; }
.action-btn--pdf { color: var(--accent); border-color: currentColor; }
.action-btn--pdf:hover { background: #fef3c7; }
[data-theme="dark"] .action-btn--pdf:hover { background: #1c1400; }
.action-btn--app { color: var(--primary); border-color: var(--primary); }
.action-btn--app:hover { background: var(--primary-light); }

/* ── Hymn note ───────────────────────────────────────── */
.hymn-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hymn-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 0.15rem;
                 color: var(--primary); }
.hymn-note p { line-height: 1.5; }

/* ── Prev/Next navigation ────────────────────────────── */
.hymn-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hymn-nav__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
  line-height: 1.4;
}
.hymn-nav__link:hover { background: var(--surface); border-color: var(--primary);
                         text-decoration: none; }
.hymn-nav__link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-muted); }
.hymn-nav__link small { display: block; font-size: 0.75rem; color: var(--text-muted);
                         font-weight: 400; }
.hymn-nav__link--next { justify-content: flex-end; text-align: right; }
.hymn-nav__link--next svg { order: 2; }

/* ── Hero (landing page) ─────────────────────────────── */
.hero {
  padding-block: 4rem 3rem;
  text-align: center;
}
.hero__icon {
  margin-inline: auto;
  width: 80px; height: 80px;
  margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-hymn);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-inline: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.hero__badge svg { width: 14px; height: 14px; color: var(--primary); }
.hero__app-cta { display: flex; justify-content: center; }

/* ── Hymnals section ─────────────────────────────────── */
.hymnals-section { padding-block: 0 4rem; }
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hymnal-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .hymnal-grid { grid-template-columns: 1fr 1fr; }
}
.hymnal-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.hymnal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  text-decoration: none;
  color: var(--text);
}
.hymnal-card__icon { color: var(--primary); flex-shrink: 0; }
.hymnal-card__icon svg { width: 40px; height: 40px; }
.hymnal-card__body { flex: 1; min-width: 0; }
.hymnal-card__title { font-weight: 600; font-size: 0.925rem; line-height: 1.3; }
.hymnal-card__meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.hymnal-card__arrow { width: 16px; height: 16px; color: var(--text-light); flex-shrink: 0; }

/* ── Features section ────────────────────────────────── */
.features-section {
  padding-block: 0 4rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}
.features-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.feature-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.feature-card__icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

/* ── Hymnal index page ───────────────────────────────── */
.hymnal-page-header {
  margin-bottom: 1.5rem;
}
.hymnal-page-header h1 {
  font-family: var(--font-hymn);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
}
.hymnal-page-count { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

.page-title {
  font-family: var(--font-hymn);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ── Tabs ────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
  gap: 0;
}
.tab {
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.tab:hover { color: var(--text); }
.tab--active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Search ──────────────────────────────────────────── */
.search-box {
  position: relative;
  margin-bottom: 1rem;
}
.search-box__icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box__input {
  width: 100%;
  padding: 0.65rem 0.75rem 0.65rem 2.5rem;
  font: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box__input::placeholder { color: var(--text-light); }
.search-box__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(80, 70, 228, 0.15);
}

/* ── Hymn list ───────────────────────────────────────── */
.hymn-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.hymn-list__item { border-bottom: 1px solid var(--border); }
.hymn-list__item:last-child { border-bottom: none; }
.hymn-list__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
}
.hymn-list__link:hover { background: var(--primary-light); text-decoration: none; }
.hymn-list__number {
  min-width: 2.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-align: right;
  flex-shrink: 0;
}
.hymn-list__title { font-size: 0.9rem; }

/* ── Category list ───────────────────────────────────── */
.category-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.category-list li { border-bottom: 1px solid var(--border); }
.category-list li:last-child { border-bottom: none; }
.category-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition);
}
.category-list__link:hover { background: var(--primary-light); text-decoration: none; }
.category-list__link svg { width: 16px; height: 16px; color: var(--text-light); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.5rem;
  background: var(--surface);
  margin-top: auto;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.site-footer__inner a { color: var(--text-muted); }
.site-footer__inner a:hover { color: var(--primary); }
.site-footer nav { display: flex; gap: 1.25rem; }

/* ── Presenter overlay ───────────────────────────────── */
.presenter {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
  color: #fff;
}
.presenter[hidden] { display: none; }
.presenter__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.presenter__hymn-label {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.7;
}
.presenter__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bg-chooser { display: flex; gap: 0.4rem; }
.bg-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.bg-btn:hover, .bg-btn.active { border-color: rgba(255,255,255,.7); }
.presenter__exit {
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: background 0.15s;
}
.presenter__exit:hover { background: rgba(255,255,255,.2); }

.presenter__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}
.presenter__slide {
  max-width: 800px;
  width: 100%;
  text-align: center;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.presenter__slide-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.5;
  margin-bottom: 1.25rem;
}
.presenter__slide-text {
  font-family: var(--font-hymn);
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  line-height: 1.75;
  white-space: pre-wrap;
}
.presenter[data-bg="dark"]   { background: #1a1a2e; }
.presenter[data-bg="blue"]   { background: #0a1628; }
.presenter[data-bg="purple"] { background: #1e0a3c; }
.presenter[data-bg="warm"]   { background: #1a1211; }
.presenter[data-bg="forest"] { background: #0a1a12; }

.presenter__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.presenter__nav-btn {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: background 0.15s;
}
.presenter__nav-btn:hover { background: rgba(255,255,255,.22); }
.presenter__nav-btn svg { width: 22px; height: 22px; }
.presenter__nav-btn:disabled { opacity: 0.3; pointer-events: none; }
.presenter__progress {
  font-size: 0.875rem;
  opacity: 0.6;
  min-width: 4rem;
  text-align: center;
}

/* ── Icon button (search, etc.) ──────────────────────── */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

/* ── Search modal ────────────────────────────────────── */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}
.search-modal[hidden] { display: none !important; }

.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
}

.search-modal__box {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
}

.search-modal__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.search-modal__icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.search-modal__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-ui);
}
.search-modal__input::placeholder { color: var(--text-light); }
.search-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  display: flex;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}
.search-modal__close:hover { color: var(--text); }

.search-modal__results {
  overflow-y: auto;
  flex: 1;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background var(--transition);
}
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--surface-2); }
.search-result__number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 2rem;
  text-align: right;
  flex-shrink: 0;
}
.search-result__body { flex: 1; min-width: 0; }
.search-result__title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result__meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
.search-result__snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}
.search-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-loading {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Utilities ───────────────────────────────────────── */
.tab-panel { }
[hidden] { display: none !important; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  :root { --font-size: 16px; }
  .site-nav { display: none; }
  .hymn-nav { grid-template-columns: 1fr; }
  .hymn-nav__link--next { justify-content: flex-start; text-align: left; }
  .hero { padding-block: 2.5rem 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
