/* Estilo compartilhado das páginas de wiki isoladas (wiki.html e 404.html, que serve
   /wiki/<slug> — ambas carregam este arquivo + wiki-core.js). Paleta "Herbário do
   Multiverso" duplicada de propósito aqui: essas páginas nunca carregam index.html. */
:root { color-scheme: light dark; }
:root {
  --bg: #e8dcbf; --paper: #f5ecd6; --surface: #f6eeda; --surface-2: #ece0c3; --border: #d2bf98; --border-strong: #a98f61;
  --ink: #2e2416; --muted: #6a5940; --faint: #9a8763; --gold: #9c7b3c; --gold-ink: #785a28;
  --accent-wash: #ecdfbe; --warn: #b07d24; --shadow: 0 1px 2px rgba(74,52,20,0.06), 0 14px 34px -18px rgba(74,52,20,0.26);
  --shadow-lift: 0 2px 6px rgba(74,52,20,0.10), 0 26px 56px -24px rgba(74,52,20,0.34);
  --radius: 6px; --font-body: "Spectral", Georgia, "Times New Roman", serif; --font-display: "Cormorant", Georgia, serif; --font-wb: "Cormorant Garamond", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14100a; --paper: #211a10; --surface: #221b11; --surface-2: #2b2216; --border: #3a2f1d; --border-strong: #55442b;
    /* --faint bumped #7c6e55 → #a89478 2026-09-22: mesmo problema medido no tema Paradise
       Gate (ver a nota ao lado de body.pg-theme) também acontecia aqui, e pior (~3.4:1). */
    --ink: #e9dcbd; --muted: #ac9e80; --faint: #a89478; --gold: #d8b878; --gold-ink: #ecd3a2;
    --accent-wash: #2a2114; --warn: #d6a24a; --shadow: 0 2px 10px rgba(0,0,0,0.45), 0 26px 60px -24px rgba(0,0,0,0.7);
    --shadow-lift: 0 4px 16px rgba(0,0,0,0.5), 0 40px 80px -30px rgba(0,0,0,0.82);
  }
}
/* Paradise Gate ("pg-theme", set by wiki-core.js only when the URL is under /wiki/) — expands
   the invite email's identity into the wiki itself: a royal-blue "envelope" behind "letter"
   panels, same contrast that made the email work, rather than a flat navy wash. Unlike the
   herbarium above, PG DOES still follow the visitor's OS light/dark preference — just with its
   own pair of parchments instead of inheriting the herbarium's, so --bg stays navy either way
   but --paper/--surface/etc are restated explicitly in both branches (not left to inherit).
   Light branch = cream parchment (the herbarium's own light values) + steel-blue ink, echoing
   the email's paper-on-navy exactly. Dark branch = a dark, blue-leaning vellum (lighter than
   --bg so it still reads as a distinct card, not black-on-navy) + silver ink, so dark-mode
   readers get a parchment that belongs to this palette instead of the herbarium's warm walnut. */
body.pg-theme {
  --bg: #0a1730;
  --paper: #f5ecd6; --surface: #f6eeda; --surface-2: #ece0c3; --border: #d2bf98; --border-strong: #a98f61;
  --ink: #2e2416; --muted: #6a5940; --faint: #9a8763;
  --gold: #6b7a94; --gold-ink: #3d4c68; --accent-wash: #eef1f4; --warn: #b07d24;
  --shadow: 0 2px 10px rgba(2,6,20,0.35), 0 24px 55px -22px rgba(2,6,20,0.65);
  --shadow-lift: 0 4px 18px rgba(2,6,20,0.4), 0 40px 80px -28px rgba(2,6,20,0.75);
  --font-display: "Cinzel", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  body.pg-theme {
    --paper: #17233f; --surface: #1b2847; --surface-2: #20304f; --border: #33436b; --border-strong: #4c5f8c;
    /* --faint bumped #7f8a9a → #8e97a6 2026-09-22: medida em produção (rótulos como "Personagem
       do dia") em 4.17–4.45:1 contra --paper/--surface, abaixo do mínimo AA de 4.5:1. Novo valor
       passa em ambos com folga (~5:1). */
    --ink: #dfe4ea; --muted: #a7b1bf; --faint: #8e97a6;
    --gold: #9aa7bd; --gold-ink: #e8edf3; --accent-wash: #223460; --warn: #d6a24a;
    --shadow: 0 2px 10px rgba(0,0,0,0.5), 0 24px 55px -22px rgba(0,0,0,0.75);
    --shadow-lift: 0 4px 20px rgba(0,0,0,0.55), 0 44px 90px -28px rgba(0,0,0,0.85);
  }
}
body.pg-theme h1, body.pg-theme .home-title, body.pg-theme .topbar a { letter-spacing: 0.02em; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); line-height: 1.6; padding: 28px 16px 60px; }
.page { max-width: 800px; margin: 0 auto; }
/* flow-root: contém a infobox flutuante na própria altura do card — sem isso, um card com
   pouco conteúdo (comum agora no início da wiki) fica mais baixo que a infobox, e o fundo/
   borda do card corta no meio dela em vez de acompanhar até onde ela realmente termina. */
.card { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); display: flow-root; }
.eyebrow { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.crumb a { color: var(--gold-ink); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
h1 { font-family: var(--font-display); font-weight: 500; font-size: 32px; margin: 6px 0 4px; }
.aliases { font-size: 13px; color: var(--muted); font-style: italic; margin-bottom: 14px; }

.site-header { max-width: 800px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--shadow); }
.site-header > .login-bar:only-child { margin-left: auto; }
.topbar { display: flex; gap: 10px; align-items: center; }
.topbar a { color: var(--gold-ink); text-decoration: none; font-weight: 600; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.01em; }
.topbar a:hover { text-decoration: underline; }
.topbar .sep { color: var(--faint); font-size: 13px; }
.topbar .topbar-uni { font-size: 13px; color: var(--muted); }

/* infobox — floats right of the article on wide screens, stacks full-width on narrow ones */
.infobox { float: none; width: 100%; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); margin: 0 0 18px; overflow: hidden; }
@media (min-width: 620px) { .infobox { float: right; width: 250px; margin: 0 0 16px 22px; } }
/* Abaixo de 620px a infobox não flutua mais (vira bloco cheio ANTES do artigo) — sem limitar
   isso, uma tabela de 15+ linhas empurrava todo texto de verdade pra fora da primeira tela no
   celular (achado P1 do critique de 2026-09-22). Corta visualmente na 6ª linha (o DOM continua
   inteiro, então nada muda pra quem usa leitor de tela ou tela larga) até o botão expandir. */
.infobox-expand { display: none; width: 100%; border: 0; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--gold-ink); font-family: var(--font-body); font-size: 12px; padding: 10px; cursor: pointer; }
.infobox-expand:hover { background: var(--accent-wash); }
/* Precisa vir DEPOIS das regras base acima (mesma especificidade — a última declarada ganha),
   senão o "display:none" base sempre venceria mesmo dentro da media query. */
@media (max-width: 619px) {
  .infobox:not(.expanded) .infobox-facts tr:nth-child(n+7) { display: none; }
  .infobox-expand { display: block; }
}
.infobox .cover { width: 100%; display: block; max-height: 280px; object-fit: cover; }
.infobox-quote { padding: 10px 14px; font-family: var(--font-wb); font-style: italic; font-size: 12.5px; line-height: 1.45; text-align: center; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
/* Nota de mestre — só existe na prévia "ver como wiki" do próprio dono (nunca no snapshot
   publicado de verdade), por isso não precisa de nenhum mecanismo de esconder daqui: se aparece,
   é porque quem está olhando já é o autor. */
.wb-master-note { margin-top: 6px; padding: 4px 8px; font-size: 11.5px; font-style: italic; color: var(--muted); background: var(--surface-2); border-left: 2px solid var(--border-strong); border-radius: 0 4px 4px 0; }
.infobox-portrait { position: relative; }
.infobox-tabs { display: flex; }
.infobox-tab { flex: 1; border: 0; background: var(--surface-2); color: var(--muted); font-family: var(--font-body); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 4px; cursor: pointer; border-bottom: 2px solid transparent; }
.infobox-tab.on { color: var(--gold-ink); border-bottom-color: var(--gold); background: var(--surface); }
.infobox-tab:hover { color: var(--ink); }
.infobox-facts { width: 100%; border-collapse: collapse; font-size: 13px; }
.infobox-facts tr { border-top: 1px solid var(--border); }
.infobox-facts tr:first-child { border-top: 0; }
.infobox-facts th, .infobox-facts td { padding: 7px 10px; text-align: left; vertical-align: top; }
.infobox-facts th { width: 40%; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.infobox-facts td { font-family: var(--font-wb); font-size: 14.5px; }
.infobox-header-row th { width: auto; background: var(--accent-wash); color: var(--gold-ink); letter-spacing: 0.08em; }
.infobox-header-row:first-child th { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.infobox-alias-line { font-style: italic; margin: 0 0 3px; }
.infobox-alias-line:last-child { margin: 0; }

/* abas de obra/campanha (variantes) — sit above the article body, mirror infobox tabs visually */
.work-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 18px; clear: both; }
/* reaproveita o visual de .work-tab (mesmo componente, contexto diferente — filtro por tipo na
   home, achado do critique de 2026-09-22) */
.type-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 18px; }
.work-tab { border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font-family: var(--font-body); font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
/* alvo de toque no celular (achado do critique de 2026-09-22: ~33px medido, abaixo de 44px). */
@media (max-width: 619px) { .work-tab { padding: 12px 14px; } }
.work-tab.on { background: var(--gold); color: var(--paper); border-color: var(--gold); font-weight: 600; }
.work-tab:hover:not(.on) { color: var(--ink); }

.article { min-width: 0; }
.summary { font-family: var(--font-wb); font-size: 18px; font-style: italic; color: var(--muted); margin: 0 0 14px; }
.prose {
  font-family: var(--font-wb); font-size: 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prose p { margin: 0 0 14px; overflow-wrap: anywhere; word-break: break-word; }
.prose img.wb-img { max-width: 100%; border-radius: var(--radius); margin: 10px 0; display: block; }
.prose code.wb-code { font-family: ui-monospace, monospace; background: var(--accent-wash); padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }
.prose blockquote { margin: 10px 0; padding: 4px 14px; border-left: 3px solid var(--gold); color: var(--muted); overflow-wrap: anywhere; word-break: break-word; }
.prose a { color: var(--gold-ink); }

@media (min-width: 620px) {
   /* Keep the article flowing beside the infobox in Firefox as well as Chromium. */
   .article > .toc,
   .article > .cathead,
   .article > details.wiki-section,
   .article > .wb-lfield,
   .article > .wb-taxonomy,
   .article > .article {
      clear: none !important;
   }
}

.wl-plain { font-weight: 600; }
.wl-live { font-weight: 600; color: var(--gold-ink); text-decoration: none; border-bottom: 1px dotted var(--gold-ink); }
.wl-live:hover { text-decoration: none; border-bottom-style: solid; }

/* índice — jumps to each section anchor, sits right after the intro. SEM clear:both de
   propósito: igual a visão geral, deve respeitar a margem da infobox (flutuando ao lado dela)
   em vez de pular pra baixo dela inteira só porque é mais compacto — um clear aqui empurrava
   tudo que vem depois (índice E as seções) pra baixo da infobox mesmo sobrando espaço do lado. */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 4px 0 22px; max-width: 320px; }
.toc-head { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 20px; font-size: 14px; }
.toc li { margin: 3px 0; }
.toc a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--border-strong); }
.toc a:hover { color: var(--gold-ink); }
/* alvo de toque no celular (achado do critique de 2026-09-22: ~22px medido, abaixo de 44px) —
   padding+margem negativa cresce a área clicável sem separar mais os itens visualmente. */
