/* ==========================================================================
   PayVaultMax — Biblioteca do Folclore Brasileiro
   Tema escuro "mata à noite" com a paleta do logo (magenta → laranja)
   ========================================================================== */

:root {
  --bg: #120d1f;
  --bg-2: #171029;
  --surface: #1e1633;
  --surface-2: #281e43;
  --surface-3: #33275a;
  --border: #3a2d5c;
  --border-2: #4d3c78;
  --text: #f3ecfa;
  --muted: #b8abd0;
  --faint: #8a7ca6;
  --pink: #f25cc0;
  --magenta: #d6339a;
  --orange: #ff7a2f;
  --gold: #ffc56b;
  --ok: #4fd6a0;
  --danger: #ff6b7d;
  --grad: linear-gradient(135deg, #f25cc0 0%, #ff7a2f 100%);
  --grad-soft: linear-gradient(135deg, rgba(242, 92, 192, .18), rgba(255, 122, 47, .14));
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --glow: 0 0 0 1px rgba(242, 92, 192, .35), 0 12px 40px -12px rgba(242, 92, 192, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --container: 1200px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(242, 92, 192, .12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 122, 47, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--pink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ff8fd6; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 2rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 5px; padding: 0 .4em; font-size: .85em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.site-main { flex: 1; padding-bottom: 3rem; }
.section { margin-top: 3rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 2.75rem; height: 2.75rem; }
.icon-xxl { width: 4.5rem; height: 4.5rem; color: var(--pink); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--pink); color: #fff; padding: .5rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Botões, chips e tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem/1.2 var(--font); cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(242, 92, 192, .8); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px -8px rgba(255, 122, 47, .8); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn-block { width: 100%; }
.btn[aria-pressed="true"] .icon { fill: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .03);
  color: var(--text); cursor: pointer; transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-size: .92rem; font-weight: 500;
  transition: border-color .2s, background .2s;
}
.chip small { color: var(--faint); font-weight: 600; }
.chip:hover { border-color: var(--pink); color: var(--text); background: var(--surface-2); }
.chip.is-active { background: var(--grad-soft); border-color: var(--pink); }

.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; }
.tag {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .7rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
  font-size: .82rem; font-weight: 500; text-decoration: none;
}
a.tag:hover { color: var(--text); border-color: var(--pink); }
.tag-region { border-color: color-mix(in srgb, var(--rc) 55%, transparent); color: var(--rc); }
.tag-ok { background: rgba(79, 214, 160, .12); border-color: rgba(79, 214, 160, .45); color: var(--ok); }
.tag-list.small .tag { font-size: .78rem; }
.badge { display: inline-block; background: var(--grad); color: #fff; font: 700 .72rem/1 var(--font); padding: .25rem .5rem; border-radius: 999px; vertical-align: middle; }
.region-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--rc, var(--pink)); box-shadow: 0 0 10px var(--rc, var(--pink)); flex: none; }

.eyebrow { display: inline-flex; align-items: center; gap: .45rem; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold); margin-bottom: .75rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; }
.link-more { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(18, 13, 31, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(77, 60, 120, .5);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 100%; }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1; margin-right: auto; }
.brand img { width: 210px; height: auto; filter: brightness(1.3) saturate(1.1) drop-shadow(0 2px 10px rgba(242, 92, 192, .35)); }
.brand-tag { white-space: nowrap; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 2px 0 0 44px; }
.main-nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.main-nav a {
  display: flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .93rem;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] .icon { color: var(--pink); }
