:root {
    --bg: #000;
    --bg-content: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-header: #343;
    --bg-menu: #333;
    --text: #eee8aa;
    --text-muted: #aaa;
    --text-dim: #888;
    --text-bright: #fff;
    --link: #EAC117;
    --link-visited: #C68E17;
    --gold: gold;
    --border: #333;
    --border-subtle: #222;
    --accent-green: #343;
    --accent-green-hover: #454;
    --success-bg: #1a2a1a;
    --success-border: #2a4a2a;
    --success-text: #8f8;
    --error-bg: #2a1a1a;
    --error-border: #4a2a2a;
    --error-text: #f88;
    --radius: 4px;
    --card-bg: #1e1e1e;
    --card-bg-hover: #252525;
    --card-border: #2a2a2a;
    --card-border-hover: #363636;
    --nav-link: rgba(255,255,255,0.85);
    --nav-link-hover: #fff;
    --nav-logo: var(--gold);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --max-width: 800px;
    --header-height: 40px;
}

[data-theme="light"] {
    --bg: #f5f5f0;
    --bg-content: #fff;
    --bg-card: #fff;
    --bg-header: #4a7a4a;
    --bg-menu: #3a3a3a;
    --text: #1a1a1a;
    --text-muted: #444;
    --text-dim: #666;
    --text-bright: #000;
    --link: #6b4f10;
    --link-visited: #533908;
    --gold: #b8960f;
    --border: #ddd;
    --border-subtle: #e8e8e3;
    --card-bg: #fff;
    --card-bg-hover: #f5f5f0;
    --card-border: #e0e0db;
    --card-border-hover: #ccc;
    --accent-green: #4a7a4a;
    --accent-green-hover: #3a6a3a;
    --success-bg: #e8f5e8;
    --success-border: #b8d8b8;
    --success-text: #2a6a2a;
    --error-bg: #f5e8e8;
    --error-border: #d8b8b8;
    --error-text: #8a2a2a;
    --nav-link: rgba(255,255,255,0.92);
    --nav-link-hover: #fff;
    --nav-logo: #e0c84a;
}

[data-theme="light"] .comentario {
    background: #fafaf5;
    border-color: #e0e0db;
}

[data-theme="light"] .mensagem {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

[data-theme="light"] .mensagem.erro {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

[data-theme="light"] #header label {
    border-color: rgba(255,255,255,0.5);
}

[data-theme="light"] .menu-overlay {
    background: rgba(0,0,0,0.3);
}

html, body {
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.authenticated .show-auth { display: block !important }
.authenticated .show-guest { display: none !important }
.anonymous .show-guest { display: block !important }
.anonymous .show-auth { display: none !important }
.role-admin .show-admin { display: block !important }
.show-admin { display: none !important }

body {
    -webkit-text-size-adjust: none;
    font-family: var(--font-sans);
    font-size: 1.0em;
    background: var(--bg);
    color: var(--text);
}

a, a:link, a:active, a:visited, a:hover {
    text-decoration: underline;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: var(--link-visited);
}

h1 {
    font-size: 1.2em;
    color: var(--gold);
}

h2 {
    font-size: 1.1em;
}

p {
    text-align: justify;
    line-height: 1.8em;
    color: var(--text);
    margin: 1em .3em;
    font-size: small;
}

@media all and (min-width: 800px) {
    h1 {
        font-size: xx-large;
    }
    p {
        font-size: medium;
    }
}

.menu-toggle {
    display: none;
}

#header {
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-header);
    font-size: 16px;
    font-weight: bold;
    color: var(--text-bright);
    text-align: center;
    line-height: var(--header-height);
    height: var(--header-height);
    padding: 0 50px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#header label {
    background: center center no-repeat transparent;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAE1JREFUeNpi/P//PwOtARMDHQBdLGFBYt+nkR2KjEhxQqvIYaR7cD2glSWMo0mY3DiJo5Edi4ZPEqZ7nMSP5pPRon60qB9NwpQDgAADAMIxHUJvWs/TAAAAAElFTkSuQmCC);
    display: block;
    width: 40px;
    height: 40px;
    position: absolute;
    top: 0;
    left: 10px;
    cursor: pointer;
}

.mm-page {
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-height);
    transition: transform 0.4s ease;
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
}

#menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 440px;
    min-width: 140px;
    height: 100%;
    background: var(--bg-menu);
    color: var(--nav-link);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 1000;
    font-size: 14px;
}

.menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.menu-close {
    color: rgba(255,255,255,0.6);
    font-size: 28px;
    cursor: pointer;
    padding: 6px 10px;
    line-height: 1;
}

