/* =====================================================================
   Rifa da Igreja — páginas de erro (404 / 502)
   Usado pelo app (via index.html) e embutido em 404.html / 502.html.
   As variáveis têm valor reserva para funcionar sem o app.css.
   ===================================================================== */
.err { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 40px 20px; position: relative; overflow: hidden; color: var(--ink-800, #243042);
  font-family: var(--font, 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  background: radial-gradient(circle at 50% -5%, rgba(212, 175, 90, .22), transparent 45%),
              radial-gradient(circle at 90% 95%, rgba(61, 103, 158, .10), transparent 40%), var(--bg, #f6f2ea); }
.err::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='80' viewBox='0 0 60 80'%3E%3Cpath d='M6 80V34a24 24 0 0 1 48 0v46' fill='none' stroke='%23c39a3e' stroke-opacity='.10' stroke-width='1.5'/%3E%3C/svg%3E"); }
.err.inline { min-height: calc(100vh - 160px); background: transparent; padding: 24px 8px; }
.err.inline::before { display: none; }
.err.compact { min-height: 0; padding: 30px 16px 34px; gap: 0; }
.err.compact .err-art { width: min(140px, 40vw); margin-bottom: 16px; }
.err.compact h1 { font-size: 22px; margin-top: 12px; }
.err.compact p { font-size: 14px; }
.err.compact .err-actions { margin-top: 18px; }
.err.compact .err-verse { margin-top: 20px; }
.err-card { position: relative; z-index: 1; width: 100%; max-width: 560px; text-align: center; }
.err-art { width: min(220px, 60vw); margin: 0 auto 24px; filter: drop-shadow(0 20px 28px rgba(19, 37, 63, .25)); }
.err-art svg { width: 100%; height: auto; display: block; }
.err-art .flame { transform-box: view-box; transform-origin: 100px 97px; animation: errFlicker 2.4s ease-in-out infinite; }
.err-art .glow { animation: errGlow 2.4s ease-in-out infinite; }
@keyframes errFlicker { 0%, 100% { transform: scale(1, 1) rotate(-2deg); } 50% { transform: scale(.92, 1.08) rotate(2deg); } }
@keyframes errGlow { 0%, 100% { opacity: .55; } 50% { opacity: .85; } }
.err-code { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 14px; border-radius: 99px; font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; background: var(--gold-50, #fbf6e9); color: var(--gold-700, #7d5f1f); border: 1px solid var(--gold-200, #ecd9a8); }
.err h1 { margin: 16px 0 0; font-family: var(--font-display, 'Lora', Georgia, serif); font-size: clamp(26px, 4.4vw, 38px); line-height: 1.15;
  font-weight: 700; letter-spacing: -.01em; color: var(--ink-900, #16202e); }
.err p { margin: 12px auto 0; max-width: 470px; font-size: 15.5px; line-height: 1.65; color: var(--ink-600, #4b5768); }
.err-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.err-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font: inherit; font-size: 14.5px;
  font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, transform .05s; }
.err-btn:active { transform: translateY(1px); }
.err-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.err-btn.primary { background: var(--brand-600, #2b5085); color: #fff; box-shadow: 0 8px 20px -8px rgba(43, 80, 133, .7); }
.err-btn.primary:hover { background: var(--brand-700, #213f6a); color: #fff; }
.err-btn.secondary { background: #fffdf9; color: var(--ink-800, #243042); border-color: var(--border, #e7e0d3); }
.err-btn.secondary:hover { background: var(--gold-50, #fbf6e9); color: var(--ink-900, #16202e); }
.err-verse { margin: 30px auto 0; max-width: 440px; padding: 14px 18px; border-left: 3px solid var(--gold-400, #d4af5a); text-align: left;
  background: rgba(255, 255, 255, .6); border-radius: 0 12px 12px 0; }
.err-verse q { font-family: var(--font-display, 'Lora', Georgia, serif); font-style: italic; font-size: 15px; line-height: 1.55; color: var(--ink-700, #374457); quotes: '“' '”'; }
.err-verse cite { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--gold-600, #a37e2c); }
.err-hint { margin-top: 18px; font-size: 12.5px; color: var(--ink-400, #98a1ae); }
.err-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-900, #16202e);
  font-family: var(--font-display, 'Lora', Georgia, serif); font-weight: 700; font-size: 16px; }
.err-foot .logo { width: 30px; height: 30px; border-radius: 10px 10px 8px 8px; display: grid; place-items: center; background: linear-gradient(140deg, #e3c77f, #a37e2c); }
.err-foot .logo svg { width: 17px; height: 17px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .err-art .flame, .err-art .glow { animation: none; } }