.header-actions { display: flex; gap: .4rem; }
.menu-toggle { display: none; }
.fav-count {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--grad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.fav-count[hidden] { display: none; }

@media (max-width: 1080px) {
  .main-nav a span { display: none; }
  .main-nav a { padding: .55rem; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg-2);
    border-bottom: 1px solid var(--border); padding: .75rem 20px 1.25rem;
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: transform .2s ease, opacity .2s ease, visibility .2s;
    max-height: calc(100vh - var(--header-h)); overflow: auto;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; }
  .main-nav a span { display: inline; }
  .main-nav a { padding: .8rem .9rem; font-size: 1rem; }
  .brand img { width: 170px; }
  .brand-tag { margin-left: 36px; font-size: .6rem; }
}
@media (max-width: 420px) {
  .header-actions .icon-btn[href*="aleatorio"] { display: none; }
  .brand img { width: 150px; }
  .brand-tag { display: none; }
}

/* ---------- Busca global e sugestões ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(8, 5, 16, .75); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px;
}
.search-overlay[hidden] { display: none; }
.search-dialog { width: 100%; max-width: 680px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; box-shadow: var(--shadow); padding: 12px; }
.search-form { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem; }
.search-form > .icon { color: var(--pink); }
.search-form input { flex: 1; background: transparent; border: 0; color: var(--text); font: 500 1.15rem var(--font); padding: .8rem 0; outline: none; }
.search-hint { font-size: .8rem; color: var(--faint); margin: .5rem .75rem .25rem; }
.suggest-list:empty { display: none; }
.suggest-list { margin-top: .5rem; border-top: 1px solid var(--border); padding-top: .5rem; max-height: 60vh; overflow: auto; }
.suggest-item {
  display: flex; gap: .8rem; align-items: center; padding: .6rem .75rem; border-radius: 12px;
  color: var(--text); text-decoration: none;
}
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); color: var(--text); }
.suggest-item .s-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--pink); flex: none; }
.suggest-item strong { display: block; }
.suggest-item small { color: var(--muted); display: block; line-height: 1.35; }
.suggest-item mark { background: none; color: var(--orange); }
.suggest-empty { padding: .8rem; color: var(--muted); }
.suggest-all { display: block; text-align: center; padding: .6rem; font-weight: 600; text-decoration: none; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; margin: 1.1rem auto 0; font-size: .85rem; color: var(--faint); }
.breadcrumbs li + li::before { content: "›"; margin: 0 .4rem; color: var(--border-2); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--pink); }

/* ---------- Hero (home) ---------- */
.hero { padding: 3.5rem 0 1.5rem; }
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 2rem; align-items: center; }
.hero h1 { background: linear-gradient(120deg, #fff 30%, #ffc2ea 60%, #ffb07a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-search { position: relative; display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--border-2); border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; margin: 1.5rem 0 1rem; box-shadow: var(--shadow); }
.hero-search:focus-within { box-shadow: var(--glow); }
.hero-search > .icon { color: var(--pink); }
.hero-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: 500 1.05rem var(--font); padding: .6rem 0; }
.hero-search.narrow { max-width: 520px; margin-inline: auto; }
.hero-search input[type="search"], .search-form input[type="search"] { border: 0; background: transparent; box-shadow: none; border-radius: 0; padding-left: 0; padding-right: 0; }
.suggest-float { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; padding: .5rem; margin: 0; box-shadow: var(--shadow); }
.hero-quick { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-art { position: relative; display: grid; place-items: center; }
.hero-art img { position: relative; width: min(340px, 100%); animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(242, 92, 192, .35)); }
.orbit { position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(242, 92, 192, .35); animation: spin 40s linear infinite; }
.orbit::before, .orbit::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 16px var(--orange); top: 8%; left: 18%; }
.orbit::after { background: var(--pink); box-shadow: 0 0 16px var(--pink); top: auto; bottom: 10%; left: auto; right: 14%; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 860px) {
  .hero { padding-top: 2rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .hero-art img { width: 150px; }
  .orbit { width: 190px; }
}
@media (max-width: 520px) {
  .hero-search { border-radius: 18px; flex-wrap: wrap; padding: .6rem; }
  .hero-search input { flex-basis: calc(100% - 2rem); }
  .hero-search .btn { width: 100%; }
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat strong { display: block; font: 700 2rem/1.1 var(--font-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Blocos genéricos ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: start; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .split, .two-col { grid-template-columns: 1fr; } }
.prose-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }

.page-head { padding-top: 1.75rem; }
.page-head.with-icon { display: flex; gap: 1.5rem; align-items: flex-start; }
.page-icon { flex: none; width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border-2); color: var(--pink); }
@media (max-width: 640px) { .page-head.with-icon { flex-direction: column; gap: 1rem; } .page-icon { width: 64px; height: 64px; } }
.region-head .eyebrow { color: var(--rc); }
.region-head h1 { text-decoration: underline; text-decoration-color: var(--rc); text-decoration-thickness: 4px; text-underline-offset: 10px; }

.notice { display: flex; gap: .8rem; align-items: flex-start; background: var(--grad-soft); border: 1px solid rgba(242, 92, 192, .35); border-radius: var(--radius-sm); padding: 1rem 1.1rem; margin-bottom: 1.5rem; }
.notice > .icon { color: var(--gold); margin-top: .15rem; }
.notice p { margin: 0; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-2); border-radius: var(--radius); }
.empty-state .icon { color: var(--pink); margin-bottom: .5rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card {
  position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-2); box-shadow: var(--glow); }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-soft); color: var(--ic, var(--pink)); border: 1px solid var(--border); }