#menu ul {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.mi {
    font-style: normal;
    margin-right: 0.5em;
    display: inline-block;
    width: 1.2em;
    text-align: center;
}

#menu li > a,
#menu li > label {
    display: flex;
    align-items: center;
    padding: 10px 10px 10px 20px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    line-height: 20px;
    min-height: 40px;
}

#menu a:hover {
    color: var(--nav-link-hover);
}

#menu .dropdown-all {
    margin-top: 0.4em;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#menu .dropdown-all a {
    font-size: 0.88em;
    text-align: center;
}

#menu > ul > li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

#menu .has-submenu > ul {
    display: none;
    padding: 0;
}

#menu .has-submenu > label:after {
    content: ' \25BE';
    margin-left: auto;
    color: rgba(255, 255, 255, 0.3);
}

#menu .has-submenu > ul > li > a {
    padding-left: 35px;
}

.submenu-toggle {
    display: none;
}

#menu .has-submenu .submenu-toggle:checked + label {
    color: var(--nav-link-hover);
    background: rgba(255, 255, 255, 0.05);
}

#menu .has-submenu .submenu-toggle:checked + label:after {
    content: ' \25B4';
}

#menu .has-submenu .submenu-toggle:checked ~ ul {
    display: block;
    background: rgba(255, 255, 255, 0.05);
}

.theme-switch {
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 14px 10px 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 0.5em;
}

.theme-switch span {
    font-size: 13px;
    color: inherit;
}

.theme-switch input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 38px;
    height: 20px;
    background: #555;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    flex-shrink: 0;
}

.theme-switch input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-switch input[type="checkbox"]:checked {
    background: var(--accent-green);
}

.theme-switch input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}

.menu-toggle:checked ~ .mm-page {
    transform: translateX(80%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@media all and (min-width: 550px) {
    .menu-toggle:checked ~ .mm-page {
        transform: translateX(440px);
    }
}

.menu-toggle:checked ~ .menu-overlay {
    display: block;
}

.menu-toggle:checked ~ #menu {
    transform: translateX(0);
}

main,
#content,
.content {
    max-width: var(--max-width);
    margin: .3em auto;
    padding: 0 .5em;
}

nav {
    font-size: 1em;
}

form {
    position: relative;
}

form label {
    display: block;
    margin-bottom: 0.3em;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-dim);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form select,
form textarea {
    display: block;
    width: 100%;
    max-width: 25em;
    margin-bottom: 1em;
    padding: 0.5em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
}

form textarea {
    max-width: 100%;
    height: 5em;
    position: relative;
}

form button {
    display: inline-block;
    padding: 0.5em 1.5em;
    background: var(--accent-green);
    color: var(--gold);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
}

form button:hover {
    background: var(--accent-green-hover);
}

.button-group button {
    display: inline-block;
    margin-right: 0.5em;
}

form .dia, .mes, .ano {
    display: inline-block;
    width: auto;
    max-width: none;
}

.index-list {
    border-bottom: solid 1px var(--border-subtle);
}

.index-list a {
    text-decoration: none;
    display: block;
    padding: 1em;
}

.index-list .title {
    display: block;
    font-weight: bold;
}

.index-list .author {
    font-size: small;
    font-style: italic;
}

.index-list time {
    font-size: x-small;
}

.post-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    margin-bottom: 0.6em;
    padding: 1em;
    transition: background 0.15s, border-color 0.15s;
}

.post-card a.post-card-link-cover {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.post-card .post-title {
    position: relative;
    z-index: 2;
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--link);
    margin-bottom: 0.3em;
    line-height: 1.35;
    text-decoration: none;
}

.post-card .post-title:hover {
    text-decoration: underline;
}

.post-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
}

.post-card a.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card .post-title {
    display: block;
    font-weight: 600;
    font-size: 1.1em;
    color: var(--link);
    margin-bottom: 0.3em;
    line-height: 1.35;
}

.post-card a.post-card-link:hover .post-title {
    text-decoration: underline;
}

.post-card .post-meta {
    position: relative;
    z-index: 2;
    font-size: 0.82em;
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 1em;
}

.post-card .post-meta > :not(:first-child) {
/*    margin-left: 0.5em;*/
    
}

.post-card .post-meta a {
    color: var(--text-dim);
    text-decoration: none;
}

.post-card .post-meta a:hover {
    color: var(--link);
    text-decoration: underline;
}

.post-card .post-meta-reading {
    font-size: 0.8em;
    color: var(--text-dim);
    margin-top: 0.35em;
}

