:root {
  --bg: #ffffff;
  --surface: #faf8f6;
  --card: #f5f2ef;
  --text: #211e1e;
  --muted: #6f6a6a;
  --border: #e7e1dc;
  --accent: #b45309;
  --accent-soft: rgba(180, 83, 9, 0.1);
  --on-accent: #ffffff;
  --radius: 14px;
  --maxw: 720px;
  --font-sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(33, 30, 30, 0.05), 0 8px 24px rgba(33, 30, 30, 0.06);
}
:root[data-theme="dark"] {
  --bg: #141212;
  --surface: #1b1818;
  --card: #211e1e;
  --text: #f1ecec;
  --muted: #948e8e;
  --border: #33302e;
  --accent: #f0b36b;
  --accent-soft: rgba(240, 179, 107, 0.12);
  --on-accent: #211e1e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #141212;
    --surface: #1b1818;
    --card: #211e1e;
    --text: #f1ecec;
    --muted: #948e8e;
    --border: #33302e;
    --accent: #f0b36b;
    --accent-soft: rgba(240, 179, 107, 0.12);
    --on-accent: #211e1e;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/SpaceGrotesk_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/SpaceGrotesk_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/SpaceGrotesk_700Bold.ttf') format('truetype'); }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 0 0 10px 0; z-index: 50; }
.skip:focus { left: 0; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.3) blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.brand-logo { width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: var(--shadow); }
.brand-name { font-size: 15px; }
.brand-suffix { color: var(--muted); font-weight: 500; }
.header-app { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 999px; padding: 7px 13px; white-space: nowrap; }
.header-app:hover { background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
.theme-toggle:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: block; }
}
main { padding-block: 30px 56px; }
main:focus { outline: none; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1 { font-size: clamp(1.6rem, 5.5vw, 2.1rem); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 700; }
.lead { color: var(--muted); font-size: 1rem; margin: 0; max-width: 60ch; }
.cards { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); text-decoration: none; color: inherit; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--surface); }
.card-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.card-icon svg { width: 21px; height: 21px; }
.card-body { flex: 1; min-width: 0; }
.card-body strong { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.card-body span { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 1px; }
.card-arrow { color: var(--muted); flex: none; transition: transform 0.15s ease, color 0.15s ease; }
.card:hover .card-arrow { transform: translateX(3px); color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; text-decoration: none; color: var(--muted); margin-bottom: 16px; }
.back:hover { color: var(--accent); }
.prose p { margin: 0 0 15px; max-width: 66ch; overflow-wrap: break-word; }
.prose ul { margin: 0 0 15px; padding-left: 0; list-style: none; display: grid; gap: 9px; max-width: 66ch; }
.prose li { position: relative; padding-left: 24px; overflow-wrap: break-word; }
.prose li::before { content: ''; position: absolute; left: 6px; top: 0.62em; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); }
.contact { margin-top: 30px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.contact-label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact strong { font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 0.9rem; border: none; cursor: pointer; }
.btn:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 10px 18px; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.meta { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); padding-block: 28px; color: var(--muted); font-size: 0.85rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.footer-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; text-decoration: none; }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.footer-links a, .footer-copy a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-copy a:hover { color: var(--accent); text-decoration: underline; }
.footer-copy { width: 100%; margin: 0; font-size: 0.78rem; }

/* banner do app */
.app-banner { display: flex; align-items: center; gap: 12px; margin: 22px 0; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius); background: var(--accent-soft); text-decoration: none; color: inherit; }
.app-banner img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.app-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-banner-text strong { font-size: 0.95rem; }
.app-banner-text span { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.app-banner-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 9px 15px; font-weight: 600; font-size: 0.82rem; white-space: nowrap; }
.app-banner-cta svg { width: 15px; height: 15px; }

