/* =========================================================================
   Páginas Proibidas — tema escuro em tons de vermelho, com foco em leitura
   ========================================================================= */

:root {
  --bg:        #0b0708;
  --bg-soft:   #120c0f;
  --card:      #180f13;
  --card-2:    #1f1319;
  --line:      #311d24;
  --line-soft: #241419;

  --text:      #f4e9ec;
  --text-dim:  #c9b2b9;
  --muted:     #9b7f88;

  --red:       #d81e46;
  --red-soft:  #ff5c7a;
  --red-deep:  #7d0f27;
  --ember:     #ff8a5c;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 18px 40px rgba(0, 0, 0, .45);

  --ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;

  --reader-size: 1.16rem;
  --header-h: 62px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(216, 30, 70, .16), transparent 62%),
    radial-gradient(900px 480px at 92% 4%, rgba(125, 15, 39, .18), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red-soft); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }

.wrap        { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2rem); margin-inline: auto; }
.wrap-tight  { width: min(480px, 100% - 2rem); margin-inline: auto; padding: 3rem 0; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
.hide-sm { display: inline-flex; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 7, 8, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.1rem;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; letter-spacing: .2px; }
.brand__mark { font-size: 1.25rem; }
.brand__name {
  background: linear-gradient(92deg, var(--red-soft), var(--ember));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 1.1rem; margin-left: .6rem; font-size: .94rem; }
.site-nav a { color: var(--text-dim); }
.site-nav a:hover { color: var(--red-soft); }
.site-header__right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

.burger { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; margin: 4px 0; background: var(--text-dim); border-radius: 2px; }

/* dropdowns */
[data-dropdown] { position: relative; }
.langswitch__btn, .usermenu__btn {
  background: var(--card); border: 1px solid var(--line); color: var(--text-dim);
  border-radius: 999px; padding: .35rem .7rem; cursor: pointer; font: inherit; font-size: .85rem;
  display: inline-flex; align-items: center; gap: .35rem;
}
.langswitch__btn:hover, .usermenu__btn:hover { border-color: var(--red); color: var(--text); }
.dropdown {
  position: absolute; top: calc(100% + .5rem); left: 0; min-width: 170px;
  background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: .35rem; display: none; z-index: 60;
}
.dropdown--right { left: auto; right: 0; }
[data-dropdown].is-open .dropdown { display: block; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 7px;
  background: none; border: 0; color: var(--text-dim); font: inherit; cursor: pointer; font-size: .9rem;
}
.dropdown a:hover, .dropdown button:hover { background: rgba(216, 30, 70, .14); color: var(--text); }
.dropdown a.is-active { color: var(--red-soft); }

.avatar {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(145deg, var(--red-deep), #2a1017); font-size: .95rem;
}
.avatar--lg { width: 68px; height: 68px; font-size: 2rem; }

/* ---------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .62rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; transition: .18s ease;
  white-space: nowrap;
}
.btn--primary { background: linear-gradient(100deg, var(--red), var(--red-deep)); color: #fff; box-shadow: 0 8px 22px rgba(216, 30, 70, .28); }
.btn--primary:hover { filter: brightness(1.1); color: #fff; }
.btn--ghost { background: rgba(255, 255, 255, .03); border-color: var(--line); color: var(--text-dim); }
.btn--ghost:hover { border-color: var(--red); color: var(--text); }
.btn--ghost.is-on { border-color: var(--red); color: var(--red-soft); }
.btn--sm { padding: .4rem .8rem; font-size: .84rem; }
.btn--block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--red-soft); }
.link-btn--danger:hover { color: #ff5c5c; }
.link-more { color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------------- hero */
.hero { padding: 4.2rem 0 2.4rem; text-align: center; }
.hero__eyebrow { letter-spacing: .28em; text-transform: uppercase; font-size: .68rem; color: var(--muted); margin: 0 0 .8rem; }
.hero__title {
  font-family: var(--serif); font-size: clamp(2.6rem, 8vw, 4.4rem); font-weight: 600; letter-spacing: -.02em;
  background: linear-gradient(96deg, #fff 8%, var(--red-soft) 55%, var(--ember));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { color: var(--text-dim); font-size: 1.05rem; margin: 0 auto 1.6rem; max-width: 40ch; }
.hero__actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- seções */
.section { margin: 2.6rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section__title {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: .6rem;
}
.section__title::after { content: ""; display: block; width: 46px; height: 1px; background: linear-gradient(90deg, var(--red), transparent); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem 0 1rem; }
.page-title { font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; margin: 0; }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--featured { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--card), var(--bg-soft));
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--red); box-shadow: var(--shadow); }
.card__link { display: flex; flex-direction: column; height: 100%; }
.card__cover {
  position: relative; height: 104px; display: grid; place-items: center; font-size: 2.4rem;
  background: radial-gradient(120% 130% at 50% 0%, rgba(216, 30, 70, .3), transparent 62%), var(--card-2);
  border-bottom: 1px solid var(--line-soft);
}
.card__body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin: 0; }
.card__synopsis { color: var(--text-dim); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
.card__foot { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: auto; padding-top: .3rem; }
.card__tags { display: flex; gap: .3rem; flex-wrap: wrap; }

.stars i { font-style: normal; color: #4a3138; font-size: .95rem; }
.stars i.on { color: var(--red-soft); }
.heat { letter-spacing: -3px; }

.badge {
  font-style: normal; font-size: .66rem; text-transform: uppercase; letter-spacing: .1em;
  padding: .16rem .45rem; border-radius: 5px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .35); color: var(--text-dim);
}
.badge--house { border-color: var(--red); color: var(--red-soft); }
.badge--draft { border-color: #6b5a25; color: #d9bd6a; }
.card__cover .badge { position: absolute; top: .5rem; right: .5rem; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
  color: var(--text-dim); border-radius: 999px; padding: .3rem .72rem; font-size: .82rem; cursor: pointer;
}
.chip:hover { border-color: var(--red); color: var(--red-soft); }
.chip--sm { padding: .16rem .55rem; font-size: .74rem; }
.chip--muted { color: var(--muted); }
.chip--warn { border-color: #6b5a25; color: #d9bd6a; }
.chip--clear { border-color: transparent; color: var(--muted); }
.chip.is-on { border-color: var(--red); background: rgba(216, 30, 70, .16); color: var(--text); }
.chip em { font-style: normal; color: var(--muted); font-size: .7rem; }
.chip--check input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------------------------------------------------------------- layouts */
.layout-with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.6rem; align-items: start; }
.side { position: sticky; top: calc(var(--header-h) + 1rem); }

.layout-filters { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 1.6rem; align-items: start; padding-bottom: 3rem; }

/* ---------------------------------------------------------------- filtros */
.filters {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 1.1rem; display: flex; flex-direction: column; gap: .95rem;
  position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100vh - var(--header-h) - 2rem); overflow-y: auto;
}
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__head h2 { font-size: 1rem; margin: 0; }
.filters__close { display: none; background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.filters__actions { display: flex; flex-direction: column; gap: .5rem; }

.field { display: flex; flex-direction: column; gap: .35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field legend { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.field--check { flex-direction: row; align-items: center; gap: .5rem; }
.field--check span { text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--text-dim); }
.field--narrow { max-width: 130px; }
.field--admin { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; gap: .5rem; }
.hint { font-style: normal; font-size: .78rem; color: var(--muted); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); padding: .58rem .7rem; font: inherit; font-size: .92rem; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(216, 30, 70, .16); }
textarea { resize: vertical; line-height: 1.6; }
.editor { font-family: var(--serif); font-size: 1.02rem; min-height: 340px; }
input[type="range"] { accent-color: var(--red); width: 100%; }
input[type="checkbox"] { accent-color: var(--red); width: 16px; height: 16px; }

.results__bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.results__bar .btn--ghost[data-filters-toggle] { display: none; }
.chips--active { gap: .3rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 0; }
.pagination__info { color: var(--muted); font-size: .86rem; }

/* ---------------------------------------------------------------- leitura */
.progressbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.progressbar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), var(--ember)); transition: width .1s linear; }