.post-card .post-meta-reading-inline {
    font-size: inherit;
    color: var(--text-dim);
}

.post-stats {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.8em;
    margin-top: 0.3em;
    font-size: 0.78em;
    color: var(--text-dim);
}

.post-stat {
    white-space: nowrap;
}

.post-card .post-excerpt {
    font-size: 0.88em;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0.5em 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.categories-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 1.2em;
    padding: 0.6em 0;
    border-bottom: 1px solid var(--border-subtle);
}

.categories-nav a {
    display: inline-block;
    padding: 0.25em 0.65em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.categories-nav a:hover {
    background: var(--accent-green);
    color: var(--text-bright);
    border-color: var(--accent-green);
    text-decoration: none;
}

.writers-hero {
    text-align: center;
    padding: 1.5em 1em;
    margin: 1em 0;
}

.writers-subtitle {
    font-size: 1.05em;
    color: var(--text-dim);
    max-width: 36em;
    margin: 0 auto 1.2em;
    line-height: 1.55;
}

.writers-cta {
    display: inline-block;
    padding: 0.7em 2em;
    background: var(--accent-green);
    color: var(--text-bright);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: background 0.15s;
}

.writers-cta:hover {
    background: #1ba867;
    text-decoration: none;
    color: var(--text-bright);
}

.writers-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1em;
    margin: 2em 0;
}

.writers-benefit-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1em 1.2em;
}

.writers-benefit-card h3 {
    font-size: 1em;
    margin: 0 0 0.4em;
    color: var(--link);
}

.writers-benefit-card p {
    font-size: 0.88em;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.5;
}

.post-actions {
    margin: 1em 0;
    padding: 0.8em;
    background: var(--bg-card);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1em;
    flex-wrap: wrap;
}

.votacao {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.votos-media {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--gold);
}

.votos-total {
    font-size: 0.9em;
    color: var(--text-muted);
}

.voto-estrelas {
    display: inline-flex;
    gap: 0;
    margin: 0 -0.1em;
}

.star {
    position: relative;
    display: inline-block;
    width: 1.7em;
    height: 2em;
    font-size: 1.3em;
    line-height: 2em;
    text-align: center;
    --base-fill: 0;
    cursor: pointer;
}