@media (max-width: 619px) {
  .toc a { display: inline-block; padding: 11px 2px; margin: -11px -2px; }
  .toc li { margin: 7px 0; }
}

/* font-weight/family explícitos 2026-09-22: a maioria desses virou <h2> (achado do critique —
   leitor de tela não tinha heading nenhum pra navegar dentro do artigo), então precisa anular
   o negrito/tamanho padrão de h2 do navegador pra manter o visual idêntico a quando era <div>. */
.cathead { font-weight: 400; font-family: var(--font-body); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); border-bottom: 1px solid var(--border); padding-bottom: 5px; margin: 26px 0 10px; scroll-margin-top: 14px; }
.cathead:first-of-type { margin-top: 22px; }

/* seções recolhíveis — <details> nativo, sem JS próprio pra abrir/fechar */
details.wiki-section > summary.cathead { cursor: pointer; scroll-margin-top: 14px; }
details.wiki-section > summary.cathead::marker { color: var(--muted); }
details.wiki-section[open] > summary.cathead { margin-bottom: 10px; }

/* posts — diário datado da entrada, mais recente primeiro */
.posts-wrap { clear: both; margin-top: 8px; }
details.wiki-section.post { border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 10px; }
details.wiki-section.post:last-child { border-bottom: 0; }
.post-summary { cursor: pointer; font-family: var(--font-wb); font-size: 16px; font-weight: 600; color: var(--ink); }
.post-summary::marker { color: var(--muted); }

/* linha do tempo pessoal (aba dentro de Relações) — espinha vertical, cada evento é um nó
   clicável (expande a descrição em markdown, com [[links]] resolvidos quando possível). */
.wb-tl { position: relative; padding-left: 22px; margin: 4px 0; }
.wb-tl::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.wb-tl-item { position: relative; margin-bottom: 4px; }
.wb-tl-head {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  background: none; border: 0; padding: 8px 6px; cursor: pointer; font: inherit; color: inherit; border-radius: 4px;
}
.wb-tl-head:hover { background: var(--accent-wash); }
.wb-tl-dot { position: absolute; left: -22px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.wb-tl-item.major .wb-tl-dot { background: var(--gold); width: 11px; height: 11px; left: -23px; }
.wb-tl-date { font-family: var(--font-wb); font-size: 12.5px; color: var(--faint); white-space: nowrap; flex: none; min-width: 76px; }
.wb-tl-label { font-family: var(--font-wb); font-size: 16px; }
.wb-tl-item.major .wb-tl-label { font-weight: 600; }
.wb-tl-item.major .wb-tl-date { color: var(--gold-ink); }
.wb-tl-head::after { content: "▸"; margin-left: auto; color: var(--faint); font-size: 11px; transition: transform .15s; }
.wb-tl-head.open::after { transform: rotate(90deg); }
.wb-tl-body { padding: 2px 6px 12px 96px; }
.wb-tl-body .prose { font-size: 14.5px; }
.wb-tl-body .prose p { margin: 0 0 8px; }
.wb-tl-empty { font-size: 13px; color: var(--faint); font-style: italic; }
@media (max-width: 480px) { .wb-tl-body { padding-left: 6px; } }

/* galeria — agrupada por rótulo (ex: temporadas), dentro da aba própria */
.gal-grouphead { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-ink); font-weight: 600; margin: 16px 0 8px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gal-item { margin: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gal-item img { width: 100%; height: 130px; object-fit: contain; display: block; cursor: zoom-in; }
.gal-item figcaption { font-size: 11.5px; color: var(--muted); padding: 5px 8px; }
.wb-lightbox { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--bg-deep) 88%, transparent); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; animation: wb-lightbox-in .12s ease; }
.wb-lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); }
@keyframes wb-lightbox-in { from { opacity: 0; } to { opacity: 1; } }

/* citações — aba própria, agrupada por "obra" igual à galeria */
.cit-list { display: flex; flex-direction: column; gap: 14px; }
.cit-item { padding: 2px 16px; border-left: 3px solid var(--gold); }
.cit-text { font-family: var(--font-wb); font-style: italic; font-size: 16.5px; line-height: 1.5; }
.cit-meta { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.cit-meta a { color: var(--gold-ink); }

dl.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; clear: both; }
dl.fields dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
dl.fields dd { margin: 2px 0 0; font-family: var(--font-wb); font-size: 16px; }
@media (max-width: 480px) { dl.fields { grid-template-columns: 1fr; } }

.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; clear: both; }
.tag { font-size: 11px; color: var(--gold-ink); background: var(--accent-wash); padding: 3px 9px; border-radius: 4px; border: 1px solid var(--border); text-decoration: none; }
a.tag:hover { border-color: var(--gold); }

/* árvore genealógica + grafo de relações — SVGs estáticos (sem física/drag, ao contrário do
   equivalente no app), texto com halo pra ficar legível mesmo quando uma linha passa por baixo */
.wb-famtree-wrap, .wb-relgraph-wrap { overflow-x: auto; margin: 6px 0 4px; }
.wb-famtree text.wb-ft-label, .wb-relgraph text.wb-rg-node-label { font-family: var(--font-wb); font-size: 12px; fill: var(--ink); text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.wb-relgraph text.wb-rg-self { font-weight: 600; }
.wb-relgraph text.wb-rg-edge-label { font-family: var(--font-body); font-size: 9px; fill: var(--faint); text-anchor: middle; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }

/* ligações — navegação real entre páginas publicadas (só aparece o que também é público) */
.links-wrap { clear: both; margin-top: 8px; }
.links-subhead { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin: 16px 0 8px; }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.link-card { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; text-decoration: none; color: inherit; overflow: hidden; }
.link-card:hover { border-color: var(--gold); }
.link-card-cover { display: block; width: calc(100% + 24px); margin: -8px -12px 8px; height: 90px; object-fit: cover; }
.link-card-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.link-card-title { font-family: var(--font-wb); font-weight: 600; font-size: 15px; color: var(--gold-ink); }

.md-spoiler { background: var(--ink); color: transparent; border-radius: 3px; cursor: pointer; padding: 0 2px; }
.md-spoiler.on { background: var(--accent-wash); color: inherit; cursor: text; }
.spoiler-block { border: 1px dashed var(--gold); border-radius: var(--radius); margin: 10px 0; }
.spoiler-block.revealed { border-style: solid; padding: 12px 14px; }
.spoiler-reveal { width: 100%; text-align: left; background: color-mix(in srgb, var(--gold) 10%, transparent); border: 0; border-radius: var(--radius); color: var(--gold-ink); font-style: italic; font-family: var(--font-body); font-size: 14px; padding: 10px 12px; cursor: pointer; }

/* login (só pra desbloquear conteúdo "visível apenas para") */
.login-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
/* padding bumpado 2026-09-22 (era 5px 11px): alvo de toque medido em ~31px de altura,
   abaixo do mínimo recomendado de 44px — afeta "entrar" e "sair". */
.login-bar a, .login-bar button.linklike { display: inline-flex; align-items: center; color: var(--gold-ink); background: var(--accent-wash); border: 1px solid var(--border-strong); padding: 12px 14px; border-radius: 999px; font: inherit; font-size: 12px; cursor: pointer; text-decoration: none; }
.login-bar a:hover, .login-bar button.linklike:hover { background: var(--gold); color: var(--paper); border-color: var(--gold); }
.restrito-wrap:not(:empty) { clear: both; margin-top: 12px; }
/* campo com versão confidencial trocada no lugar (ver data-field-swap/mountRestrito) — só um
   sinal discreto pra quem tem acesso saber que está vendo a versão especial, não a pública. */
.wb-conf-swapped { border-left: 3px solid var(--gold); padding-left: 10px; }
.wb-conf-swapped::before { content: "🔐 versão confidencial"; display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-ink); margin-bottom: 4px; }
.login-modal { position: fixed; inset: 0; background: rgba(20,16,10,0.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.login-box { background: var(--paper); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 20px; width: 100%; max-width: 320px; box-shadow: var(--shadow); }
.login-box h3 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 500; }
.field-label { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin: 10px 0 4px; }
.field-label:first-of-type { margin-top: 2px; }
.login-box input { width: 100%; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 14px; }
.login-box textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 14px; min-height: 90px; resize: vertical; }
/* Botão "cheio" reaproveita a MESMA linguagem visual do resto da wiki (pill dourado, ver
   .login-bar/.tag-chip) — antes usava --ink/--paper diretamente, que no tema Paradise Gate
   escuro inverte pra um botão claro sobre fundo escuro, destoando de tudo ao redor. */
