/* Arcano: tema escuro por padrão, claro opcional */
:root {
  --bg: #0f0d10;
  --bg-2: #17141a;
  --surface: #1d1920;
  --surface-2: #26212a;
  --line: #342d38;
  --text: #f1ecef;
  --muted: #a99fae;
  --accent: #c8364f;
  --accent-2: #e2566d;
  --accent-ink: #fff;
  --gold: #d6a85b;
  --ok: #4fb286;
  --warn: #e0a43a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #faf7f5;
  --bg-2: #f3eeea;
  --surface: #ffffff;
  --surface-2: #f6f1ee;
  --line: #e6ddd8;
  --text: #221b20;
  --muted: #6e6269;
  --accent: #a8243b;
  --accent-2: #c8364f;
  --shadow: 0 10px 30px rgba(60, 30, 40, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body.gated { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-family: var(--serif); font-weight: 600; }
h2 { font-size: 1.4rem; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt { margin-top: 2.2rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }
.inline { display: inline; }

/* Botões e chips */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; padding: .6em 1.1em; border-radius: 999px; font: 600 .95rem var(--font); cursor: pointer; transition: transform .12s, background .15s; text-decoration: none !important; }
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.sm { padding: .4em .85em; font-size: .85rem; }
.btn.lg { padding: .8em 1.4em; font-size: 1rem; }
.btn.block { width: 100%; }
.icon-btn { background: transparent; border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.chip { display: inline-block; padding: .3em .8em; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .85rem; background: var(--surface); text-decoration: none !important; transition: border-color .15s; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill { display: inline-block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; padding: .15em .6em; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* Topo */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 1.2rem var(--serif); text-decoration: none !important; letter-spacing: .02em; }
.search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 18px; fill: var(--muted); pointer-events: none; }
.search input { width: 100%; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .6em 2.6em .6em 2.4em; font: inherit; }
.search input:focus { border-color: var(--accent); outline: none; }
.search kbd { position: absolute; right: 12px; font: 600 .7rem var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.menu-btn { display: none; }
.mainnav { border-top: 1px solid var(--line); }
.mainnav .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav a { color: var(--muted); padding: 10px 12px; font-size: .92rem; white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.nav-ic { display: none; }
.nav-account { display: none; }

/* Autocomplete */
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px; z-index: 40; }
.suggest li a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--text); text-decoration: none; }
.suggest li a span { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.suggest li.active a, .suggest li a:hover { background: var(--surface-2); }

.flash { margin: 16px 0 0; padding: 12px 16px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: var(--radius-sm); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 15% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%), radial-gradient(900px 400px at 100% 0, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%); border-bottom: 1px solid var(--line); }
.hero-in { padding: 64px 20px 48px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600; }
.hero h1 { max-width: 820px; font-size: clamp(2rem, 4.4vw, 3.3rem); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 720px; }
.hero-search { position: relative; display: flex; gap: 10px; max-width: 680px; margin: 26px 0 14px; }
.hero-search input, .hero-search select { flex: 1; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .85em 1.2em; font: inherit; font-size: 1.05rem; }
.hero-search select { flex: 0 0 auto; font-size: .95rem; }
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hero-search.slim { margin-top: 14px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stats { display: flex; gap: 36px; margin: 34px 0 0; flex-wrap: wrap; }
.stats dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.stats dd { margin: 0; font: 600 1.8rem var(--serif); }

/* Seções e grids */
.section { padding: 40px 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.books { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid.books .card-media { aspect-ratio: 2 / 3; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.with-aside { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding-top: 28px; padding-bottom: 48px; }
.section.with-aside { grid-template-columns: 1fr 300px; }

/* Categorias com tons próprios */
[data-cat] { --hue: var(--accent); }
[data-cat="historia"] { --hue: #b58450; }
[data-cat="praticas"] { --hue: #c8364f; }
[data-cat="seguranca-consentimento"] { --hue: #3fa37a; }
[data-cat="shibari-cordas"] { --hue: #c47a3a; }
[data-cat="livros"] { --hue: #7b6fd0; }
[data-cat="grupos-comunidades"] { --hue: #3a8ec4; }
[data-cat="eventos"] { --hue: #d0508f; }
[data-cat="leis-direitos"] { --hue: #8c8f9c; }
[data-cat="saude"] { --hue: #45a7a0; }
[data-cat="glossario"] { --hue: #a0a04a; }
[data-cat="cultura"] { --hue: #b061c0; }
[data-cat="pesquisa"] { --hue: #5d8bd8; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cat { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, color-mix(in srgb, var(--hue) 16%, var(--surface)), var(--surface) 70%); border: 1px solid var(--line); color: var(--text); text-decoration: none !important; transition: transform .15s, border-color .15s; }
.cat:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--hue) 60%, var(--line)); }
.cat-name { font-weight: 700; font-size: 1.05rem; }
.cat-name::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--hue); margin-right: 8px; vertical-align: middle; }
.cat-desc { color: var(--muted); font-size: .9rem; }
.cat-count { font-size: .8rem; color: var(--muted); margin-top: auto; }
.small-cats .cat { padding: 14px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, border-color .15s, box-shadow .15s; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media.noimg { background: linear-gradient(135deg, color-mix(in srgb, var(--hue) 45%, var(--surface-2)), var(--surface-2)); }
.card-media.noimg::after { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font: 600 3.2rem var(--serif); color: color-mix(in srgb, var(--text) 55%, transparent); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-kicker { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .8rem; }
.card-kicker a { color: var(--gold); font-weight: 600; }
.card h3 { font-size: 1.08rem; margin: 0; }
.card h3 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-meta { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.card.compact .card-media { display: none; }
.card.past { opacity: .7; }

.notice { display: grid; grid-template-columns: 1fr 2fr; gap: 28px; align-items: start; }
.notice > div:first-child { padding: 24px; border-radius: var(--radius); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); }

/* Eventos */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.events a { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.events a:hover { border-color: var(--accent); }
.events .date { min-width: 64px; text-align: center; text-transform: uppercase; font-size: .75rem; color: var(--muted); border-right: 1px solid var(--line); padding-right: 12px; }
.events .date b { display: block; font: 600 1.6rem var(--serif); color: var(--accent-2); }
.events a > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.events.big a { padding: 16px; }

/* Cabeçalho de página */
.pagehead { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--hue, var(--accent)) 12%, var(--bg)), var(--bg)); padding: 34px 0 26px; }
.pagehead-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.aside { position: sticky; top: 120px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.aside a { display: flex; justify-content: space-between; padding: 7px 10px; color: var(--muted); border-radius: 7px; text-decoration: none; font-size: .93rem; }
.aside a:hover, .aside a[aria-current] { background: var(--surface); color: var(--text); }
.aside a span { font-size: .78rem; }
.rules { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.rules ol { padding-left: 1.2em; margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.filters .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 32px 0 8px; color: var(--muted); }
.empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-ico { font-size: 2rem; color: var(--accent); }

/* Artigo */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 0 48px; padding-top: 36px; padding-bottom: 20px; }
.article-head, .article-cover { grid-column: 1 / -1; max-width: 860px; }
.article-head .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.article-cover { margin: 26px 0 30px; }
.article-cover img { border-radius: var(--radius); width: 100%; max-height: 460px; object-fit: cover; }
.article-cover figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.article-body { grid-column: 1; grid-row: 3; min-width: 0; }
.toc { grid-column: 2; grid-row: 3; position: sticky; top: 120px; align-self: start; font-size: .9rem; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 12px; color: var(--muted); border-left: 2px solid transparent; margin-left: -1px; text-decoration: none; }
.toc a.on { color: var(--text); border-left-color: var(--accent); }
.prose { font-size: 1.08rem; line-height: 1.75; }
.prose h2 { margin-top: 1.8em; font-family: var(--serif); font-size: 1.6rem; scroll-margin-top: 120px; }
.prose h3 { margin-top: 1.5em; scroll-margin-top: 120px; }
.prose blockquote { margin: 1.2em 0; padding: .4em 1.2em; border-left: 3px solid var(--gold); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px; text-align: left; }
.infobox, .safety, .source-box, .cta-box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 24px; }
.infobox dl { display: grid; grid-template-columns: 90px 1fr; gap: 6px 12px; margin: 0 0 8px; }
.infobox dt { color: var(--muted); }
.infobox dd { margin: 0; }
.safety { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); margin-top: 28px; }
.safety h4 { color: var(--warn); }
.safety ul { margin: 0; padding-left: 1.2em; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 26px 0; }
.source-box { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.source-box p { margin: 4px 0 0; }
.source-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Fórum */
.boards { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.boards a { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.boards a:hover { border-color: var(--accent); }
.tlist { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.tlist > li { padding: 12px 16px; border-top: 1px solid var(--line); }
.tlist > li:first-child { border-top: 0; }
.trow { display: grid; grid-template-columns: 1fr 80px 110px; gap: 12px; align-items: center; }
.trow-title { color: var(--text); font-weight: 600; }
.trow-stats { text-align: center; display: flex; flex-direction: column; }
.trow-last { text-align: right; }
.inline-threads { margin-bottom: 24px; }
.post { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 12px 0; }
.post.first { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.post-head .anchor { margin-left: auto; }
.post-body p { margin: .4em 0; overflow-wrap: anywhere; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); font-weight: 700; font-size: .85rem; }
.discussion { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Formulários */
.form, .reply-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.form label, .reply-form label { font-weight: 600; font-size: .92rem; margin-top: 8px; }
.form input, .form select, .form textarea, .reply-form textarea { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7em .9em; font: inherit; }
.form input:focus, .form select:focus, .form textarea:focus, .reply-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.form .check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.form button, .reply-form button { align-self: flex-start; margin-top: 10px; }
.form .block { align-self: stretch; }
.auth { display: grid; place-items: center; padding: 56px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }

/* Tabela */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .93rem; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.table .num { text-align: right; }
.status { font-size: .8rem; padding: .15em .6em; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.status.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }
.status.blocked, .status.unreachable { color: var(--muted); }

/* Rodapé */
.footer { border-top: 1px solid var(--line); margin-top: 40px; background: var(--bg-2); }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; padding: 40px 20px 20px; }
.footer-in > * { min-width: 0; }
.footer-in a:not(.brand) { display: block; color: var(--muted); font-size: .92rem; padding: 3px 0; }
.legal { padding: 16px 20px 30px; font-size: .82rem; border-top: 1px solid var(--line); }

/* Newsletter e notificações */
[data-push-toggle][hidden] { display: none !important; }
.newsletter { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.newsletter h4 { margin: 0; }
.newsletter p { margin: 0; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .55em 1em; font: inherit; }
.newsletter-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.linkish { align-self: flex-start; background: none; border: 0; padding: 2px 0; color: var(--accent-2); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.push-btn { position: relative; }
.push-dot { display: none; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: #3fb96f; box-shadow: 0 0 0 2px var(--bg); }
[data-push-state="on"] .push-dot { display: block; }
.push-btn[data-push-state="on"] { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* Abas do fórum */
.tabs { display: flex; gap: 6px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }

/* Autores com foto e link para o perfil */
.avatar-img { object-fit: cover; padding: 0; }
.author { font-weight: 700; color: var(--text); text-decoration: none; }
.author:hover { color: var(--accent-2); }

/* Página pública do perfil */
.profile-cover { height: clamp(140px, 22vw, 300px); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, var(--bg-2)), var(--bg-2)); overflow: hidden; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile .wrap { padding-bottom: 48px; }
.profile .flash { margin-top: 16px; }
.profile-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: -56px; }
.profile-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); background: var(--surface-2); flex: none; }
.profile-avatar.sm { width: 72px; height: 72px; border-width: 2px; display: block; margin-bottom: 8px; }
.profile-avatar-empty { display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); color: var(--text); }
.profile-id { flex: 1; min-width: 200px; padding-bottom: 6px; }
.profile-id h1 { margin: 0 0 4px; font-size: clamp(1.6rem, 3vw, 2.2rem); overflow-wrap: anywhere; }
.profile-id p { margin: 0; }
.profile-edit { margin-bottom: 10px; }
.profile-bio { margin: 22px 0 0; font-size: 1.05rem; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.profile-links { list-style: none; padding: 0; margin: 18px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.profile-links a { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; }
.profile-links a:hover { border-color: var(--accent); }
.profile-activity { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; }
.profile-activity h2 { font-size: 1.15rem; margin: 0 0 12px; }
.plist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.plist li { display: flex; flex-direction: column; gap: 2px; }
.plist a { font-weight: 600; }

/* Aba Usuários */
.users-search { display: flex; gap: 8px; max-width: 420px; margin-bottom: 22px; }
.users-search input { flex: 1; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .55em 1em; font: inherit; }
.ugrid { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.ucard { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; overflow: hidden; height: 100%; }
.ucard:hover { border-color: var(--accent); }
.ucard-cover { display: block; align-self: stretch; height: 70px; margin: 0 -16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, var(--bg-2)), var(--bg-2)); }
.ucard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ucard-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin-top: -32px; border: 3px solid var(--surface); font-size: 1.5rem; }

/* Editor de perfil em Minha conta */
.profile-form-media { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.profile-form-media > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.profile-form-media input[type=file] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: .88rem; }
.form .label { font-weight: 600; font-size: .92rem; }
.profile-cover-thumb { width: 240px; max-width: 100%; height: 80px; object-fit: cover; border-radius: 8px; display: block; }
.profile-links-form { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 14px 14px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.profile-links-form legend { font-weight: 600; padding: 0 6px; }

/* Publicidade: a vaga reserva o tamanho do banner para a página não pular quando ele carrega */
.ad { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 28px auto; }
.ad-label { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-box { display: grid; place-items: center; max-width: 100%; overflow: hidden; border-radius: 6px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.ad-box iframe { display: block; border: 0; }
.ad-faixa .ad-box { width: 320px; height: 50px; }
@media (min-width: 768px) { .ad-faixa .ad-box { width: 468px; height: 60px; } }
@media (min-width: 1024px) { .ad-faixa .ad-box { width: 728px; height: 90px; } }
.ad-retangulo .ad-box { width: 300px; height: 250px; }
.prose .ad { margin: 32px auto; }
.ad-lateral .ad-box { width: 160px; height: 600px; }
.ad-lateral-curta .ad-box { width: 160px; height: 300px; }
.toc .ad, .aside .ad { margin: 24px 0 0; align-items: flex-start; }
.aside.rules .ad { align-items: center; }
/* Arranha-céu do artigo só em telas largas e altas. O sumário é fixo ao rolar: com o banner embaixo,
   a lista ganha rolagem própria para o conjunto caber na tela e o banner nunca ficar cortado */
.toc .ad-lateral { display: none; }
@media (min-width: 1200px) and (min-height: 1000px) {
  .toc .ad-lateral { display: flex; }
  .toc:has(.ad-lateral) ol { max-height: calc(100vh - 840px); overflow-y: auto; }
}
/* Barra de temas com banner fica alta demais para ser fixa: rola junto com a página */
.aside:has(.ad-lateral-curta) { position: static; }

/* Verificação de idade */
.agegate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(18px); }
.agegate-box { max-width: 460px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 34px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.agegate-box p { color: var(--muted); margin: 0 0 8px; }

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .with-aside, .section.with-aside { grid-template-columns: 1fr; }
  .aside:not(.rules) { position: static; flex-direction: row; overflow-x: auto; }
  .aside:not(.rules) h4 { display: none; }
  .aside a { white-space: nowrap; background: var(--surface); }
  .aside .ad-lateral-curta { display: none; }
  .split, .notice { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search kbd { display: none; }
  .actions { gap: 6px; }
  .actions .btn { display: none; }
  .actions .btn.head-main { display: inline-flex; }
  .head-user { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block !important; }
  .head-logout { display: none; }
  .menu-btn { display: grid; }
  .mainnav { display: none; }
  /* O menu fica dentro do cabeçalho fixo: limita à altura que sobra na tela e rola por dentro */
  .mainnav.open { display: block; max-height: calc(100vh - var(--nav-top, 140px)); max-height: calc(100dvh - var(--nav-top, 140px)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom); }
  .mainnav.open .wrap { overflow-x: visible; padding-bottom: 12px; }
  /* Menu aberto no celular: cartões em 2 colunas, com ícone */
  .mainnav.open .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 4px; }
  .mainnav.open .nav-account { grid-column: 1 / -1; }
  .mainnav.open .wrap > a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, transparent); color: var(--text); font-size: .95rem; font-weight: 500; white-space: normal; line-height: 1.2; }
  .mainnav.open .wrap > a:active { transform: scale(.98); }
  .mainnav.open .wrap > a[aria-current] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
  .mainnav.open .nav-ic { display: block; flex: none; width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: color-mix(in srgb, var(--accent) 14%, transparent); fill: none; stroke: var(--accent-2, var(--accent)); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mainnav.open .wrap > a[aria-current] .nav-ic { background: var(--accent); stroke: var(--accent-ink, #fff); }
  .mainnav.open .wrap { flex-direction: column; }
  .mainnav.open .nav-account { display: grid; gap: 8px; order: -1; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .nav-account > * { min-width: 0; }
  .nav-account .btn { width: 100%; box-sizing: border-box; display: block; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mainnav .nav-account a { color: var(--text); border-bottom: 1px solid var(--line); padding: .6em 1.1em; }
  .mainnav .nav-account a.btn:not(.ghost) { color: var(--accent-ink); border-color: transparent; }
  .hero-in { padding: 40px 20px 32px; }
  .hero-search { flex-direction: column; }
  .trow { grid-template-columns: 1fr 60px; }
  .trow-last { display: none; }
  .source-box { flex-direction: column; align-items: flex-start; }
  .footer-in { grid-template-columns: 1fr; }
  .profile-activity, .profile-form-media { grid-template-columns: 1fr; }
  .profile-head { margin-top: -44px; }
  .profile-avatar { width: 96px; height: 96px; }
  .stats { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

.cf-turnstile { margin: 8px 0 2px; min-height: 65px; }
.infobox.danger { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* Vídeos */
.vcard .card-media { position: relative; }
.vplay { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.85); }
.vplay::after { content: ""; position: absolute; left: 20px; top: 14px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff; }
.vplay.big { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
.vplay.big::after { left: 29px; top: 21px; border-width: 16px 0 16px 25px; }
.vdur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-size: .75rem; padding: 2px 6px; border-radius: 4px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin: 18px 0 14px; }
.player.vertical { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }
.player > img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.player-btn { position: absolute; inset: 0; background: transparent; border: 0; cursor: pointer; }
.player-btn:hover .vplay { background: var(--accent); }
.player-note { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 8px 12px; font-size: .78rem; color: #ddd; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-page .meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }

.google-btn { gap: 10px; margin-top: 10px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 16px 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Documentos */
.doc-list { display: flex; flex-direction: column; gap: 12px; }
.doc-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.doc-row h3 { font-size: 1.05rem; margin: 0 0 4px; }
.doc-row h3 a { color: var(--text); }
.doc-row p { margin: 0 0 6px; font-size: .93rem; }
.doc-ico { flex: 0 0 52px; height: 64px; border-radius: 8px; display: grid; place-items: end center; padding-bottom: 8px; font: 700 .7rem var(--font); color: #fff; background: #8c8f9c; }
.doc-ico[data-ext="pdf"] { background: #c8364f; }
.doc-ico[data-ext="docx"] { background: #3a6fc4; }
.doc-ico[data-ext="odt"] { background: #3fa37a; }
.doc-ico[data-ext="epub"] { background: #b58450; }
.hash { font-size: .72rem; overflow-wrap: anywhere; }
.infobox .btn { margin-top: 10px; }

/* Aviso de cookies */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin: 0 auto; display: flex; gap: 16px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.consent p { margin: 0; font-size: .9rem; color: var(--muted); }
.consent-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 680px) { .consent { flex-direction: column; align-items: stretch; } }
.consent[hidden] { display: none; }

/* Compartilhar */
.share { position: relative; display: inline-block; }
.share > .btn svg { margin-right: 2px; }
.share-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 180px; display: flex; flex-direction: column; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button { text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; font-size: .92rem; cursor: pointer; text-decoration: none; }
.share-menu a:hover, .share-menu button:hover { background: var(--surface-2); }
.head-share { margin: 8px 0 4px; }

/* Aviso de verificação de e-mail */
.verify-bar { background: color-mix(in srgb, var(--warn) 16%, var(--bg)); border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); font-size: .9rem; }
.verify-bar.expired { background: color-mix(in srgb, var(--accent) 18%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.verify-in { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }

/* Galeria do post original */
.gallery { margin: 32px 0; }
.gallery h2 { font-family: var(--serif); font-size: 1.4rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 10px; }
.gallery-item { padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.lightbox { max-width: min(96vw, 1200px); max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox img { max-width: 100%; max-height: 86vh; margin: 0 auto; object-fit: contain; }
.lightbox p { margin: 6px 12px 10px; color: #ccc; }
.lightbox-close { position: absolute; top: 6px; right: 10px; background: rgba(0,0,0,.6); color: #fff; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
/* Vídeos e imagens dentro do texto dos artigos */
.prose figure.video-inline { margin: 22px 0; }
.prose figure.video-inline .player { margin: 0 0 6px; }
.prose figure.video-inline figcaption { text-align: center; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* Diretório de criadoras e criadores */
.creator-grid { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.creator-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.creator-photo { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; font-size: 1.5rem; }
.creator-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.creator-body p { margin: 4px 0; }
.creator-name { font-size: 1.1rem; margin: 0; }
.creator-links { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.creator-links a { display: inline-block; padding: .25em .7em; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; text-decoration: none; overflow-wrap: anywhere; }
.creator-links a:hover { border-color: var(--accent); }
.creator-18 { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05em .45em; border-radius: 999px; background: color-mix(in srgb, var(--gold) 25%, transparent); color: var(--text); vertical-align: middle; }
.creator-remove { margin-top: 4px; }

/* Produtos e lojas (/produtos) */
.product-grid { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); }
.product-img-empty { display: grid; place-items: center; font-size: 2.5rem; color: var(--muted); }
.product-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; min-width: 0; }
.product-body p { margin: 4px 0; }
.product-body .eyebrow { margin: 0; font-size: .7rem; }
.product-name { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.product-go { margin-top: auto; align-self: flex-start; }

/* Verificação de idade (câmera) */
.agev-how { padding-left: 1.2em; color: var(--muted); }
.agev-how li { margin: 4px 0; }
.agev-cam, .agev-result { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 20px 0; }
.agev-cam[hidden], .agev-result[hidden], .agev-intro[hidden] { display: none; }
.agev-stage { position: relative; width: 100%; max-width: 480px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #000; }
.agev-stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.agev-oval { position: absolute; inset: 10% 24%; border: 3px dashed rgba(255, 255, 255, .75); border-radius: 50%; pointer-events: none; }
.agev-count { position: absolute; inset: 0; display: grid; place-items: center; font: 700 4.5rem/1 Georgia, serif; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); pointer-events: none; }
.agev-flash .agev-stage { outline: 4px solid #fff; }
.agev-step { font-weight: 600; font-size: 1.1rem; text-align: center; margin: 0; min-height: 1.5em; }
.agev-result p { text-align: center; max-width: 480px; }
.agev-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.agev-actions [hidden] { display: none; }
.agev-alt { margin: 28px 0 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.agev-alt summary { cursor: pointer; font-weight: 600; }
.agev-gate { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: var(--surface); }

/* Arrastar e soltar nos campos de arquivo (assets/dropzone.js) */
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 6px; border: 2px dashed var(--line); border-radius: var(--radius-sm, 10px); background: var(--surface, transparent); cursor: pointer; transition: border-color .15s, background-color .15s; min-height: 64px; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); outline: none; }
.dropzone.is-over { border-color: var(--accent); border-style: solid; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.dropzone.is-error { border-color: #d33; }
.dropzone .dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone-preview { flex: none; width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2, rgba(127,127,127,.12)); color: var(--muted); font-size: .72rem; font-weight: 700; overflow: hidden; }
.dropzone-preview:empty::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 16v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3'/%3E%3C/svg%3E") center/contain no-repeat; }
.dropzone-preview img { width: 100%; height: 100%; object-fit: cover; }
.dropzone-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .92rem; }
.dropzone-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-text span { color: var(--muted); font-size: .85rem; }