.star::before {
    content: '★';
    position: absolute;
    inset: 0;
    line-height: inherit;
    text-align: center;
    --fill: var(--hover-fill, var(--base-fill, 0));
    background: linear-gradient(90deg, var(--gold) calc(var(--fill) * 100%), var(--border) calc(var(--fill) * 100%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2em;
    pointer-events: none;
}

.star.votado::before {
    background: linear-gradient(90deg, #e74c3c calc(var(--fill) * 100%), var(--border) calc(var(--fill) * 100%));
    -webkit-background-clip: text;
    background-clip: text;
}

.star-l,
.star-r {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1;
    padding: 0;
    margin: 0;
    font-size: 0;
}

.star-l { left: 0; }
.star-r { right: 0; }

.voto-estrelas:has(.star:nth-child(1) .star-l:hover) > .star:nth-child(1) { --hover-fill: 0.5; }
.voto-estrelas:has(.star:nth-child(1) .star-r:hover) > .star:nth-child(1) { --hover-fill: 1; }

.voto-estrelas:has(.star:nth-child(2) .star-l:hover) > .star:nth-child(2) { --hover-fill: 0.5; }
.voto-estrelas:has(.star:nth-child(2) .star-r:hover) > .star:nth-child(2) { --hover-fill: 1; }
.voto-estrelas:has(.star:nth-child(2) :hover) > .star:nth-child(1) { --hover-fill: 1; }

.voto-estrelas:has(.star:nth-child(3) .star-l:hover) > .star:nth-child(3) { --hover-fill: 0.5; }
.voto-estrelas:has(.star:nth-child(3) .star-r:hover) > .star:nth-child(3) { --hover-fill: 1; }
.voto-estrelas:has(.star:nth-child(3) :hover) > .star:nth-child(-n+2) { --hover-fill: 1; }

.voto-estrelas:has(.star:nth-child(4) .star-l:hover) > .star:nth-child(4) { --hover-fill: 0.5; }
.voto-estrelas:has(.star:nth-child(4) .star-r:hover) > .star:nth-child(4) { --hover-fill: 1; }
.voto-estrelas:has(.star:nth-child(4) :hover) > .star:nth-child(-n+3) { --hover-fill: 1; }

.voto-estrelas:has(.star:nth-child(5) .star-l:hover) > .star:nth-child(5) { --hover-fill: 0.5; }
.voto-estrelas:has(.star:nth-child(5) .star-r:hover) > .star:nth-child(5) { --hover-fill: 1; }
.voto-estrelas:has(.star:nth-child(5) :hover) > .star:nth-child(-n+4) { --hover-fill: 1; }

.voto-login {
    font-size: 0.9em;
    color: var(--text-muted);
}

.favorito-btn {
    background: none;
    border: 2px solid var(--text-dim);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0.2em 0.4em;
    border-radius: var(--radius);
    color: var(--text-dim);
    line-height: 1;
}

.favorito-btn:hover {
    border-color: var(--link);
    color: var(--link);
}

.favorito-btn.ativo {
    color: var(--link);
    border-color: var(--link);
}

.seguir-btn {
    background: none;
    border: 2px solid var(--text-dim);
    font-size: 0.9em;
    cursor: pointer;
    padding: 0.2em 0.6em;
    border-radius: var(--radius);
    color: var(--text-dim);
    line-height: 1;
}

.seguir-btn:hover {
    border-color: var(--link);
    color: var(--link);
}

.seguir-btn.ativo {
    background: var(--accent-green);
    color: var(--text-bright);
    border-color: var(--accent-green);
}

.serie-info {
    font-style: italic;
    color: var(--text-muted);
}

.genero {
    display: inline-block;
    padding: 0.1em 0.5em;
    background: rgba(234, 193, 23, 0.15);
    color: var(--link);
    border-radius: 3px;
    font-size: 0.85em;
}

.busca-form {
    display: flex;
    margin: 0;
    padding: 0.5em 0;
}

.busca-form .busca-campo {
    flex: 1;
    padding: 0.5em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 1em;
    margin: 0;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    border-radius: var(--radius) 0 0 var(--radius);
}

.busca-form .busca-btn {
    flex-shrink: 0;
    padding: 0.5em 1.2em;
    background: var(--accent-green);
    border: 1px solid var(--border);
    color: var(--gold);
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    box-sizing: border-box;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.busca-form .busca-btn:hover {
    background: var(--accent-green-hover);
}

.cat-intro {
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0.3em 0 1.2em;
    text-align: justify;
}

.cat-intro-count {
    color: var(--text-dim);
    font-size: 0.9em;
}

.cat-destaques {
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--border-subtle);
}

.cat-destaques h2 {
    font-size: 1em;
    color: var(--gold);
    margin-bottom: 0.6em;
}

.cat-destaques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6em;
}

#footer {
    margin-top: 2em;
    padding: 1.5em 1em 1em;
    border-top: 1px solid var(--border);
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5em;
    margin-bottom: 1.2em;
}


.footer-heading {
    font-size: 0.85em;
    color: var(--text-muted);
    margin: 0 0 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: bold;
}

.footer-col h4 {
    font-size: 0.85em;
    color: var(--text-muted);
    margin: 0 0 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5em;
}

.footer-col ul a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85em;
    display: block;
    padding: 0.5em 0;
}

.footer-col ul a:hover {
    color: var(--link);
    text-decoration: underline;
}