.breadcrumb { padding: 1.6rem 0 0; font-size: .8rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red-soft); }

.story__head { padding: 1.4rem 0 1.2rem; }
.story__kicker { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .8rem; color: var(--red-soft); text-transform: uppercase; letter-spacing: .1em; }
.story__title { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3rem); font-weight: 600; margin: .5rem 0 .4rem; letter-spacing: -.02em; }
.story__synopsis { color: var(--text-dim); font-size: 1.05rem; font-family: var(--serif); font-style: italic; margin: 0 0 1rem; }
.story__byline { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .85rem; color: var(--text-dim); }
.byline { display: inline-flex; align-items: center; gap: .4rem; }
.story__tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }
.story__tools form { margin: 0; }

.notice {
  margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--radius-sm);
  background: rgba(217, 189, 106, .08); border: 1px solid rgba(217, 189, 106, .3);
  color: #e2c887; font-size: .86rem;
}

.story__body {
  font-family: var(--serif);
  font-size: var(--reader-size);
  line-height: 1.85;
  color: #efe2e5;
  padding-bottom: 1.5rem;
}
.story__body p { margin: 0 0 1.35em; }
.story__body p:first-of-type::first-letter {
  font-size: 3.1em; float: left; line-height: .82; padding: .05em .09em 0 0;
  color: var(--red-soft); font-weight: 600;
}
.story__end { text-align: center; color: var(--muted); font-style: italic; letter-spacing: .3em; text-transform: uppercase; font-size: .7rem; padding: 1.5rem 0 0; }
.prose { font-family: var(--serif); font-size: 1.06rem; line-height: 1.8; }