.login-box button.submit { width: 100%; padding: 9px; background: var(--accent-wash); color: var(--gold-ink); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; font-weight: 600; font-family: var(--font-body); transition: background .15s, color .15s, border-color .15s; }
.login-box button.submit:hover { background: var(--gold); color: var(--paper); border-color: var(--gold); }
.login-box button.submit:disabled { opacity: 0.6; cursor: default; }
.login-box .err { color: var(--warn); font-size: 12.5px; margin: 4px 0 8px; }
.login-box .cancel { display: block; text-align: center; margin-top: 10px; color: var(--faint); background: none; border: 0; cursor: pointer; font-size: 12.5px; }

/* página inicial da wiki */
.home-title { font-family: var(--font-display); font-size: 40px; font-weight: 500; text-align: center; margin: 10px 0 2px; }
.home-sub { text-align: center; color: var(--muted); font-style: italic; margin: 0 0 20px; }
.home-search { display: block; width: 100%; max-width: 460px; margin: 0 auto 10px; padding: 11px 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 15px; }
/* padding bumpado 2026-09-22 (era 7px 16px): alvo de toque medido em ~29–36px de altura nos 3
   usos (ver mais novidades / página aleatória / linha do tempo completa), abaixo de 44px. */
.home-random { display: block; margin: 0 auto 26px; background: none; border: 1px solid var(--border-strong); border-radius: 999px; padding: 13px 18px; color: var(--gold-ink); font-family: var(--font-body); font-size: 12.5px; cursor: pointer; }
.home-random:hover { background: var(--accent-wash); }
/* Paradise Gate home only: cabeçalho compacto (marca+busca dentro do .site-header), tira de
   estatísticas e nuvem de tags — ver renderHome em wiki-core.js. Tudo dentro do mesmo .card
   cream de sempre, então reaproveita os tokens normais (--ink/--gold-ink/--border), nada
   novo precisa ser definido. */
/* Marca ampliada (era 17px) — o cabeçalho continua numa linha só (altura intacta, achado do
   critique de que um bloco alto empurrava o feed pra baixo da dobra segue valendo), só a marca
   ganha mais presença: maior, com uma friagem em degradê no cabeçalho que ecoa o motivo "carta
   lacrada" (envelope azul-marinho + papel) já usado no resto da página, em vez de textão liso.
   /impeccable bolder 2026-09-23. */
.site-header { background: linear-gradient(135deg, var(--surface), var(--accent-wash)); }
.site-header .brand { font-family: var(--font-display); font-size: 23px; font-weight: 600; flex: none; }
/* padding+margin compensados 2026-09-22: alvo de toque da logo media ~23px de altura; isto
   cresce a área clicável sem mudar o tamanho visual (o negativo cancela o padding). */