.footer-desc {
    font-size: 0.85em;
    color: var(--text-dim);
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

.footer-copy {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75em;
    margin: 0;
    padding-top: 0.8em;
    border-top: 1px solid var(--border-subtle);
}

.ranking-nav {
    margin: 1em 0;
    padding: 0.5em;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.ranking-nav a {
    margin: 0 0.3em;
    padding: 0.2em 0.5em;
    border-radius: 3px;
    text-decoration: none;
    color: var(--text-muted);
}

.ranking-nav a.ativo,
.ranking-nav a:hover {
    background: var(--border);
    color: var(--text-bright);
}

.ranking-nav strong {
    color: var(--text);
    margin-right: 0.2em;
}

.ranking-sep {
    display: inline-block;
    width: 1px;
    height: 1em;
    background: var(--border);
    margin: 0 0.5em;
    vertical-align: middle;
}

.ranking-lista {
    list-style: none;
    counter-reset: ranking;
    padding: 0;
}

.ranking-lista li {
    counter-increment: ranking;
    padding: 0.5em 0.5em 0.5em 2.5em;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.ranking-lista li:before {
    content: counter(ranking);
    position: absolute;
    left: 0.5em;
    color: var(--text-dim);
    font-weight: bold;
}

.ranking-lista li:nth-child(-n+3):before {
    color: #f0c040;
}

.ranking-lista a {
    text-decoration: none;
}

.ranking-lista a:hover {
    text-decoration: underline;
}

.ranking-autor {
    color: var(--text-dim);
    font-size: 0.85em;
}

.ranking-stat {
    float: right;
    color: var(--text-muted);
    font-size: 0.85em;
}

.breadcrumb {
    font-size: 0.8em;
    color: var(--text-dim);
    margin-bottom: 1em;
    padding: 0.5em 0;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: var(--text);
}

.breadcrumb-sep {
    margin: 0 0.3em;
    color: var(--text-dim);
}

.breadcrumb-current {
    color: var(--text-dim);
}

.tempo-leitura {
    color: var(--text-dim);
    font-size: 0.85em;
    margin-left: 0.5em;
}

.contador-leituras {
    color: var(--text-dim);
    font-size: 0.85em;
    margin-left: 0.5em;
}

.compartilhar {
    margin: 1em 0;
    padding: 0.5em 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.compartilhar-label {
    color: var(--text-dim);
    font-size: 0.85em;
    margin-right: 0.5em;
}

.compartilhar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-right: 0.3em;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.compartilhar-btn:hover {
    background: var(--accent-green);
    color: #fff;
    border-color: var(--accent-green);
}

.mensagem {
    padding: 0.8em 1em;
    margin-bottom: 1em;
    border-radius: var(--radius);
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
}

.mensagem.erro {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: var(--error-text);
}

.mensagem.sucesso {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success-text);
}

.comentario {
    margin: 0.5em 0;
    padding: 0.8em;
    background: var(--bg-card);
    border-radius: var(--radius);
}

.comentario h2 {
    font-size: 0.9em;
    color: var(--link);
    margin: 0 0 0.5em 0;
}

.comentario p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5em;
}

.paginacao {
    text-align: center;
    padding: 1em 0;
    margin-top: 1em;
}

.paginacao-btn {
    display: inline-block;
    padding: 0.3em 0.7em;
    margin: 0 0.15em;
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.9em;
}

.paginacao-btn:hover,
.paginacao-btn.ativo {
    background: var(--border);
    color: var(--text-bright);
    text-decoration: none;
}

.paginacao-sep {
    color: var(--text-dim);
    margin: 0 0.3em;
}

.poema-content {
    text-align: center;
    font-style: italic;
    white-space: pre-line;
    line-height: 2em;
    margin: 1.5em .3em;
}

.poema-content p {
    text-align: center;
    font-style: italic;
}

.conta-menu {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}

.conta-menu li {
    border-bottom: 1px solid var(--border-subtle);
}

.conta-menu a {
    display: block;
    padding: 0.8em 1em;
    text-decoration: none;
    color: var(--link);
}

.conta-menu a:hover {
    background: var(--bg-card);
    text-decoration: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin-bottom: 1.2em;
    padding: 0.6em 0;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-nav a {
    display: inline-block;
    padding: 0.25em 0.65em;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85em;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-nav a:hover {
    background: var(--accent-green);
    color: var(--text-bright);
    border-color: var(--accent-green);
    text-decoration: none;
}

.admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    margin-bottom: 1em;
}

.admin-stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 0.8em 1.2em;
    text-align: center;
    flex: 1;
    min-width: 6em;
}

.admin-stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--link);
    line-height: 1.2;
}

.admin-stat-label {
    display: block;
    font-size: 0.8em;
    color: var(--text-dim);
    margin-top: 0.2em;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1em;
    padding: 0.7em 0;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-item:last-child {
    border-bottom: none;
}

.admin-item-main {
    flex: 1;
}

.admin-item-main a {
    font-weight: 600;
}

.admin-item-meta {
    display: block;
    font-size: 0.82em;
    color: var(--text-dim);
    margin-top: 0.2em;
}

.admin-item-detail {
    font-size: 0.88em;
    color: var(--text-muted);
    margin: 0.3em 0 0;
}

.admin-item-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.4em;
}

.admin-badge {
    display: inline-block;
    padding: 0.1em 0.4em;
    background: rgba(234, 193, 23, 0.2);
    color: var(--link);
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-badge-inactive {
    background: rgba(255, 100, 100, 0.15);
    color: #f88;
}

.admin-badge-warning {
    background: rgba(255, 165, 0, 0.15);
    color: #fa0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
    margin-bottom: 1.5em;
}

.admin-table th,
.admin-table td {
    padding: 0.4em 0.6em;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-dim);
    font-size: 0.85em;
}

.admin-table td {
    color: var(--text-muted);
}

.perfil-header {
    margin-bottom: 1em;
}

.perfil-header h1 {
    margin-bottom: 0.1em;
}

.perfil-since {
    font-size: 0.85em;
    color: var(--text-dim);
    margin: 0 0 0.6em;
}