/* controles fixos de tamanho de fonte: sempre à mão, sem rolar */
.reader-controls {
  position: fixed; right: 1rem; bottom: 1.1rem; z-index: 55;
  display: flex; gap: .3rem; padding: .3rem;
  background: rgba(24, 15, 19, .92); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.reader-controls button {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: none; color: var(--text-dim); font: inherit; font-weight: 700; font-size: .9rem;
}
.reader-controls button:active { background: rgba(216, 30, 70, .2); color: #fff; }
body:not(.reading) .reader-controls { display: none; }

/* ---------------------------------------------------------------- painéis */
.panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.3rem; margin: 1.6rem 0; }
.panel--auth { padding: 1.8rem; }
.panel__title { font-family: var(--serif); font-size: 1.25rem; margin-bottom: .9rem; }

.rating-form { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rating-stars { display: inline-flex; flex-direction: row-reverse; }
.rating-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rating-stars label { font-size: 2rem; color: #4a3138; cursor: pointer; padding: 0 .06em; transition: color .12s; }
.rating-stars input:checked ~ label,
.rating-stars label:hover, .rating-stars label:hover ~ label { color: var(--red-soft); }

.form { display: flex; flex-direction: column; gap: .9rem; }
.form__row { display: flex; gap: .8rem; flex-wrap: wrap; }
.form__row > .field { flex: 1 1 180px; }
.form__actions { display: flex; gap: .6rem; flex-wrap: wrap; padding-top: .5rem; }
.oauth { margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }

.tabs__nav { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.tabs__btn {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: .4rem .9rem; color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer;
}
.tabs__btn.is-active { border-color: var(--red); color: var(--text); background: rgba(216, 30, 70, .12); }
.tabs__btn em { color: var(--red-soft); font-style: normal; }
.tabs__panel { display: none; flex-direction: column; gap: .9rem; }
.tabs__panel.is-active { display: flex; }

.comments { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.comments--replies { margin: .8rem 0 0; padding-left: .6rem; border-left: 2px solid var(--line); }
.comment { display: flex; gap: .7rem; }
.comment__head { margin: 0 0 .2rem; font-size: .88rem; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.comment__body { margin: 0; color: var(--text-dim); font-size: .95rem; }
.comment-form { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.comment-form textarea { width: 100%; }
.comment-form--reply { margin-top: .5rem; }

.profile { display: flex; gap: 1.2rem; align-items: center; padding: 2.4rem 0 1rem; flex-wrap: wrap; }
.profile__bio { color: var(--text-dim); margin: .3rem 0; max-width: 60ch; }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.history__item { display: flex; align-items: center; gap: 1rem; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .8rem 1rem; }
.history__cover { font-size: 1.6rem; }
.history__body { flex: 1; min-width: 0; }
.history__title { font-family: var(--serif); font-size: 1.05rem; }
.history__bar { height: 4px; border-radius: 4px; background: var(--line); margin: .4rem 0 .3rem; overflow: hidden; }
.history__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--ember)); }

/* ---------------------------------------------------------------- tabelas */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
.table td { padding: .65rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr.is-muted { opacity: .5; }
.table .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.table .actions form { margin: 0; }

.admin-nav { display: flex; gap: .4rem; flex-wrap: wrap; padding: 1.4rem 0 0; }
.admin-nav a { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line); font-size: .86rem; color: var(--text-dim); }
.admin-nav a.is-active, .admin-nav a:hover { border-color: var(--red); color: var(--red-soft); }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; }
.stat { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1rem; text-align: center; }
.stat b { display: block; font-size: 1.6rem; font-family: var(--serif); color: var(--red-soft); }
.stat span { font-size: .76rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------------------------------------------------------------- analytics */
.stats--wide { grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); margin-bottom: 1rem; }
.stats--wide .stat b { font-size: 1.35rem; }

.chart { position: relative; }
.chart svg { width: 100%; height: 260px; display: block; }
.chart__grid { stroke: var(--line-soft); stroke-width: 1; }
.chart__area { fill: rgba(216, 30, 70, .16); }
.chart__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart__line--pv { stroke: var(--red-soft); }
.chart__line--visits { stroke: var(--ember); stroke-dasharray: 5 4; }
.chart__axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); padding-top: .3rem; }
.chart__legend { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); padding-top: .6rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--pv { background: var(--red-soft); }
.dot--visits { background: var(--ember); margin-left: .8rem; }

.barlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.barlist li { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(60px, 2fr) auto; align-items: center; gap: .6rem; font-size: .86rem; }
.barlist__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.barlist__track { height: 8px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.barlist__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--ember)); }
.barlist__value { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.barlist__value em { font-style: normal; color: #6f545c; }

.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 140px; }
.hours__col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: .25rem; }
.hours__bar { width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--red-soft), var(--red-deep)); }
.hours__col em { font-style: normal; font-size: .58rem; color: var(--muted); }