.site-header .brand a { display: inline-block; padding: 10.5px 0; margin: -10.5px 0; color: var(--gold-ink); text-decoration: none; letter-spacing: 0.03em; }
@media (max-width: 480px) { .site-header .brand { font-size: 19px; } }
.header-search { flex: 1 1 200px; min-width: 0; max-width: none; margin: 0; padding: 8px 15px; font-size: 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tag-chip { font-size: 12px; color: var(--gold-ink); background: var(--accent-wash); border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; text-decoration: none; }
.tag-chip:hover { border-color: var(--gold); }

/* Lista de eventos do Ano em foco (home do Paradise Gate) */
.spotlight-year-list { margin-top: 8px; display: flex; flex-direction: column; min-height: 0; }
.spotlight-year-list .timeline-event { padding: 5px 2px; }
.spotlight-year-list .timeline-event:not(:last-child) .ev-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spotlight-year-list .timeline-event:last-child .ev-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Home do Paradise Gate (redesenho 2026-09-23, /impeccable) =====
   Direção pedida pelo autor: "wiki de fandom com identidade visual própria — sutil, mas não
   genérica". Estrutura de portal de wiki (cabeçalho azul-noite + faixa azul "Hoje em Paradise
   Gate" + corpo em duas colunas com coluna lateral), azul dominante, e a identidade só em
   detalhes: poeira de estrelas estática, estrela de quatro pontas como marcador, a carta de
   tarô do Personagem do dia (numeral romano do dia, borda dourada fina) e um lugar reservado
   pro selo da marca (.pg-seal — trocar o conteúdo por um <img> quando o selo existir).
   Identidade (tokens, cabeçalho, menu, foco, rodapé) em body.pg-site, posta por buildPgMast em
   toda página PG; layout só da home em body.pg-home. O Ursprung não muda. Ouro (--pg-gold) só em bordas finas e foco. */
body.pg-site {
  --pg-night: #0b1a3f; --pg-band: #132c6e; --pg-card-back: #0d1f4f;
  --pg-page: #f2f4f9; --pg-panel: #ffffff; --pg-line: #dce2ee; --pg-line-strong: #b7c2d9;
  --pg-ink: #121a2c; --pg-muted: #4d5870; --pg-link: #1f4fc4; --pg-link-hover: #163b96; --pg-link-wash: rgba(31,79,196,0.08);
  --pg-gold: #c9a45c; --pg-gold-soft: rgba(201,164,92,0.55);
  --pg-on-dark: #eef2fb; --pg-on-dark-muted: #b9c8ec;
  --pg-f-title: "Castoro Titling", "Castoro", Georgia, serif;
  --pg-f-serif: "Castoro", Georgia, serif;
  --pg-f-ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pg-stars:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.75) 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 71%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 63% 31%, rgba(255,255,255,0.65) 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 62%, rgba(255,255,255,0.45) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 13%, rgba(255,255,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 89%, rgba(255,255,255,0.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 51% 52%, rgba(243,230,196,0.5) 50%, transparent 51%);
  --pg-card-shadow: 0 1px 2px rgba(18,26,44,0.05), 0 14px 32px -22px rgba(18,26,44,0.28);
  background: var(--pg-page); color: var(--pg-ink); font-family: var(--pg-f-ui); padding: 0;
  scrollbar-color: var(--pg-line-strong) var(--pg-page);
}
@media (prefers-color-scheme: dark) {
  body.pg-site .pg-sug-status.is-ok { background: rgba(110,200,150,0.14); color: #8fd6ab; }
  body.pg-site {
    --pg-night: #070f26; --pg-band: #0f2358; --pg-card-back: #0b1a44;
    --pg-page: #0a1226; --pg-panel: #0f1a33; --pg-line: #1f2d52; --pg-line-strong: #33487c;
    --pg-ink: #e4e9f4; --pg-muted: #a3aec6; --pg-link: #93b2f5; --pg-link-hover: #bccefa; --pg-link-wash: rgba(147,178,245,0.1);
    --pg-card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 16px 34px -22px rgba(0,0,0,0.7);
  }
}
body.pg-site ::selection { background: #c9d7f7; color: #0b1a3f; }
body.pg-site :focus-visible { outline: 2px solid var(--pg-link); outline-offset: 3px; }
body.pg-site .pg-mast :focus-visible, body.pg-site .pg-today :focus-visible { outline-color: var(--pg-gold); }
body.pg-site .page { max-width: none; }
body.pg-site a { text-underline-offset: 3px; }

/* cabeçalho: lugar do selo + marca, busca larga, entrar */
body.pg-site .pg-mast { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; display: block; color: var(--pg-on-dark); background-color: var(--pg-night); background-image: var(--pg-stars); background-size: 260px 170px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pg-mast-inner { max-width: 1160px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
body.pg-site .pg-mast .brand { flex: none; font-size: inherit; }
body.pg-site .pg-mast .brand a { display: flex; align-items: center; gap: 12px; padding: 4px 0; margin: 0; color: #fff; text-decoration: none; letter-spacing: 0; }
.pg-seal { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--pg-gold-soft); color: var(--pg-gold); background: rgba(255,255,255,0.04); }
.pg-seal-star { width: 18px; height: 18px; }
.pg-wordmark { font-family: var(--pg-f-title); font-size: 22px; letter-spacing: 0.07em; line-height: 1; }
.pg-search-wrap { position: relative; flex: 1 1 300px; min-width: 0; max-width: 560px; margin: 0 auto; }
.pg-search-icon { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--pg-on-dark-muted); pointer-events: none; }
body.pg-site .header-search { display: block; width: 100%; max-width: none; margin: 0; padding: 12px 18px 12px 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff; font-family: var(--pg-f-ui); font-size: 15px; caret-color: var(--pg-gold); transition: border-color 0.2s ease-out, background-color 0.2s ease-out; }
body.pg-site .header-search::placeholder { color: #aebbdc; opacity: 1; }
body.pg-site .header-search:hover { border-color: rgba(255,255,255,0.32); }
body.pg-site .header-search:focus { outline: none; border-color: var(--pg-gold); background: rgba(255,255,255,0.12); }
body.pg-site .pg-mast .login-bar { color: var(--pg-on-dark-muted); font-size: 13px; }
body.pg-site .pg-mast .login-bar a, body.pg-site .pg-mast .login-bar button.linklike { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.24); padding: 11px 16px; font-family: var(--pg-f-ui); font-size: 13.5px; font-weight: 500; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
body.pg-site .pg-mast .login-bar a:hover, body.pg-site .pg-mast .login-bar button.linklike:hover { background: rgba(255,255,255,0.1); border-color: var(--pg-gold); color: #fff; }
/* Entrar (deslogado) e menu da conta (logado) — ver pgAccountMenu em wiki-core.js */
.pg-signin { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border-radius: 999px; border: 1px solid var(--pg-gold-soft); background: rgba(201,164,92,0.1); color: #f3e6c4; font-family: var(--pg-f-ui); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease-out, border-color 0.2s ease-out, color 0.2s ease-out; }
.pg-signin:hover { background: var(--pg-gold); border-color: var(--pg-gold); color: #1d1606; }
.pg-user-icon { width: 18px; height: 18px; flex: none; }
.pg-signin { min-height: 44px; }
.pg-signin-light { margin-top: 14px; background: transparent; border-color: var(--pg-link); color: var(--pg-link); }
.pg-signin-light:hover { background: var(--pg-link-wash); border-color: var(--pg-link); color: var(--pg-link); }
.pg-account { position: relative; }
.pg-avatar-btn { display: block; padding: 3px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.pg-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background-color: var(--pg-card-back); background-image: var(--pg-stars); background-size: 90px 70px; box-shadow: inset 0 0 0 1px var(--pg-gold-soft); color: #f3e6c4; font-family: var(--pg-f-title); font-size: 17px; line-height: 1; }
.pg-avatar-btn:hover .pg-avatar, .pg-avatar-btn[aria-expanded="true"] .pg-avatar { box-shadow: inset 0 0 0 1px var(--pg-gold), 0 0 0 3px rgba(201,164,92,0.25); }
.pg-avatar-lg { width: 46px; height: 46px; font-size: 20px; }
.pg-avatar-xl { width: 96px; height: 96px; font-size: 40px; background-size: 140px 110px; }
.pg-menu { position: absolute; z-index: 40; top: calc(100% + 10px); right: 0; width: 280px; padding: 8px; border-radius: 14px; border: 1px solid var(--pg-line); background: var(--pg-panel); color: var(--pg-ink); box-shadow: 0 2px 6px rgba(3,8,24,0.12), 0 24px 50px -20px rgba(3,8,24,0.45); }
.pg-menu[hidden] { display: none; }
.pg-menu-head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; border-bottom: 1px solid var(--pg-line); margin-bottom: 6px; }
.pg-menu-who { display: flex; flex-direction: column; min-width: 0; }
.pg-menu-name { font-family: var(--pg-f-serif); font-size: 17px; line-height: 1.2; }
.pg-menu-email { font-size: 13px; color: var(--pg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-menu-list { display: flex; flex-direction: column; }
.pg-menu-item { display: block; width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--pg-ink); font-family: var(--pg-f-ui); font-size: 14.5px; text-align: left; text-decoration: none; cursor: pointer; }
.pg-menu-item:hover, .pg-menu-item:focus-visible { background: var(--pg-link-wash); color: var(--pg-link); outline-offset: -2px; }
body.pg-site .pg-mast .login-bar .pg-menu-item { display: block; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--pg-ink); font-size: 14.5px; font-weight: 400; }
body.pg-site .pg-mast .login-bar .pg-menu-item:hover, body.pg-site .pg-mast .login-bar .pg-menu-item:focus-visible { background: var(--pg-link-wash); color: var(--pg-link); border: 0; }
.pg-menu-sep { height: 1px; margin: 4px 6px; background: var(--pg-line); }

/* faixa do dia */
.pg-today { position: relative; overflow: hidden; color: var(--pg-on-dark); background-color: var(--pg-band); background-image: var(--pg-stars); background-size: 320px 230px; border-bottom: 1px solid rgba(201,164,92,0.35); }
.pg-constellation { position: absolute; top: 20px; right: max(16px, calc(50% - 570px)); width: 300px; height: auto; color: #a9bff0; opacity: 0.3; pointer-events: none; }
.pg-today-inner { position: relative; max-width: 1160px; margin: 0 auto; padding: 44px 24px 48px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 52px; align-items: start; }
.pg-today-main { min-width: 0; display: flex; flex-direction: column; justify-content: center; align-self: stretch; padding-bottom: 30px; }
.pg-today-main > .pg-tiles { margin-top: 36px; }
.pg-today-head h1 { margin: 0 0 0 -0.075em; font-family: var(--pg-f-title); font-weight: 400; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: 0.04em; color: #fff; text-wrap: balance; }
.pg-today-date { margin: 8px 0 0; font-size: 15.5px; color: var(--pg-on-dark-muted); }
.pg-quote { margin: 32px 0 0; max-width: 60ch; }
.pg-quote-text { margin: 0; font-family: var(--pg-f-serif); font-style: italic; font-size: clamp(24px, 2.9vw, 38px); line-height: 1.3; color: #fff; text-wrap: pretty; }
.pg-quote-text p { margin: 0; text-indent: -0.42em; }
.pg-quote-attr { margin-top: 12px; font-size: 15px; color: var(--pg-on-dark-muted); }
.pg-quote-attr a { display: inline-block; padding: 6px 2px; margin: -6px -2px; color: #fff; text-decoration: underline; text-decoration-color: var(--pg-gold-soft); }
.pg-quote-attr a:hover { text-decoration-color: var(--pg-gold); }
.pg-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pg-tile { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14); color: var(--pg-on-dark); text-decoration: none; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
a.pg-tile:hover { background: rgba(255,255,255,0.12); border-color: var(--pg-gold-soft); }
.pg-tile.is-empty { flex-direction: column; align-items: flex-start; gap: 4px; }
.pg-tile-top { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.pg-tile-img { flex: none; width: 64px; height: 64px; border-radius: 8px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,0.14); }
.pg-tile-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; font-family: var(--pg-f-serif); font-size: 19px; line-height: 1.25; color: #fff; }
.pg-tile-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; color: #d6def2; }
.pg-tile > .pg-caption { margin-top: auto; }
.pg-caption { font-size: 13.5px; line-height: 1.35; color: var(--pg-on-dark-muted); }
.pg-empty { font-style: italic; color: var(--pg-muted); }
.pg-today .pg-empty { color: var(--pg-on-dark-muted); }

/* a carta do dia */
.pg-tarot-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pg-tarot-fig > .pg-caption { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.pg-tarot { position: relative; display: block; width: 100%; max-width: 260px; aspect-ratio: 7 / 11.4; perspective: 1400px; color: inherit; text-decoration: none; border-radius: 14px; transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
a.pg-tarot:hover { transform: translateY(-4px); }
.pg-tarot-inner { position: absolute; inset: 0; transform-style: preserve-3d; animation: pg-card-turn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
@keyframes pg-card-turn { from { transform: rotateY(-180deg); } to { transform: rotateY(0deg); } }
.pg-tarot-face, .pg-tarot-back { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 2px 6px rgba(3,8,24,0.35), 0 30px 60px -26px rgba(3,8,24,0.85); }
.pg-tarot-face { background: var(--pg-night); }
.pg-tarot-face::after, .pg-tarot-back::after { content: ""; position: absolute; inset: 7px; border: 1px solid var(--pg-gold-soft); border-radius: 9px; pointer-events: none; transition: border-color 0.25s ease-out; }
a.pg-tarot:hover .pg-tarot-face::after { border-color: var(--pg-gold); }
.pg-tarot-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pg-tarot-initial { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--pg-f-title); font-size: 92px; line-height: 1; color: #f3e6c4; background-color: var(--pg-card-back); background-image: var(--pg-stars); background-size: 140px 120px; }
.pg-tarot-initial .pg-constellation { top: 18%; right: auto; left: 8%; width: 84%; opacity: 0.45; color: #a9bff0; }
.pg-tarot-initial > span { position: relative; margin-top: -18%; }
.pg-tarot-num { position: absolute; top: 17px; left: 50%; transform: translateX(-50%); padding: 3px 11px 2px; border-radius: 999px; background: rgba(7,15,38,0.66); font-family: var(--pg-f-title); font-size: 15px; letter-spacing: 0.16em; color: #f3e6c4; white-space: nowrap; }
.pg-tarot-num-star { display: block; width: 13px; height: 13px; margin: 2px 0; color: var(--pg-gold); }
.pg-tarot-glyph { display: block; width: 24px; height: 24px; margin: 0 auto 8px; color: var(--pg-gold); }
.pg-tarot-name > span { display: block; }
.pg-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pg-tarot-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 20px 22px; text-align: center; font-family: var(--pg-f-title); font-size: 19px; line-height: 1.2; letter-spacing: 0.08em; color: #fff; background: linear-gradient(to top, rgba(7,15,38,0.95) 32%, rgba(7,15,38,0)); text-wrap: balance; }
.pg-tarot-back { transform: rotateY(180deg); display: grid; place-items: center; color: var(--pg-gold); background-color: var(--pg-card-back); background-image: var(--pg-stars); background-size: 140px 120px; }
.pg-tarot-back-star { width: 46px; height: 46px; opacity: 0.85; }
.pg-tarot.is-empty .pg-tarot-inner { animation: none; }
.pg-tarot.is-empty .pg-tarot-back { transform: none; }
.pg-party-hat { position: absolute; z-index: 2; top: -19px; right: -13px; width: 40px; height: 40px; color: var(--pg-gold); transform: rotate(20deg); filter: drop-shadow(0 2px 4px rgba(3,8,24,0.55)); pointer-events: none; }
@media (max-width: 560px) { .pg-party-hat { width: 32px; height: 32px; top: -15px; right: -10px; } }

/* corpo: feeds + lista à esquerda, coluna lateral à direita */
.pg-body { max-width: 1160px; margin: 0 auto; padding: 40px 24px 8px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "main top" "main bottom" "index index"; grid-template-rows: auto 1fr auto; column-gap: 44px; align-items: start; }
.pg-index { grid-area: index; min-width: 0; margin-top: 48px; }
.pg-index .pg-sec { margin-top: 0; }
.pg-body.is-filtering .pg-rail { display: none; }
.pg-body.is-filtering .pg-index { margin-top: 0; }
.pg-show-all { display: none !important; }
.pg-main { grid-area: main; min-width: 0; }
.pg-rail-top { grid-area: top; }
.pg-rail-bottom { grid-area: bottom; margin-top: 20px; }
.pg-panel { background: var(--pg-panel); border: 1px solid var(--pg-line); border-radius: 14px; padding: 18px 20px 20px; box-shadow: var(--pg-card-shadow); }
.pg-sec { display: flex; align-items: center; gap: 10px; margin: 44px 0 16px; font-family: var(--pg-f-title); font-weight: 400; font-size: 17px; letter-spacing: 0.07em; line-height: 1.2; color: var(--pg-ink); }
.pg-sec::after { content: ""; flex: 1; height: 1px; background: var(--pg-line); }
.pg-panel > .pg-sec:first-child, .pg-main > div:first-child > .pg-sec:first-child { margin-top: 0; }
.pg-sec-star { flex: none; width: 13px; height: 13px; color: var(--pg-link); }
.pg-sec-count { font-family: var(--pg-f-ui); font-size: 13px; letter-spacing: 0; color: var(--pg-muted); font-variant-numeric: tabular-nums; }
.pg-subhead { margin: 20px 0 8px; font-family: var(--pg-f-ui); font-size: 13.5px; font-weight: 600; color: var(--pg-ink); }

/* Ano em foco */
.pg-year-num { display: inline-block; margin: 0 0 6px; font-family: var(--pg-f-title); font-size: 42px; line-height: 1; color: var(--pg-link); text-decoration: none; font-variant-numeric: tabular-nums; }
.pg-year-num:hover { color: var(--pg-link-hover); text-decoration: underline; text-decoration-thickness: 1px; }
body.pg-site .timeline-event { border-radius: 8px; }
body.pg-site .timeline-event:hover { background: var(--pg-link-wash); }
body.pg-site .timeline-event .ev-date { font-family: var(--pg-f-ui); font-size: 12.5px; color: var(--pg-muted); font-variant-numeric: tabular-nums; }
body.pg-site .timeline-event .ev-text { font-family: var(--pg-f-serif); font-size: 16px; color: var(--pg-ink); }
body.pg-site .timeline-event.major .ev-text { font-weight: 400; }

/* Explorar */
.pg-actions { display: flex; flex-direction: column; gap: 8px; }
body.pg-site .home-random { display: flex; align-items: center; justify-content: center; width: 100%; margin: 0; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--pg-line-strong); background: transparent; color: var(--pg-link); font-family: var(--pg-f-ui); font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
body.pg-site .home-random:hover { background: var(--pg-link-wash); border-color: var(--pg-link); }
body.pg-site .pg-main .home-random { display: inline-flex; width: auto; margin-top: 14px !important; }
body.pg-site .tag-cloud { gap: 6px; margin: 0; }
body.pg-site .tag-chip { padding: 7px 12px; border: 0; border-radius: 999px; background: var(--pg-link-wash); color: var(--pg-link); font-size: 13.5px; }
body.pg-site .tag-chip:hover { background: var(--pg-link); color: var(--pg-panel); }
.pg-numbers { margin-top: 20px; }
.pg-num-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--pg-line); }
.pg-num { display: flex; flex-direction: column-reverse; gap: 2px; padding: 14px 4px 12px; border-bottom: 1px solid var(--pg-line); }
.pg-num:nth-child(odd) { border-right: 1px solid var(--pg-line); padding-right: 14px; }
.pg-num:nth-child(even) { padding-left: 16px; }
.pg-num:nth-last-child(-n+2) { border-bottom: 0; padding-bottom: 2px; }
.pg-num-grid.is-odd .pg-num:last-child { grid-column: 1 / -1; border-right: 0; padding-right: 4px; }
.pg-num-grid.is-odd .pg-num:nth-last-child(2) { border-bottom: 1px solid var(--pg-line); padding-bottom: 12px; }
.pg-num dd { margin: 0; font-family: var(--pg-f-title); font-size: 30px; line-height: 1.05; color: var(--pg-ink); font-variant-numeric: tabular-nums; }
.pg-num dt { font-size: 13.5px; color: var(--pg-muted); }

/* Novidades / Notas recentes: cartões com capa em retrato */
body.pg-home .links-grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 14px; }
body.pg-home .link-card { padding: 0; gap: 0; border-radius: 12px; background: var(--pg-panel); border: 1px solid var(--pg-line); box-shadow: var(--pg-card-shadow); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease-out; }
body.pg-home .link-card:hover { transform: translateY(-3px); border-color: var(--pg-line-strong); }
body.pg-home .link-card-cover, body.pg-home .home-card-cover { background: var(--pg-line); }
body.pg-home .link-card-cover, body.pg-home .link-card .pg-nocover { order: 0; display: grid; width: 100%; height: auto; margin: 0; aspect-ratio: 4 / 5; object-fit: cover; }
body.pg-home .link-card-title { order: 1; padding: 11px 13px 2px; font-family: var(--pg-f-serif); font-weight: 400; font-size: 17px; line-height: 1.25; color: var(--pg-ink); }
body.pg-home .link-card-label > span { display: block; }
body.pg-home .pg-notes-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
body.pg-home .pg-note-card .link-card-cover { aspect-ratio: 16 / 9; }
body.pg-home .pg-note-card .link-card-title { padding-top: 13px; }
body.pg-home .link-card-excerpt { order: 2; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 4px 13px 2px; font-size: 13.5px; line-height: 1.45; color: var(--pg-muted); }
body.pg-home .link-card-label { order: 3; padding: 0 13px 12px; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--pg-muted); font-variant-numeric: tabular-nums; }
.pg-nocover { display: grid; place-items: center; background-color: var(--pg-band); background-image: var(--pg-stars); background-size: 140px 120px; color: rgba(201,164,92,0.75); font-family: var(--pg-f-title); font-size: 44px; line-height: 1; }

/* Todas as páginas: filtros + lista compacta (miniatura + nome + tipo) */
body.pg-home .type-chips { gap: 6px; margin: 0 0 10px; }
body.pg-home .type-chips + .home-groups, body.pg-home .tag-chips { margin-bottom: 18px; }
body.pg-site .work-tab { min-height: 44px; padding: 9px 16px; border: 1px solid var(--pg-line-strong); border-radius: 999px; background: var(--pg-panel); color: var(--pg-muted); font-family: var(--pg-f-ui); font-size: 13.5px; font-weight: 500; transition: color 0.2s ease-out, border-color 0.2s ease-out; }
body.pg-site .work-tab:hover:not(.on) { color: var(--pg-ink); border-color: var(--pg-link); }
body.pg-site .work-tab.on { background: var(--pg-link); border-color: var(--pg-link); color: var(--pg-panel); font-weight: 600; }
body.pg-home .home-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 0 24px; padding: 6px 18px; background: var(--pg-panel); border: 1px solid var(--pg-line); border-radius: 14px; box-shadow: var(--pg-card-shadow); }
body.pg-home .home-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-items: center; align-content: center; margin: 0 -8px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--pg-line); border-radius: 0; background: transparent; box-shadow: none; transition: background-color 0.2s ease-out; }
body.pg-home .home-card:hover { transform: none; background: var(--pg-link-wash); }
body.pg-home .home-card:hover .home-card-title { color: var(--pg-link); }
body.pg-home .home-card-cover, body.pg-home .home-card .pg-nocover { grid-row: 1 / span 3; width: 44px; height: 44px; margin: 0; border-radius: 8px; object-fit: cover; font-size: 20px; }
body.pg-home .home-card-title { font-family: var(--pg-f-serif); font-weight: 400; font-size: 16.5px; line-height: 1.25; color: var(--pg-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.pg-home .home-card-meta { margin-top: 1px; font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--pg-muted); }
body.pg-home .home-card .pg-nocover { background-image: none; }
body.pg-home .home-card-snippet { grid-column: 2; font-size: 13px; color: var(--pg-muted); }
body.pg-home .pg-main .empty, body.pg-home .pg-index .empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 36px 20px; color: var(--pg-muted); }
body.pg-home .pg-index .pg-clear, body.pg-home .pg-index .pg-show-all { width: auto; margin: 0; }

/* Perfil do leitor (/wiki/_perfil) — casca visual; ver renderProfile */
.pg-profile { max-width: 820px; margin: 0 auto; padding: 44px 24px 8px; display: flex; flex-direction: column; gap: 20px; }
.pg-profile-title { margin: 0 0 4px; font-family: var(--pg-f-title); font-weight: 400; font-size: clamp(28px, 3vw, 36px); letter-spacing: 0.04em; color: var(--pg-ink); }
.pg-profile-empty p { margin: 0; color: var(--pg-muted); font-size: 15px; }
.pg-profile-row { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.pg-profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pg-profile-fields { flex: 1 1 280px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pg-field { display: flex; flex-direction: column; gap: 6px; }
.pg-field-label { font-size: 13.5px; font-weight: 600; color: var(--pg-ink); }
.pg-field input { padding: 11px 14px; border-radius: 10px; border: 1px solid var(--pg-line-strong); background: var(--pg-page); color: var(--pg-ink); font-family: var(--pg-f-ui); font-size: 15px; }
.pg-field input:disabled { cursor: not-allowed; }
.pg-field input::placeholder { color: var(--pg-muted); opacity: 1; }
.pg-field-value { font-size: 15px; color: var(--pg-ink); overflow-wrap: anywhere; }
.pg-profile-note { margin: 0; font-size: 13.5px; font-style: italic; color: var(--pg-muted); }
.pg-sug-list { display: flex; flex-direction: column; }
.pg-sug { padding: 16px 0; border-bottom: 1px solid var(--pg-line); }
.pg-sug:first-child { padding-top: 4px; }
.pg-sug:last-child { border-bottom: 0; padding-bottom: 0; }
.pg-sug-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-sug-page { font-family: var(--pg-f-serif); font-size: 17px; color: var(--pg-link); text-decoration: none; }
a.pg-sug-page:hover { text-decoration: underline; }
.pg-sug-status { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--pg-link-wash); color: var(--pg-link); }
.pg-sug-status.is-ok { background: rgba(46,125,82,0.12); color: #235f3f; }
.pg-sug-status.is-no { background: rgba(120,120,135,0.14); color: var(--pg-muted); }
.pg-sug-meta { margin-top: 2px; font-size: 13px; color: var(--pg-muted); }
.pg-sug-text { margin: 8px 0 10px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.pg-sug-reply { padding: 10px 14px; border-radius: 10px; background: var(--pg-page); border: 1px solid var(--pg-line); font-size: 14.5px; }
.pg-sug-reply p { margin: 4px 0 0; white-space: pre-wrap; }
.pg-sug-reply-label { font-size: 13px; font-weight: 600; color: var(--pg-ink); }
.pg-sug-none { margin: 0; font-size: 14px; font-style: italic; color: var(--pg-muted); }
.pg-foot { max-width: 1160px; margin: 36px auto 0; padding: 26px 24px 44px; display: flex; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid var(--pg-line); font-family: var(--pg-f-title); font-size: 14px; letter-spacing: 0.08em; color: var(--pg-muted); }
.pg-foot-star { width: 12px; height: 12px; color: var(--pg-gold); }

@media (max-width: 860px) {
  .pg-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "top" "bottom" "index"; grid-template-rows: auto; padding: 28px 16px 8px; }
  .pg-main:not(:empty) + .pg-rail-top { margin-top: 40px; }
  .pg-rail-top { margin-top: 0; }
  .pg-rail-bottom { margin-top: 20px; }
  .pg-index { margin-top: 40px; }
}
@media (max-width: 760px) {
  .pg-mast-inner { padding: 10px 16px 12px; gap: 10px 12px; }
  body.pg-site .pg-mast .brand { flex: 1 1 auto; order: 1; }
  body.pg-site .pg-mast .login-bar { order: 2; }
  .pg-search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .pg-today-inner { display: flex; flex-direction: column; align-items: stretch; gap: 26px; padding: 30px 16px 34px; }
  .pg-capped .home-card:nth-child(n+13) { display: none; }
  .pg-show-all { display: inline-flex !important; margin-top: 14px !important; }
  .pg-today-main { display: contents; }
  .pg-today-head { order: 1; }
  .pg-tarot-fig { order: 2; align-self: center; width: 100%; }
  .pg-tarot { max-width: 230px; }
  .pg-quote { order: 3; margin: 0; }
  .pg-tiles, .pg-today-main > .pg-tiles { order: 4; margin: 0; padding-top: 0; }
  .pg-constellation { width: 190px; top: 12px; opacity: 0.22; }
}
@media (max-width: 560px) {
  .pg-tiles { grid-template-columns: minmax(0, 1fr); }
  .pg-profile { padding: 28px 16px 8px; }
  .pg-menu { position: fixed; top: 64px; left: 12px; right: 12px; width: auto; }
  .pg-wordmark { font-size: 19px; }
  .pg-seal { width: 36px; height: 36px; }
  .pg-tarot { max-width: 200px; }
  .pg-tarot-initial { font-size: 72px; }
  body.pg-home .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.pg-home .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pg-tarot-inner { animation: none; }
  .pg-tarot, body.pg-home .link-card, .pg-tile, body.pg-site .header-search { transition: none; }
  a.pg-tarot:hover, body.pg-home .link-card:hover { transform: none; }
}

/* linha do tempo geral (/wiki/_timeline) */
.timeline-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 20px; }
.timeline-filters select, .timeline-filters input[type="number"] { padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--font-body); font-size: 13px; }
.timeline-major-lbl { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); cursor: pointer; }
.timeline-year { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--gold-ink); margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.timeline-year:first-child { margin-top: 0; }
.timeline-event { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 7px 4px; text-decoration: none; color: inherit; border-radius: 4px; }
.timeline-event:hover { background: var(--accent-wash); }
.timeline-event.major .ev-text { font-weight: 600; }
.timeline-event .ev-date { font-family: var(--font-wb); font-size: 12px; color: var(--faint); white-space: nowrap; min-width: 70px; }
.timeline-event .ev-text { font-family: var(--font-wb); font-size: 15.5px; flex: 1; min-width: 120px; }
.timeline-event .ev-origin { font-size: 11.5px; color: var(--faint); font-style: italic; white-space: nowrap; }

.home-unihead { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--gold-ink); font-weight: 600; margin: 26px 0 10px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.home-unihead:first-child { margin-top: 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.home-card { display: block; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .1s, border-color .1s; overflow: hidden; }
.home-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.home-card-cover { display: block; width: calc(100% + 28px); margin: -12px -14px 10px; height: 130px; object-fit: cover; }
.home-card-title { font-family: var(--font-wb); font-weight: 600; font-size: 15.5px; }
.home-card-meta { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; }
.home-card-snippet { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.35; }

.foot { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 26px; clear: both; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.back-home-link { display: block; text-align: center; margin-top: -30px; padding-bottom: 30px; color: var(--gold-ink); font-size: 13.5px; text-decoration: none; }
.back-home-link:hover { text-decoration: underline; }
html { scroll-behavior: smooth; }

@media print {
  body { background: #fff; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .site-header, .toc, .home-search, .home-random, .foot, .infobox-tabs, .spoiler-reveal { display: none; }
  .infobox { float: none; width: 100%; page-break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .spoiler-block:not(.revealed) { display: none; }
}

/* ===== Páginas internas do Paradise Gate (entrada, temporada, linha do tempo, erro) =====
   Mesma identidade da home (2026-09-23, pedido do autor): cabeçalho azul-noite, página clara
   (escura no tema escuro), artigo num painel com fio fino, Castoro/Hanken. Os componentes
   antigos (infobox, abas, seções, galeria, árvore, grafo, linha do tempo, sugestões) leem os
   tokens antigos — aqui eles são remapeados pros --pg-*, e só o que muda de forma ganha regra
   própria. Escopo body.pg-site:not(.pg-home): a home e o Ursprung não mudam. */
body.pg-site:not(.pg-home) {
  --bg: var(--pg-page); --bg-deep: var(--pg-night);
  --paper: var(--pg-panel); --surface: var(--pg-panel); --surface-2: var(--pg-page);
  --border: var(--pg-line); --border-strong: var(--pg-line-strong);
  --ink: var(--pg-ink); --muted: var(--pg-muted); --faint: var(--pg-muted);
  --gold: var(--pg-link); --gold-ink: var(--pg-link); --accent-wash: var(--pg-link-wash);
  --shadow: var(--pg-card-shadow); --shadow-lift: 0 24px 60px -20px rgba(3,8,24,0.6);
  --radius: 12px; --radius-sm: 8px;
  --font-body: var(--pg-f-ui); --font-display: var(--pg-f-serif); --font-wb: var(--pg-f-serif);
}
body.pg-site:not(.pg-home) .pg-page-main > .card { max-width: 1100px; margin: 32px auto 0; padding: 34px 44px 40px; border-radius: 14px; border: 1px solid var(--pg-line); background: var(--pg-panel); box-shadow: var(--pg-card-shadow); }
body.pg-site:not(.pg-home) .card > h1 { margin: 0; font-family: var(--pg-f-serif); font-weight: 400; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.15; letter-spacing: 0; color: var(--pg-ink); text-wrap: balance; }
.pg-entry-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 10px 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--pg-line); }
.pg-entry-type { font-size: 15px; color: var(--pg-muted); }
.pg-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pg-entry-actions .linklike { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--pg-line-strong); background: transparent; color: var(--pg-link); font-family: var(--pg-f-ui); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
.pg-entry-actions .linklike:hover { background: var(--pg-link-wash); border-color: var(--pg-link); }
.pg-entry-actions [hidden] { display: none; }
body.pg-site:not(.pg-home) .crumb { margin-bottom: 10px; font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .crumb a { color: var(--pg-link); }

/* títulos de seção: estrela + Castoro Titling + fio, igual aos da home */
body.pg-site:not(.pg-home) .cathead { display: flex; align-items: center; gap: 10px; margin: 34px 0 14px; padding-bottom: 9px; font-family: var(--pg-f-title); font-size: 17px; font-weight: 400; letter-spacing: 0.07em; text-transform: none; color: var(--pg-ink); border-bottom: 1px solid var(--pg-line); scroll-margin-top: 16px; }
body.pg-site:not(.pg-home) .cathead::before { content: ""; flex: none; width: 12px; height: 12px; background: var(--pg-link); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.9 6.1 3.4 8.6 10.5 10.5-7.1 1.9-9.6 4.4-10.5 10.5-.9-6.1-3.4-8.6-10.5-10.5C8.6 10.1 11.1 7.6 12 1.5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.9 6.1 3.4 8.6 10.5 10.5-7.1 1.9-9.6 4.4-10.5 10.5-.9-6.1-3.4-8.6-10.5-10.5C8.6 10.1 11.1 7.6 12 1.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
body.pg-site:not(.pg-home) details.wiki-section > summary.cathead { list-style: none; }
body.pg-site:not(.pg-home) details.wiki-section > summary.cathead::-webkit-details-marker { display: none; }
body.pg-site:not(.pg-home) details.wiki-section > summary.cathead::after { content: ""; flex: none; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--pg-muted); border-bottom: 1.5px solid var(--pg-muted); transform: rotate(-45deg); transition: transform 0.2s ease-out; }
body.pg-site:not(.pg-home) details.wiki-section[open] > summary.cathead::after { transform: rotate(45deg); }
body.pg-site:not(.pg-home) details.wiki-section.post > summary.post-summary { font-family: var(--pg-f-serif); font-size: 18px; font-weight: 400; }

/* texto */
body.pg-site:not(.pg-home) .prose { font-size: 17.5px; line-height: 1.72; color: var(--pg-ink); }
body.pg-site:not(.pg-home) .summary { font-size: 19px; line-height: 1.55; }
body.pg-site:not(.pg-home) .prose a, body.pg-site:not(.pg-home) .wl-live { color: var(--pg-link); }
body.pg-site:not(.pg-home) .prose blockquote, body.pg-site:not(.pg-home) .cit-item { border-left-color: var(--pg-gold); }
body.pg-site:not(.pg-home) .toc { background: var(--pg-page); border-color: var(--pg-line); border-radius: 10px; padding: 14px 18px; }
body.pg-site:not(.pg-home) .toc-head { font-size: 12.5px; letter-spacing: 0.06em; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .toc a { color: var(--pg-link); border-bottom: 0; }
body.pg-site:not(.pg-home) .toc a:hover { text-decoration: underline; }
body.pg-site:not(.pg-home) .cit-text { font-size: 18px; }
body.pg-site:not(.pg-home) .cit-meta a { color: var(--pg-link); }

/* infobox: faixa de título azul (estilo Fandom), linhas com fio fino, rótulos em Hanken */
body.pg-site:not(.pg-home) .infobox { border: 1px solid var(--pg-line); border-radius: 12px; background: var(--pg-panel); box-shadow: var(--pg-card-shadow); }
@media (min-width: 620px) { body.pg-site:not(.pg-home) .infobox { width: 290px; margin: 0 0 20px 32px; } }
.pg-infobox-title { padding: 14px 16px 13px; text-align: center; font-family: var(--pg-f-title); font-size: 17px; line-height: 1.25; letter-spacing: 0.07em; color: #fff; background-color: var(--pg-band); background-image: var(--pg-stars); background-size: 260px 170px; border-bottom: 1px solid rgba(201,164,92,0.45); text-wrap: balance; }
body.pg-site:not(.pg-home) .infobox-quote { padding: 12px 16px; font-size: 14.5px; color: var(--pg-muted); background: var(--pg-page); border-bottom-color: var(--pg-line); }
body.pg-site:not(.pg-home) .infobox .cover { max-height: 360px; }
body.pg-site:not(.pg-home) .infobox-tab { min-height: 40px; padding: 8px 6px; font-size: 12.5px; text-transform: none; letter-spacing: 0; background: var(--pg-page); }
body.pg-site:not(.pg-home) .infobox-tab.on { color: var(--pg-link); border-bottom-color: var(--pg-link); background: var(--pg-panel); font-weight: 600; }
body.pg-site:not(.pg-home) .infobox-facts th, body.pg-site:not(.pg-home) .infobox-facts td { padding: 9px 14px; }
body.pg-site:not(.pg-home) .infobox-facts th { font-size: 12.5px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .infobox-facts td { font-size: 15px; line-height: 1.45; color: var(--pg-ink); }
body.pg-site:not(.pg-home) .infobox-header-row th { padding: 8px 14px; text-align: center; font-family: var(--pg-f-title); font-size: 13px; font-weight: 400; letter-spacing: 0.08em; color: var(--pg-ink); background: var(--pg-link-wash); }
body.pg-site:not(.pg-home) .infobox-expand { min-height: 44px; font-family: var(--pg-f-ui); font-size: 13px; color: var(--pg-link); background: var(--pg-page); }

/* abas de variante, tags, galeria, ligações */
body.pg-site:not(.pg-home) .work-tabs { gap: 6px; margin: 4px 0 22px; }
body.pg-site:not(.pg-home) .tags { gap: 6px; margin-top: 30px; }
body.pg-site:not(.pg-home) .tag { padding: 7px 12px; border: 0; border-radius: 999px; background: var(--pg-link-wash); color: var(--pg-link); font-size: 13px; }
body.pg-site:not(.pg-home) a.tag:hover { background: var(--pg-link); color: var(--pg-panel); }
body.pg-site:not(.pg-home) .gal-grouphead, body.pg-site:not(.pg-home) .links-subhead { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .gal-item { border-color: var(--pg-line); border-radius: 10px; background: var(--pg-page); }
body.pg-site:not(.pg-home) .gal-item figcaption { font-size: 12.5px; }
body.pg-site:not(.pg-home) .link-card { border-radius: 10px; padding: 10px 14px; transition: border-color 0.2s ease-out; }
body.pg-site:not(.pg-home) .link-card:hover { border-color: var(--pg-link); }
body.pg-site:not(.pg-home) .link-card-cover { width: calc(100% + 28px); margin: -10px -14px 10px; height: 110px; }
body.pg-site:not(.pg-home) .link-card-label { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .link-card-title { font-weight: 400; font-size: 16.5px; color: var(--pg-ink); }
body.pg-site:not(.pg-home) .spoiler-reveal { font-family: var(--pg-f-ui); }

/* linha do tempo geral e mensagem de erro */
body.pg-site:not(.pg-home) .timeline-filters select, body.pg-site:not(.pg-home) .timeline-filters input[type="number"] { min-height: 44px; padding: 9px 16px; font-family: var(--pg-f-ui); font-size: 14px; }
body.pg-site:not(.pg-home) .timeline-major-lbl { min-height: 44px; font-size: 14px; }
body.pg-site:not(.pg-home) .timeline-year { font-family: var(--pg-f-title); font-size: 17px; font-weight: 400; letter-spacing: 0.07em; color: var(--pg-ink); border-bottom-color: var(--pg-line); margin: 30px 0 8px; padding-bottom: 8px; }
body.pg-site:not(.pg-home) .timeline-event .ev-origin { font-size: 13px; font-style: normal; color: var(--pg-muted); }
body.pg-site:not(.pg-home) .pg-page-main > .card > .empty { padding: 48px 20px 18px; font-size: 16px; }
body.pg-site:not(.pg-home) .back-home-link { display: table; margin: 0 auto; padding: 12px 20px; border: 1px solid var(--pg-line-strong); border-radius: 999px; color: var(--pg-link); font-size: 14px; font-weight: 500; }
body.pg-site:not(.pg-home) .back-home-link:hover { background: var(--pg-link-wash); border-color: var(--pg-link); text-decoration: none; }

/* modal de entrar/sugerir por cima do PG */
body.pg-site .login-modal { background: rgba(5,11,30,0.55); }
body.pg-site .login-box { border-radius: 14px; border-color: var(--pg-line); background: var(--pg-panel); color: var(--pg-ink); font-family: var(--pg-f-ui); }
body.pg-site .login-box h3 { font-family: var(--pg-f-serif); font-weight: 400; font-size: 22px; }
body.pg-site .login-box input, body.pg-site .login-box textarea { border-color: var(--pg-line-strong); border-radius: 8px; background: var(--pg-panel); color: var(--pg-ink); font-family: var(--pg-f-ui); }
body.pg-site .login-box button.submit { min-height: 44px; background: var(--pg-link); border-color: var(--pg-link); color: #fff; font-family: var(--pg-f-ui); }
body.pg-site .login-box button.submit:hover { background: var(--pg-link-hover); border-color: var(--pg-link-hover); color: #fff; }

@media (max-width: 760px) {
  body.pg-site:not(.pg-home) .pg-page-main > .card { margin: 0; padding: 26px 16px 32px; border-radius: 0; border-width: 0; box-shadow: none; }
  body.pg-site:not(.pg-home) .infobox { margin-bottom: 22px; }
  .pg-entry-actions { margin-left: 0; }
  body.pg-site:not(.pg-home) .links-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
body.pg-site:not(.pg-home) svg.wb-relgraph, body.pg-site:not(.pg-home) svg.wb-famtree { display: block; max-width: 540px; margin: 0 auto; }
body.pg-site:not(.pg-home) h2.cathead#relacoes { clear: both; }
@media (max-width: 619px) { body.pg-site:not(.pg-home) svg.wb-famtree { min-width: 460px; } }
@media (prefers-color-scheme: dark) { body.pg-site .login-box button.submit, body.pg-site .login-box button.submit:hover { color: #0b1a3f; } }

/* ===== Perfil de verdade (2026-09-23): foto, apelido, aviso de resposta, favoritos, acessos ===== */
.pg-avatar.has-photo { overflow: hidden; background: var(--pg-card-back); }
.pg-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.pg-avatar-btn { position: relative; }
.pg-avatar-dot { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--pg-gold); box-shadow: 0 0 0 2px var(--pg-night); }
.pg-menu-badge { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(201,164,92,0.18); color: #7a5a17; font-size: 12px; font-weight: 600; }
.pg-profile-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 4px; }
.pg-profile-chip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--pg-line-strong); color: var(--pg-link); font-size: 14px; text-decoration: none; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
.pg-profile-chip:hover { background: var(--pg-link-wash); border-color: var(--pg-link); }
.pg-profile-sec { scroll-margin-top: 16px; }
.pg-field-row { display: flex; gap: 8px; }
.pg-field-row input { flex: 1 1 auto; min-width: 0; }
.pg-btn { flex: none; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--pg-link); background: var(--pg-link); color: #fff; font-family: var(--pg-f-ui); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease-out; }
.pg-btn:hover { background: var(--pg-link-hover); border-color: var(--pg-link-hover); }
.pg-btn:disabled { opacity: 0.6; cursor: default; }
.pg-btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--pg-line-strong); color: var(--pg-link); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color 0.2s ease-out, border-color 0.2s ease-out; }
.pg-btn-line:hover, #pg-photo-in:focus-visible + .pg-btn-line { background: var(--pg-link-wash); border-color: var(--pg-link); }
#pg-photo-in:focus-visible + .pg-btn-line { outline: 2px solid var(--pg-link); outline-offset: 3px; }
.pg-btn-text { min-height: 40px; padding: 8px 10px; border: 0; background: none; color: var(--pg-muted); font-family: var(--pg-f-ui); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pg-btn-text:hover { color: var(--pg-link); }
.pg-btn-text[hidden] { display: none; }
.pg-profile-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--pg-muted); }
.pg-profile-status.is-bad { color: #a3372b; }
.pg-sug-tags { display: flex; align-items: center; gap: 6px; flex: none; }
.pg-sug-new { padding: 4px 10px; border-radius: 999px; background: var(--pg-gold); color: #1d1606; font-size: 12.5px; font-weight: 600; }
.pg-sug.is-new .pg-sug-reply { border-color: var(--pg-gold-soft); }
.pg-fav-list, .pg-acc-list { display: flex; flex-direction: column; }
.pg-fav-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--pg-line); }
.pg-fav-row:last-child { border-bottom: 0; }
.pg-fav-link { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.pg-fav-link:hover .pg-fav-title { color: var(--pg-link); }
.pg-fav-thumb { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.pg-fav-thumb.is-empty { display: grid; place-items: center; background-color: var(--pg-band); background-image: var(--pg-stars); background-size: 90px 70px; color: var(--pg-gold); font-family: var(--pg-f-title); font-size: 18px; }
.pg-fav-text { display: flex; flex-direction: column; min-width: 0; }
.pg-fav-title { font-family: var(--pg-f-serif); font-size: 16.5px; color: var(--pg-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-fav-type { font-size: 12.5px; color: var(--pg-muted); }
.pg-acc-row { padding: 12px 0; border-bottom: 1px solid var(--pg-line); }
.pg-acc-row:last-child { border-bottom: 0; }
.pg-acc-items { margin: 6px 0 0; padding-left: 20px; font-size: 14.5px; color: var(--pg-ink); }
.pg-acc-items li { margin: 3px 0; }
.pg-acc-items li::marker { color: var(--pg-link); }
/* Favoritar, na fileira de ações das páginas */
.pg-entry-actions .pg-fav { gap: 7px; }
.pg-fav-star { width: 14px; height: 14px; color: var(--pg-link); }
.pg-entry-actions .pg-fav[aria-pressed="true"] { background: var(--pg-link-wash); border-color: var(--pg-link); }
.pg-entry-actions .pg-fav[aria-pressed="true"] .pg-fav-star { color: var(--pg-gold); }
@media (prefers-color-scheme: dark) {
  .pg-menu-badge { color: #e9cf96; }
  .pg-profile-status.is-bad { color: #f0a497; }
  .pg-btn, .pg-btn:hover { color: #0b1a3f; }
}
@media (max-width: 560px) {
  .pg-field-row { flex-direction: column; }
}

/* ===== Rodada 4 (critique das páginas de entrada, 2026-09-23) ===== */
/* barra de navegação abaixo do cabeçalho, em todas as páginas PG */
.pg-nav { background: rgba(3,8,24,0.28); border-top: 1px solid rgba(255,255,255,0.06); }
.pg-nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; min-height: 44px; display: flex; align-items: stretch; gap: 4px; }
.pg-nav-cats { display: flex; align-items: stretch; gap: 4px; }
.pg-nav-link { display: inline-flex; align-items: center; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--pg-on-dark-muted); font-family: var(--pg-f-ui); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color 0.2s ease-out, border-color 0.2s ease-out; }
.pg-nav-link:hover, .pg-nav-link[aria-current="page"] { color: #fff; border-bottom-color: var(--pg-gold); }
.pg-nav-link[hidden] { display: none; }
.pg-nav-cats { margin-right: auto; }
.pg-nav-more { position: relative; display: flex; }
.pg-nav-more > summary { list-style: none; }
.pg-nav-more > summary::-webkit-details-marker { display: none; }
.pg-nav-more > summary::after { content: ""; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.pg-nav-menu { position: absolute; z-index: 40; top: 100%; left: 0; min-width: 190px; padding: 6px; border-radius: 12px; border: 1px solid var(--pg-line); background: var(--pg-panel); box-shadow: 0 2px 6px rgba(3,8,24,0.12), 0 24px 50px -20px rgba(3,8,24,0.45); display: flex; flex-direction: column; }
.pg-nav-menu-item { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 8px; color: var(--pg-ink); font-size: 14px; text-decoration: none; }
.pg-nav-menu-item:hover, .pg-nav-menu-item[aria-current="page"] { background: var(--pg-link-wash); color: var(--pg-link); }
body.pg-site .pg-mast .pg-nav :focus-visible { outline-color: var(--pg-gold); outline-offset: -2px; }

/* rodapé com navegação curta */
.pg-foot { flex-direction: column; gap: 14px; }
.pg-foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-family: var(--pg-f-ui); font-size: 14px; letter-spacing: 0; }
.pg-foot-nav a { display: inline-flex; align-items: center; min-height: 40px; color: var(--pg-link); text-decoration: none; }
.pg-foot-nav a:hover { text-decoration: underline; }
.pg-foot-nav a[hidden] { display: none; }
.pg-foot-brand { display: flex; align-items: center; gap: 10px; }

/* páginas internas: tipo como link, ações da mensagem de erro */
.pg-entry-type a { color: var(--pg-link); text-decoration: none; }
.pg-entry-type a:hover { text-decoration: underline; }
.pg-msg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
body.pg-site:not(.pg-home) .pg-msg-actions .back-home-link { margin: 0; }
body.pg-site:not(.pg-home) .pg-page-main > .card > h1 + .empty { padding-top: 18px; }

/* ligações e afinidades com retrato */
body.pg-site:not(.pg-home) .link-card.has-thumb { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; align-content: center; align-items: center; }
body.pg-site:not(.pg-home) .link-card.has-thumb > .pg-lthumb { grid-row: 1 / span 2; }
.pg-lthumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.pg-lthumb.is-empty { display: grid; place-items: center; background-color: var(--pg-band); background-image: var(--pg-stars); background-size: 90px 70px; color: var(--pg-gold); font-family: var(--pg-f-title); font-size: 18px; }
body.pg-site:not(.pg-home) .link-card.is-back .link-card-label { font-size: 12px; }

/* relações agrupadas por tipo (substituem o grafo em estrela no PG) */
.pg-rel-grouphead { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-family: var(--pg-f-ui); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--pg-ink); }
.pg-rel-groups > .pg-rel-grouphead:first-child { margin-top: 6px; }
.pg-rel-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* infobox: alcunha que quebra linha alinha depois do "•"; tarja de spoiler numa linha só */
body.pg-site:not(.pg-home) .infobox-alias-line { padding-left: 0.85em; text-indent: -0.85em; }
body.pg-site:not(.pg-home) .infobox .md-spoiler:not(.on) { white-space: nowrap; }

/* tarja de spoiler: listras sutis, pra ler como tarja e não como defeito */
body.pg-site .md-spoiler:not(.on) { background: repeating-linear-gradient(135deg, var(--pg-ink) 0 6px, color-mix(in srgb, var(--pg-ink) 80%, var(--pg-panel)) 6px 12px); cursor: pointer; }

@media (max-width: 760px) {
  .pg-nav-inner { padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
  .pg-nav-inner::-webkit-scrollbar { display: none; }
  .pg-nav { position: relative; }
  .pg-nav-more { position: static; }
  .pg-nav-menu { left: 8px; right: 8px; top: 100%; }
}
body.pg-site:not(.pg-home) .pg-page-main > .card > h1.pg-msg-title { text-align: center; padding-top: 12px; }
@media (min-width: 761px) { .pg-nav-cats > :first-child { margin-left: -12px; } .pg-nav-inner > .pg-nav-link:last-child { margin-right: -12px; } }

/* ===== Citações: epígrafe e diálogo em roteiro (2026-09-23) ===== */
.wb-epigraph { display: flow-root; position: relative; margin: 0 0 26px; padding: 4px 0 18px 46px; border-bottom: 1px solid var(--border); }
.wb-epigraph::before { content: "\201C"; position: absolute; left: 0; top: -12px; font-family: var(--font-wb); font-size: 72px; line-height: 1; color: var(--gold); pointer-events: none; }
.wb-epi-text { margin: 0; }
.wb-epi-text p { margin: 0; font-family: var(--font-wb); font-style: italic; font-size: 19px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.wb-epi-attr { margin-top: 10px; font-size: 13.5px; line-height: 1.45; color: var(--muted); text-align: right; }
.wb-epi-attr a { color: var(--gold-ink); }
.wb-epigraph .spoiler-block { margin: 0; }
.wb-dialogue { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; row-gap: 8px; }
.wb-dialogue p { margin: 0; }
.wb-dl-line { display: contents; }
.wb-dl-who { max-width: 11em; padding-top: 0.3em; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-align: right; color: var(--muted); }
.wb-dl-who a { color: var(--gold-ink); text-decoration: none; }
.wb-dl-who a:hover { text-decoration: underline; }
.wb-dl-say { font-family: var(--font-wb); font-style: italic; font-size: 17px; line-height: 1.5; color: var(--ink); }
.wb-dl-aside { font-style: normal; font-size: 0.84em; color: var(--muted); }
.wb-dl-dir { grid-column: 1 / -1; margin: 2px 0; font-size: 13.5px; font-style: italic; color: var(--muted); }
body.pg-site .wb-dl-who { font-family: var(--pg-f-ui); }
body.pg-site:not(.pg-home) .wb-epigraph { border-bottom-color: var(--pg-line); }
body.pg-site:not(.pg-home) .wb-epigraph::before { font-family: var(--pg-f-serif); color: var(--pg-gold); }
body.pg-site:not(.pg-home) .wb-epi-text p { font-size: 20px; color: var(--pg-ink); }
body.pg-site:not(.pg-home) .wb-epi-attr a, body.pg-site:not(.pg-home) .wb-dl-who a { color: var(--pg-link); }
/* home: diálogo curto na faixa do dia */
.pg-quote.is-dialogue { max-width: 54ch; }
.pg-quote .wb-dialogue { column-gap: 18px; row-gap: 10px; }
.pg-quote .wb-dialogue p, .pg-quote .wb-dialogue span { text-indent: 0; }
.pg-quote .wb-dl-who { padding-top: 0.55em; font-size: 12.5px; font-style: normal; color: var(--pg-gold); }
.pg-quote .wb-dl-who a { color: inherit; text-decoration: underline; text-decoration-color: var(--pg-gold-soft); }
.pg-quote .wb-dl-say { font-family: var(--pg-f-serif); font-size: clamp(19px, 1.9vw, 25px); line-height: 1.35; color: #fff; }
.pg-quote .wb-dl-aside, .pg-quote .wb-dl-dir { color: var(--pg-on-dark-muted); }
.pg-quote .wb-dl-dir { font-size: 15px; }
@media (max-width: 520px) {
  .wb-dialogue { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .wb-dl-who { max-width: none; padding-top: 10px; text-align: left; }
  .wb-dl-line:first-child .wb-dl-who { padding-top: 0; }
  .wb-epigraph { padding-left: 34px; }
  .wb-epigraph::before { font-size: 56px; top: -8px; }
}