.perfil-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    margin-bottom: 1.2em;
}

.perfil-stat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 0.6em 1em;
    text-align: center;
    flex: 1;
    min-width: 5em;
}

.perfil-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
    color: var(--link);
    line-height: 1.2;
}

.perfil-stat-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-dim);
    margin-top: 0.15em;
}

.perfil-stats-link {
    margin: 0 0 1.2em;
    font-size: 0.85em;
}

.perfil-stats-link a {
    color: var(--link);
}

.post-meta-votes {
    color: var(--text-dim);
    white-space: nowrap;
}

.stats-periodos {
    display: flex;
    gap: 0.6em;
    margin-bottom: 1.5em;
}

.stats-periodo {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 0.6em 1em;
    flex: 1;
    text-align: center;
}

.stats-periodo-label {
    display: block;
    font-size: 0.75em;
    color: var(--text-dim);
    margin-bottom: 0.2em;
}

.stats-periodo-value {
    font-weight: 600;
    font-size: 1.1em;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.stats-table th {
    text-align: left;
    padding: 0.4em 0.6em;
    border-bottom: 2px solid var(--border);
    color: var(--text-dim);
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stats-table td {
    padding: 0.5em 0.6em;
    border-bottom: 1px solid var(--border-subtle);
}

.stats-table tr:hover td {
    background: var(--card-bg-hover);
}

.stats-table .stats-num {
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.stats-table a {
    color: var(--link);
    text-decoration: none;
}

.stats-table a:hover {
    text-decoration: underline;
}

.admin-btn {
    display: inline-block;
    padding: 0.3em 0.8em;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--link);
    text-decoration: none;
    font-size: 0.9em;
}

.admin-btn:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    margin-bottom: 1em;
}

.post-tag {
    display: inline-block;
    padding: 0.15em 0.5em;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    color: var(--link);
    font-size: 0.8em;
    text-decoration: none;
}

.post-tag:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
}

.post-meta-cat {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 0.05em 0.4em;
    font-size: 0.85em;
    color: var(--text-dim);
}

.admin-grupo-form {
    display: flex;
    gap: 0.5em;
    margin-bottom: 1.5em;
}

.admin-grupo-form select,
.admin-grupo-form input {
    padding: 0.3em 0.5em;
}

.admin-grupo-form input {
    flex: 1;
}

.admin-grupo-section {
    margin-bottom: 1.5em;
}

.admin-grupo-section h2 {
    font-size: 1.1em;
    margin-bottom: 0.3em;
}

.admin-grupo-section td form input {
    padding: 0.2em 0.4em;
    width: 12em;
}

.admin-btn-remove {
    background: rgba(255, 100, 100, 0.15);
    color: #f88;
    border: none;
    padding: 0.2em 0.6em;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9em;
}

.admin-btn-merge {
    background: rgba(100, 150, 255, 0.15);
    color: #8af;
    border: none;
    padding: 0.2em 0.6em;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9em;
}

.search-toggle {
    display: none;
}

#header .header-search-btn {
    position: absolute;
    top: 0;
    right: 10px;
    left: auto;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background-image: none;
}

#header .header-search-btn::before {
    content: '';
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    position: absolute;
    top: 11px;
    right: 18px;
}

#header .header-search-btn::after {
    content: '';
    width: 7px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    position: absolute;
    top: 26px;
    right: 12px;
    transform: rotate(45deg);
}

.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1001;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    box-sizing: border-box;
}

.search-overlay-form {
    display: flex;
    width: 90%;
    max-width: 500px;
}

.search-overlay-input {
    flex: 1;
    padding: 0.8em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 1.1em;
    border-radius: var(--radius) 0 0 var(--radius);
    max-width: none;
    width: auto;
    margin: 0;
    box-sizing: border-box;
}

.search-overlay-btn {
    padding: 0.8em 1.5em;
    background: var(--accent-green);
    border: 1px solid var(--border);
    color: var(--gold);
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1em;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.search-overlay-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0.3em;
}

.search-overlay-close:hover {
    color: #fff;
}

.search-toggle:checked ~ .search-overlay {
    display: flex;
}

.menu-section {
    display: block;
    padding: 12px 10px 5px 20px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 4px;
}

#menu > ul > li.menu-section:first-child {
    border-top: none;
    margin-top: 0;
}