/* anúncios */
.ad-slot { margin: 26px 0; }
.ad-slot ins { display: block; }
.ad-label { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; text-align: center; }
.ads-consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 640px; margin-inline: auto; }
.ads-consent[hidden] { display: none; }
.ads-consent p { margin: 0; flex: 1; min-width: 220px; font-size: 0.85rem; color: var(--muted); }
.ads-consent-actions { display: flex; gap: 8px; }

/* busca e lista */
.search { margin: 24px 0 8px; }
.search input { width: 100%; height: 48px; padding: 0 16px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.search input::placeholder { color: var(--muted); }
.list-count { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.hymns { list-style: none; margin: 0; padding: 0; }
.hymn-item { border-bottom: 1px solid var(--border); }
.hymn-item a { display: flex; align-items: baseline; gap: 14px; padding: 12px 4px; text-decoration: none; color: inherit; min-height: 52px; }
.hymn-item a:hover { background: var(--surface); }
.hymn-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); flex: none; width: 40px; }
.hymn-body { display: flex; flex-direction: column; min-width: 0; }
.hymn-title { font-weight: 600; font-size: 0.98rem; }
.hymn-first { color: var(--muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); margin-top: 30px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 22px 0 6px; }
.pagination[hidden] { display: none; }
.page-btn { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font-family: var(--font-mono); font-size: 14px; font-weight: 600; cursor: pointer; }
.page-btn:hover:not(:disabled) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.page-btn.is-current { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: default; }
.page-gap { color: var(--muted); padding: 0 4px; }

/* leitor */
.song-header { margin-bottom: 8px; }
.song-meta { color: var(--muted); font-size: 0.88rem; margin: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.control { display: flex; flex-direction: column; gap: 6px; flex: 1 1 130px; min-width: 120px; }
.control-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.control-row { display: flex; align-items: center; gap: 8px; }
.control-value { font-family: var(--font-mono); font-weight: 600; min-width: 34px; text-align: center; }
.step { min-width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--accent); font-size: 16px; font-weight: 700; cursor: pointer; }
.step.wide { flex: 1; min-width: 0; width: 100%; font-size: 12px; font-weight: 600; }
.step:hover { background: var(--accent-soft); }
.step.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.song { font-size: calc(1.02rem * var(--scale, 1)); margin: 22px 0; }
.section { margin: 0 0 18px; }
.section-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.section--chorus .section-label { color: #0e7490; }
.section--final .section-label { color: #7c3aed; }
:root[data-theme="dark"] .section--chorus .section-label { color: #67e8f9; }
:root[data-theme="dark"] .section--final .section-label { color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .section--chorus .section-label { color: #67e8f9; }
  :root:not([data-theme]) .section--final .section-label { color: #c4b5fd; }
}
.line { margin: 0 0 12px; line-height: 1.35; }
.word { display: inline-block; white-space: nowrap; }
.tk { display: inline-flex; flex-direction: column; align-items: flex-start; vertical-align: bottom; }
.chord { font-family: var(--font-mono); font-weight: 600; font-size: 0.78em; color: var(--accent); min-height: 1.08em; line-height: 1.08; letter-spacing: -0.02em; white-space: pre; }
.lyr { white-space: pre; }
.song.no-chords .chord { display: none; }
.song.repeat-on .js-chorus-original { display: none; }
.song.repeat-off .js-chorus-repeat { display: none; }
.diagramas { margin: 26px 0; padding-top: 18px; border-top: 1px solid var(--border); }
.diagram-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px; }
.diagram-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.diagram { width: 72px; height: 83px; }
.diagram svg { width: 100%; height: 100%; }
.diagram-name { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.diagram-empty { width: 72px; height: 83px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--border); border-radius: 8px; font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.hino-nav { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0 0; }
.hino-nav-link { font-family: var(--font-mono); font-size: 13px; color: var(--accent); text-decoration: none; padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px; }
.hino-nav-link:hover { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

@media (max-width: 480px) {
  .header-app { display: none; }
}
@media (min-width: 600px) {
  main { padding-block: 46px 72px; }
  .cards { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