.card-icon .icon { width: 28px; height: 28px; }
.card-kicker { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin: 0 0 .25rem; }
.card-title { font-size: 1.2rem; margin: 0 0 .4rem; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-text { color: var(--muted); font-size: .94rem; margin: 0; }
.card-extra { margin-top: .5rem; }
.fav-btn {
  position: absolute; top: 1rem; right: 1rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--border); background: rgba(18, 13, 31, .6);
  color: var(--muted); cursor: pointer; transition: color .2s, transform .15s, border-color .2s;
}
.fav-btn:hover { color: var(--pink); border-color: var(--pink); }
.fav-btn[aria-pressed="true"] { color: var(--pink); border-color: var(--pink); }
.fav-btn[aria-pressed="true"] .icon, [data-fav][aria-pressed="true"] .icon { fill: currentColor; }
.fav-btn.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* Cores por ícone */
.icon-onda, .icon-peixe { --ic: #5cc8ff; }
.icon-folha, .icon-pegada { --ic: #4fd6a0; }
.icon-chama, .icon-fogueira { --ic: #ff7a2f; }
.icon-lua, .icon-estrela { --ic: #ffd36b; }
.icon-sol { --ic: #ffb13d; }
.icon-serpente, .icon-olho { --ic: #b58cff; }
.icon-espirito, .icon-mascara { --ic: #f25cc0; }
.icon-passaro, .icon-flor { --ic: #ff8fb8; }
.icon-boi { --ic: #ff9b6b; }

/* ---------- Categorias ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s;
}
.cat-card:hover { border-color: var(--pink); transform: translateY(-2px); color: var(--text); }
.cat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: .4rem; }
.cat-name { font: 700 1.1rem/1.25 var(--font-display); margin: 0; }
.cat-name a { color: var(--text); text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.cat-desc { color: var(--muted); font-size: .9rem; }
.cat-sample { color: var(--faint); font-size: .82rem; font-style: italic; }
.cat-count { margin-top: auto; padding-top: .5rem; font-size: .8rem; font-weight: 700; color: var(--gold); }
.cat-grid-lg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Verbete do dia / ferramentas ---------- */
.daily { display: flex; gap: 1.5rem; align-items: center; padding: 1.75rem; border-radius: 22px; background: var(--grad-soft); border: 1px solid rgba(242, 92, 192, .35); }
.daily-icon { flex: none; width: 110px; height: 110px; border-radius: 28px; display: grid; place-items: center; background: var(--surface); color: var(--ic, var(--pink)); border: 1px solid var(--border-2); }
.daily h2 a { color: var(--text); text-decoration: none; }
.daily-meta { color: var(--faint); font-size: .88rem; }
@media (max-width: 640px) { .daily { flex-direction: column; align-items: flex-start; } .daily-icon { width: 72px; height: 72px; } }

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.tool-card { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; transition: border-color .2s, transform .2s; }
.tool-card .icon { color: var(--orange); margin-bottom: .6rem; }
.tool-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.tool-card:hover { border-color: var(--orange); transform: translateY(-2px); color: var(--text); }
@media (max-width: 860px) { .tools-grid { grid-template-columns: 1fr; } }

/* ---------- Regiões / estados ---------- */
.region-list { display: flex; flex-direction: column; gap: .6rem; }
.region-item { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.region-item:hover { border-color: var(--rc); color: var(--text); }
.region-item > span:nth-child(2) { flex: 1; }
.region-item small { display: block; color: var(--muted); }
.region-block { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--rc); }
.region-block h2 a { color: var(--text); text-decoration: none; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.state-card { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.state-card:hover { border-color: var(--pink); color: var(--text); }
.state-card small { display: block; color: var(--muted); font-size: .78rem; }
.uf-badge { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--grad-soft); font-weight: 700; font-size: .85rem; color: var(--gold); }

/* ---------- Mapa em mosaico ---------- */
.tilemap { margin: 0; }
.tilemap svg { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.tile rect { stroke-width: 1.5; transition: transform .2s, fill-opacity .2s; transform-box: fill-box; transform-origin: center; }
.tile:hover rect, .tile:focus rect, .tile.is-active rect { fill-opacity: 1; transform: scale(1.08); }
.tile.is-active rect { stroke: #fff; stroke-width: 2.5; }
.tile:focus { outline: none; }
.tile-uf { fill: #fff; font: 700 15px var(--font); pointer-events: none; }
.tile-count { fill: rgba(255, 255, 255, .8); font: 600 11px var(--font); pointer-events: none; }
.map-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; padding: 0; margin: 1rem 0 .5rem; font-size: .88rem; }
.map-legend a { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; }
.map-legend a:hover { color: var(--text); }
.map-tip { text-align: center; color: var(--faint); font-size: .88rem; min-height: 1.5em; }
.map-side .map-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.mini-list a { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.mini-list a:hover { background: var(--surface-2); color: var(--text); }
.mini-list small { color: var(--faint); }
.rank-list { list-style: none; padding: 0; margin: 0 0 1.5rem; counter-reset: r; }
.rank-list li { display: flex; justify-content: space-between; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); counter-increment: r; }
.rank-list li::before { content: counter(r); width: 1.6rem; color: var(--faint); font-weight: 700; }
.rank-list a { flex: 1; color: var(--text); text-decoration: none; }
.rank-list a:hover { color: var(--pink); }
.uf { display: inline-block; font-weight: 700; font-size: .78rem; color: var(--gold); min-width: 1.9rem; text-decoration: none; }
.uf-list .uf { background: var(--surface-2); border-radius: 6px; padding: .1rem .35rem; margin: 0 .15rem .25rem 0; text-align: center; }

/* ---------- Explorar / filtros ---------- */
.explore-layout, .discover-layout { display: grid; grid-template-columns: 290px 1fr; gap: 2rem; margin-top: 2rem; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters-head h2 { font: 700 1.05rem var(--font); display: flex; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.filters-close, .filters-open { display: none; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 10px; padding: .65rem .8rem; font: 400 1rem var(--font);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(242, 92, 192, .2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--faint); }
.input-icon input { padding-left: 2.4rem; }
.filter-group { border-top: 1px solid var(--border); padding: .75rem 0; }
.filter-group summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; color: var(--faint); font-size: 1.2rem; }
.filter-group[open] summary::after { content: "–"; }
.filter-options { display: flex; flex-direction: column; gap: .15rem; margin-top: .5rem; }
.check { display: flex; align-items: flex-start; gap: .55rem; cursor: pointer; padding: .3rem .25rem; border-radius: 8px; font-size: .93rem; }
.check:hover { background: var(--surface-2); }
.check span { flex: 1; }
.check small { color: var(--faint); }
.check input { accent-color: var(--pink); width: 1.05rem; height: 1.05rem; margin-top: .2rem; }
.results { transition: opacity .2s; }
.results.is-loading { opacity: .45; pointer-events: none; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: baseline; margin-bottom: 1rem; }
.results-count { color: var(--muted); margin: 0 0 1rem; }
.results-bar .results-count { margin: 0; }
.results-count strong { color: var(--text); }
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); text-decoration: none; color: var(--text); background: var(--surface); }
.pagination span[aria-current] { background: var(--grad); border-color: transparent; font-weight: 700; }
.pagination a:hover { border-color: var(--pink); }

@media (max-width: 900px) {
  .explore-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 20% 0 0; max-height: none; top: 0; z-index: 80; border-radius: 0 20px 20px 0; transform: translateX(-105%); transition: transform .25s; }
  .filters.is-open { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, .6); }
  .filters-close, .filters-open { display: inline-flex; }
  .filters-open { margin-bottom: 1rem; }
}
@media (max-width: 480px) { .filters { inset: 0 8% 0 0; } }

/* ---------- Verbete ---------- */
.entry-hero { display: flex; gap: 2rem; padding-top: 1.75rem; align-items: flex-start; }
.entry-hero-icon { flex: none; width: 128px; height: 128px; border-radius: 32px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--border-2); color: var(--ic, var(--pink)); box-shadow: var(--glow); }
.entry-hero-icon .icon { width: 64px; height: 64px; }
.entry-hero h1 { margin-bottom: .25rem; }
.aka { color: var(--faint); font-style: italic; margin-bottom: .75rem; }
.entry-meta { display: flex; gap: .45rem; align-items: center; color: var(--faint); font-size: .88rem; margin-top: 1rem; }
@media (max-width: 700px) { .entry-hero { flex-direction: column; gap: 1rem; } .entry-hero-icon { width: 80px; height: 80px; border-radius: 22px; } .entry-hero-icon .icon { width: 42px; height: 42px; } }

.entry-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2.5rem; margin-top: 2.5rem; align-items: start; }
.entry-aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 1rem; max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.toc, .factbox { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.toc-title { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .6rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc a { display: block; padding: .3rem .6rem; border-left: 2px solid var(--border); color: var(--muted); text-decoration: none; font-size: .93rem; }
.toc a:hover, .toc a.is-active { color: var(--text); border-left-color: var(--pink); }
.factbox dl { margin: 0; font-size: .9rem; }
.factbox dt { color: var(--faint); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; margin-top: .7rem; }
.factbox dd { margin: .15rem 0 0; }
.factbox dd a { color: var(--text); }
.factbox dd a:hover { color: var(--pink); }
@media (max-width: 960px) {
  .entry-layout { grid-template-columns: minmax(0, 1fr); }
  .entry-aside { position: static; max-height: none; order: 2; }
  .toc { display: none; }
}

.prose { font-size: 1.06rem; }
.prose section { margin-bottom: 2.5rem; }
.prose h2 { padding-bottom: .4rem; border-bottom: 1px solid var(--border); margin-top: 0; }
.prose h2::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--grad); margin-right: .6rem; vertical-align: middle; }
.prose p { color: #e4dbef; }
.narrow-prose { max-width: 780px; }
.narrow-prose h2 { margin-top: 2rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.check-list, .facts { list-style: none; padding: 0 !important; display: grid; gap: .6rem; }
.check-list li, .facts li { display: flex; gap: .7rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1rem; margin: 0; }
.check-list .icon { color: var(--ok); margin-top: .2rem; }
.facts .icon { color: var(--gold); margin-top: .2rem; }
.sources { padding-left: 1.4rem; color: var(--muted); font-size: .95rem; }
.sources li::marker { color: var(--pink); font-weight: 700; }

.versions { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.version-tabs { display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--bg-2); scrollbar-width: thin; }
.version-tabs button { flex: none; display: flex; align-items: center; gap: .5rem; padding: .85rem 1.1rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: 600 .92rem var(--font); cursor: pointer; }
.version-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--pink); background: var(--surface); }
.v-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #fff; font-size: .75rem; font-weight: 700; }
.version-panel { padding: 1.25rem 1.4rem; }
.version-panel p:last-child { margin: 0; }
.version-region { display: flex; gap: .4rem; align-items: center; color: var(--gold) !important; font-size: .88rem; font-weight: 600; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.pn { display: block; padding: 1rem 1.2rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.pn small { display: block; color: var(--faint); font-weight: 500; }
.pn:hover { border-color: var(--pink); color: var(--text); }
.pn.next { text-align: right; }

/* ---------- Descobrir ---------- */
.discover-layout { grid-template-columns: minmax(0, 420px) 1fr; }
.discover-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.trait-group { border: 0; padding: 0; margin: 0 0 1.25rem; }
.trait-group legend { font-weight: 700; margin-bottom: .6rem; font-family: var(--font-display); font-size: 1.05rem; }
.weight { font: 600 .7rem var(--font); color: var(--gold); background: rgba(255, 197, 107, .12); padding: .15rem .45rem; border-radius: 999px; vertical-align: middle; }
.trait-options { display: flex; flex-wrap: wrap; gap: .4rem; }
.trait { position: relative; cursor: pointer; }
.trait input { position: absolute; opacity: 0; pointer-events: none; }
.trait span { display: inline-block; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--border-2); background: var(--bg-2); font-size: .88rem; transition: all .15s; }
.trait:hover span { border-color: var(--pink); }
.trait input:checked + span { background: var(--grad); border-color: transparent; color: #fff; font-weight: 600; }
.trait input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.match-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.match { position: relative; display: flex; gap: 1.1rem; align-items: flex-start; padding: 1.1rem 3.5rem 1.1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.match h3 { margin: 0 0 .3rem; }
.match h3 a { color: var(--text); text-decoration: none; }
.match h3 a:hover { color: var(--pink); }
.match p { color: var(--muted); font-size: .94rem; margin-bottom: .6rem; }
.match .tag-list { margin: 0; }
.match-score { position: relative; flex: none; width: 64px; height: 64px; }
.match-score svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.match-score circle { fill: none; stroke-width: 3.2; }
.ring-bg { stroke: var(--surface-3); }
.ring { stroke: url(#g-brand); stroke: var(--pink); stroke-linecap: round; }
.match-score span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
@media (max-width: 900px) {
  .discover-layout { grid-template-columns: 1fr; }
  .discover-form { position: static; max-height: none; }
}

/* ---------- Calendário ---------- */
.month-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: .5rem; }
.month { position: relative; text-align: center; padding: .8rem .3rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.month strong { display: block; font-size: .95rem; }
.month small { color: var(--faint); }
.month:hover { border-color: var(--pink); color: var(--text); }
.month.is-active { background: var(--grad); border-color: transparent; }
.month.is-active small { color: #fff; }
.month.is-empty { opacity: .55; }
.now-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
@media (max-width: 900px) { .month-grid { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 520px) { .month-grid { grid-template-columns: repeat(4, 1fr); } }
.timeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.timeline-month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.timeline-month.is-now { border-color: var(--ok); }
.timeline-month h2 a { color: var(--text); text-decoration: none; }
.timeline-month ul { list-style: none; padding: 0; margin: 0; }
.timeline-month li { padding: .3rem 0; }
.timeline-month li a { color: var(--text); text-decoration: none; font-weight: 500; }
.timeline-month li a:hover { color: var(--pink); }
.timeline-month li .icon { color: var(--orange); }

/* ---------- Comparar ---------- */
.compare-forms { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; }
.compare-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 800px) { .compare-forms, .two-fields { grid-template-columns: 1fr; } }
.compare-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 1rem; }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--pink); border-radius: var(--radius); padding: 1.25rem; }
.compare-col:nth-child(2) { border-top-color: var(--orange); }
.compare-col:nth-child(3) { border-top-color: var(--gold); }
.compare-col:nth-child(4) { border-top-color: var(--ok); }
.compare-col h3 { margin: .6rem 0 .3rem; }
@media (max-width: 900px) { .compare-cols { grid-template-columns: 1fr; } }
.compare-table-wrap, .table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.compare-table, .table-wrap table { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare-table th, .compare-table td, .table-wrap th, .table-wrap td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; font-size: .95rem; }
.compare-table thead th { background: var(--surface-2); font-family: var(--font-display); font-size: 1.1rem; }
.compare-table thead a { color: var(--text); text-decoration: none; }
.compare-table tbody th { width: 170px; color: var(--muted); font-weight: 600; background: var(--bg-2); }
.compare-table td { background: var(--surface); }
.compare-table td ul { margin: 0; padding-left: 1.1rem; }
.compare-table .tag { margin: 0 .2rem .3rem 0; }
.table-wrap th { background: var(--surface-2); }

/* ---------- A–Z ---------- */
.az-nav { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.5rem; }
.az-nav a, .az-nav span { min-width: 40px; height: 40px; padding: 0 .6rem; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; }
.az-nav a:hover { border-color: var(--pink); }
.az-nav a.is-active { background: var(--grad); border-color: transparent; }
.az-nav .is-disabled { opacity: .3; }
.az-list { columns: 3 280px; column-gap: 2rem; }
.az-group { break-inside: avoid; margin-bottom: 1.5rem; }
.az-group h2 { font-size: 2rem; color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; margin-bottom: .3rem; }
.az-group ul { list-style: none; padding: 0; margin: 0; }
.az-group li { padding: .35rem 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.az-group li a { color: var(--text); font-weight: 600; text-decoration: none; }
.az-group li a:hover { color: var(--pink); }
.az-group .tag { margin-left: auto; font-size: .72rem; }

/* ---------- Formulários / alertas ---------- */
.contact-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.contact-form .check { margin: .5rem 0 1.25rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { display: flex; gap: .7rem; padding: 1rem 1.2rem; border-radius: 12px; margin-bottom: 1rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert p { margin: 0; }
.alert-ok { background: rgba(79, 214, 160, .12); border: 1px solid rgba(79, 214, 160, .5); }
.alert-ok .icon { color: var(--ok); }
.alert-error { background: rgba(255, 107, 125, .1); border: 1px solid rgba(255, 107, 125, .5); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: linear-gradient(180deg, var(--bg-2), #0d0917); padding: 3rem 0 1.5rem; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.footer-about p { color: var(--muted); }
.footer-note { display: flex; gap: .5rem; font-size: .85rem; color: var(--faint) !important; }
.footer-note .icon { color: var(--gold); flex: none; margin-top: .2rem; }
.site-footer h2 { font: 700 .8rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--pink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--faint); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.to-top { display: inline-flex; gap: .35rem; align-items: center; color: var(--muted); text-decoration: none; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookies / toast / anúncios ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 18px; padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 320px; margin: 0; font-size: .9rem; color: var(--muted); }
.cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; background: var(--text); color: var(--bg); padding: .7rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }
.ad-slot { margin: 2rem auto; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: .3rem; }

/* ---------- Impressão ---------- */
@media print {
  .site-header, .site-footer, .entry-aside, .btn-row, .fav-btn, .cookie-banner, #relacionados, .prev-next, .breadcrumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .lead { color: #000; }
  .version-panel[hidden] { display: block !important; }
}