.menu-subgroup {
    display: block;
    padding: 8px 10px 4px 35px;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.45);
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    #header {
        display: none;
    }

    #header label,
    .header-search-btn {
        display: none;
    }

    .desktop-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: var(--bg-header);
        z-index: 100;
        font-size: 14px;
        color: rgba(255,255,255,0.8);
    }

    .desktop-nav-inner {
        display: flex;
        align-items: center;
        max-width: 1100px;
        margin: 0 auto;
        padding: 0 1em;
        height: var(--header-height);
        gap: 0.3em;
    }

    .desktop-nav-logo {
        color: var(--nav-logo);
        text-decoration: none;
        font-weight: bold;
        font-size: 1em;
        white-space: nowrap;
        flex-shrink: 0;
        margin-right: 0.3em;
    }

    .desktop-nav-logo:hover {
        text-decoration: none;
        color: var(--nav-logo);
    }

    .desktop-nav-links {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
        flex: 1;
    }

    .desktop-nav-links > li {
        position: relative;
    }

    .desktop-nav-links > li > a,
    .desktop-nav-links > li > span {
        display: inline-block;
        padding: 0 0.6em;
        line-height: var(--header-height);
        color: var(--nav-link);
        text-decoration: none;
        white-space: nowrap;
        cursor: pointer;
    }

    .desktop-nav-links > li > a:hover,
    .desktop-nav-links > li > span:hover,
    .desktop-nav-links > li:hover > a,
    .desktop-nav-links > li:hover > span {
        color: var(--nav-link-hover);
    }

    .caret {
        display: inline-block;
        font-size: 0.7em;
        margin-left: 0.2em;
        opacity: 0.6;
    }

    .has-dropdown .dropdown {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-4px);
        transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-menu);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        border-radius: 0 0 4px 4px;
        z-index: 200;
    }

    .has-dropdown:hover .dropdown,
    .has-dropdown:focus-within .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown-categories {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 0.5em 0;
        min-width: 420px;
    }

    .dropdown-categories li {
        list-style: none;
    }

    .dropdown-categories a {
        display: block;
        padding: 0.35em 1em;
        color: var(--nav-link);
        text-decoration: none;
        white-space: nowrap;
        font-size: 0.92em;
    }

    .dropdown-categories a:hover {
        color: var(--nav-link-hover);
        background: rgba(255,255,255,0.05);
    }

    .dropdown-categories .dropdown-all {
        list-style: none;
        grid-column: 1 / -1;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 0.3em;
    }

    .dropdown-categories .dropdown-all a {
        font-size: 0.82em;
        text-align: center;
        color: var(--nav-link);
        padding: 0.3em 1em;
    }

    .dropdown-rankings {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 0.8em 0;
        min-width: 380px;
    }

    .dropdown-col {
        padding: 0 0.5em;
    }

    .dropdown-col-label {
        display: block;
        padding: 0 0.5em 0.3em;
        font-size: 0.78em;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: rgba(255,255,255,0.4);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 0.3em;
    }

    .dropdown-col a {
        display: block;
        padding: 0.3em 0.5em;
        color: var(--nav-link);
        text-decoration: none;
        font-size: 0.9em;
    }

    .dropdown-col a:hover {
        color: var(--nav-link-hover);
        background: rgba(255,255,255,0.05);
    }

    .desktop-nav-right {
        display: flex;
        align-items: center;
        gap: 0.5em;
        flex-shrink: 0;
    }

    .desktop-search {
        display: flex;
        align-items: center;
        margin: auto 0;
        position: relative;
    }

    .desktop-search .desktop-search-input {
        padding: 0 0.6em;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        color: #fff;
        font-family: inherit;
        font-size: 0.9em;
        border-radius: 3px 0 0 3px;
        width: 120px;
        max-width: none;
        margin: 0;
        box-sizing: border-box;
        outline: none;
        height: 26px;
        display: inline-block;
        transition: width 0.2s, background 0.2s;
    }

    .desktop-search-input::placeholder {
        color: rgba(255,255,255,0.5);
    }

    .desktop-search-input:focus {
        width: 170px;
        background: rgba(255,255,255,0.15);
        border-color: rgba(255,255,255,0.3);
    }

    .desktop-search-btn {
        padding: 0;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        border-left: none;
        color: rgba(255,255,255,0.7);
        cursor: pointer;
        border-radius: 0 3px 3px 0;
        height: 26px;
        position: relative;
        width: 30px;
    }

    .desktop-search-btn::before {
        content: '';
        width: 10px;
        height: 10px;
        border: 1.5px solid rgba(255,255,255,0.7);
        border-radius: 50%;
        position: absolute;
        top: 5px;
        left: 5px;
    }

    .desktop-search-btn::after {
        content: '';
        width: 5px;
        height: 1.5px;
        background: rgba(255,255,255,0.7);
        position: absolute;
        top: 17px;
        left: 16px;
        transform: rotate(45deg);
    }

    .desktop-nav-auth {
        display: inline-flex !important;
        gap: 0.3em;
        align-items: center;
    }

    .desktop-nav-btn {
        display: inline-block;
        padding: 0.2em 0.6em;
        color: var(--nav-link);
        text-decoration: none;
        font-size: 0.88em;
        border-radius: 3px;
        white-space: nowrap;
    }

    .desktop-nav-btn:hover {
        color: var(--nav-link-hover);
        text-decoration: none;
    }

    .desktop-nav-btn-primary {
        background: rgba(255,255,255,0.15);
        border: 1px solid rgba(255,255,255,0.25);
    }

    .desktop-nav-btn-primary:hover {
        background: rgba(255,255,255,0.25);
    }

    .desktop-nav-btn-outline {
        border: 1px solid rgba(255,255,255,0.25);
    }

    .desktop-nav-btn-outline:hover {
        background: rgba(255,255,255,0.1);
    }

    .desktop-theme-toggle {
        background: none;
        border: none;
        color: rgba(255,255,255,0.6);
        font-size: 1.2em;
        cursor: pointer;
        padding: 0.2em 0;
        line-height: 1;
        width: 2em;
        text-align: center;
    }

    .desktop-theme-toggle:hover {
        color: #fff;
    }

    .desktop-theme-toggle::after {
        content: '☼';
    }

    .desktop-theme-toggle[data-theme="light"]::after {
        content: '☾';
    }

    .desktop-nav a,
    .desktop-nav a:visited {
        color: inherit;
    }

    .authenticated .desktop-nav .desktop-nav-auth.show-auth { display: inline-flex !important; }
    .authenticated .desktop-nav .desktop-nav-auth.show-guest { display: none !important; }
    .anonymous .desktop-nav .desktop-nav-auth.show-guest { display: inline-flex !important; }
    .anonymous .desktop-nav .desktop-nav-auth.show-auth { display: none !important; }
    .role-admin .desktop-nav .show-admin { display: inline-block !important; }
    .desktop-nav .show-admin { display: none !important; }

    #menu {
        transform: translateX(-100%) !important;
    }

    .menu-toggle:checked ~ .mm-page {
        transform: none;
        box-shadow: none;
    }

    .menu-toggle:checked ~ #menu {
        transform: translateX(-100%) !important;
    }

    .menu-toggle:checked ~ .menu-overlay {
        display: none;
    }

    .mm-page {
        padding-top: var(--header-height);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .desktop-nav-inner {
        padding: 0 0.5em;
        gap: 0.1em;
    }

    .desktop-nav-logo {
        font-size: 0.9em;
        margin-right: 0.1em;
    }

    .desktop-nav-links > li > a,
    .desktop-nav-links > li > span {
        padding: 0 0.35em;
        font-size: 0.93em;
    }

    .desktop-search-input {
        width: 90px;
    }

    .desktop-search-input:focus {
        width: 120px;
    }
}