@media (max-width: 760px) {
  .hours__col em { display: none; }
  .barlist li { grid-template-columns: minmax(60px, 1fr) 1.4fr auto; font-size: .8rem; }
}

/* ---------------------------------------------------------------- flashes */
.flashes { padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.flash { padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .9rem; border: 1px solid var(--line); background: var(--card); }
.flash--error { border-color: rgba(255, 92, 92, .4); color: #ff9d9d; }
.flash--success { border-color: rgba(216, 30, 70, .4); color: var(--red-soft); }

/* ---------------------------------------------------------------- anúncios
   Discretos por definição: nunca cobrem texto, nunca são fixos no mobile.  */
.ad { display: block; margin: 1.6rem 0; text-align: center; }
.ad__label { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .18em; color: #5d464d; margin-bottom: .3rem; }
.ad__box {
  border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .012);
  min-height: 90px; display: grid; place-items: center;
}
.ad--side .ad__box { min-height: 600px; }
.ad--inline .ad__box { min-height: 100px; }
.ad--footer .ad__box { min-height: 120px; }

/* ---------------------------------------------------------------- rodapé */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 3rem; padding: 2rem 0 3rem; background: rgba(0, 0, 0, .25); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.site-footer__brand { font-family: var(--serif); font-size: 1.1rem; margin: 0; }
.site-footer__links { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }

/* ---------------------------------------------------------------- age gate */
.agegate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(6, 3, 4, .93); backdrop-filter: blur(10px); }
.agegate__panel {
  background: linear-gradient(180deg, var(--card-2), var(--bg-soft));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2rem 1.6rem; max-width: 420px; text-align: center;
}
.agegate__mark { font-size: 2.2rem; }
.agegate__panel h1 { font-family: var(--serif); font-size: 1.6rem; }
.agegate__panel p { color: var(--text-dim); font-size: .92rem; }
.agegate__leave { display: inline-block; margin-top: .9rem; color: var(--muted); font-size: .82rem; }

.error-page { text-align: center; }
.error-page__code { font-family: var(--serif); font-size: 4rem; color: var(--red-soft); margin: 0; }

/* ========================================================================= */
/* mobile                                                                    */
/* ========================================================================= */
@media (max-width: 980px) {
  .layout-with-side { grid-template-columns: 1fr; }
  .side { position: static; }
  .ad--side { display: none; }           /* nunca ocupa espaço no mobile */
  .layout-filters { grid-template-columns: 1fr; }

  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 90; max-height: 82vh;
    border-radius: var(--radius) var(--radius) 0 0; transform: translateY(101%);
    transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .filters.is-open { transform: translateY(0); }
  .filters__close { display: block; }
  .results__bar .btn--ghost[data-filters-toggle] { display: inline-flex; }
}

/* O menu inline só cabe em telas largas: abaixo disso vira gaveta, senão os
   links de usuário logado transbordam o cabeçalho. */
@media (max-width: 900px) {
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: .5rem 1rem 1rem;
    background: var(--bg-soft); border-bottom: 1px solid var(--line); display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
  .burger { display: block; }
  .hide-sm { display: none; }
  .brand__name { font-size: .95rem; }
}

@media (max-width: 760px) {
  .hero { padding: 2.6rem 0 1.4rem; }
  .grid { grid-template-columns: 1fr; }
  .grid--featured { grid-template-columns: 1fr; }

  /* leitura no celular: linha mais larga e controles ao alcance do polegar */
  .wrap-narrow { width: min(760px, 100% - 1.6rem); }
  .story__body { line-height: 1.8; }
  .reader-controls { right: .7rem; bottom: .8rem; }
  .story__head { padding-top: 1.6rem; }
  .ad--inline .ad__box, .ad--top .ad__box { min-height: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