.language-bar {
    padding: 6px 0;
    margin-bottom: 12px;
    font-size: 0.88em;
    color: var(--text-secondary, #666);
    border-bottom: 1px solid var(--card-border, #eee);
}
.language-bar-text {
    margin-right: 6px;
}
.language-bar-link {
    font-weight: 600;
    margin: 0 3px;
}

.font-bar {
    display: flex;
    gap: 0.3em;
    margin-bottom: 0.8em;
    padding: 0.4em 0;
}

.font-bar-btn {
    display: inline-block;
    padding: 0.3em 0.7em;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.font-bar-btn:hover {
    background: var(--accent-green);
    color: var(--text-bright);
    border-color: var(--accent-green);
}

.story-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.story-content p {
    margin: 0 0 1.5em 0;
    font-size: inherit;
}

.font-tooltip {
    display: inline-block;
    padding: 0.3em 0.8em;
    background: var(--bg-menu);
    color: #fff;
    font-size: 0.82em;
    border-radius: var(--radius);
    margin-left: 0.5em;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    vertical-align: middle;
}

.lang-badge {
    display: inline-block;
    padding: 0.15em 0.5em;
    font-size: 0.75em;
    font-weight: bold;
    border-radius: 3px;
    margin-left: 0.5em;
    vertical-align: middle;
    background: var(--bg-menu);
    color: #fff;
    text-transform: uppercase;
}

.lang-badge.outdated {
    background: var(--color-danger);
}

.lang-badge.translated {
    background: var(--color-success, #28a745);
}
