:root {
  --paper: #faf8f5;
  --surface: #fffdfa;
  --ink: #292328;
  --line: #e5dcd7;
  --accent: #8c2549;
  --soft: #f4e7eb;
  --quiet: #655762;
  --heading: Georgia, 'Times New Roman', serif;
}
body { background: var(--paper); color: var(--ink); }
a:hover { color: var(--accent); }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid #a53762; }
main, .footer { width: min(1120px, calc(100% - 2.5rem)); }
.mast { background: #281d27; }
.mast-inner { width: min(1180px, calc(100% - 2rem)); gap: .7rem 1.1rem; padding: .85rem 0; }
.mast .brand { font: 700 1.38rem var(--heading); letter-spacing: -.025em; }
.mast nav, .mast-actions, .mast form { font-size: .87rem; }
.mast nav a, .mast-actions > a:not(.action) { text-decoration: none; }
.mast nav a:hover, .mast-actions > a:hover { text-decoration: underline; }
.mast input { background: #fbf7f8; border: 0; color: var(--ink); }
.mast form button { background: #f0dbe4; color: #371d2d; padding-inline: .6rem; }
.mast .action { background: #f1d9e4; color: #3e2134; }
.support { background: #f3e9e9; color: #563c49; border-bottom: 1px solid var(--line); font-size: .9rem; }
.support .plain { font-weight: 650; }
.hero { margin: 2.6rem 0 3.7rem; }
.hero-heading { padding-bottom: 2rem; }
.hero h1 { font: 400 clamp(3.2rem, 9vw, 7.1rem)/.98 var(--heading); letter-spacing: -.075em; margin: .18em 0 .16em; color: #2a1c28; }
.hero em { color: var(--accent); }
.hero p { color: var(--quiet); }
.eyebrow, .hero .eyebrow { color: #843354; font-size: .76rem; letter-spacing: .12em; font-weight: 700; }
.hero .cover {
  min-height: 15rem;
  border: 0;
  border-radius: 1rem;
  box-shadow: none;
  background: radial-gradient(ellipse at 75% 15%, #793d55, transparent 58%), linear-gradient(110deg, #2c2031, #4c2942 62%, #49273e);
  color: #fff6f4;
}
.cover strong { letter-spacing: -.035em; }
.hero .cover button { border-color: #ddbdcf; background: #362237; }
.portal { grid-template-columns: .95fr 1.18fr 1fr; gap: clamp(1.15rem, 3vw, 2.7rem); margin-bottom: 3.3rem; }
.portal > div+div { padding-left: clamp(1rem, 2.5vw, 2.2rem); border-color: var(--line); }
.portal h2 { font-family: var(--heading); font-weight: 400; border-top: 1px solid #c9a5b4; line-height: 1.08; }
.portal h3 { letter-spacing: -.02em; }
.portal article { border-color: var(--line); }
.portal article > p, .portal time, .portal small, .footer p, .muted { color: var(--quiet); }
.portal time, .portal small { font-size: .88rem; }
.plain { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.plain:hover { color: var(--accent); }
.reader-nav { border-color: var(--line); background: var(--surface); border-radius: .8rem; padding: 1.05rem; gap: 0; }
.portal .reader-nav h2 { border: 0; padding: 0 0 .55rem; margin: 0; }
.reader-nav a { font-size: .94rem; text-decoration: none; }
.reader-nav a:hover { text-decoration: underline; }
.register { background: var(--soft); border-radius: .65rem; }
.illustration { border-radius: .9rem; }
.editorial-figure figcaption { margin-top: .5rem; font-size: .9rem; }
.action, .action:hover { background: var(--accent); color: #fffaf8; }
.action:hover { background: #70203e; }
.secondary { background: var(--surface); border-color: #cdaebd; color: #692845; }
.secondary:hover { background: var(--soft); }
.card .secondary[aria-pressed=true] { background: var(--soft); color: #692845; }
#arquivo { border-top: 1px solid var(--line); padding-top: 1.7rem; }
#catalog-note:empty, #arquivo > .muted:has(#catalog-note:empty) { display: none; }
.controls { margin: 1rem 0; grid-template-columns: 1.6fr repeat(3, 1fr); }
.controls label { color: var(--quiet); font-size: .9rem; font-weight: 600; }
.controls input, .controls select, .comment-area input, .comment-area textarea { background: var(--surface); color: var(--ink); border-color: #d9c6cf; }
.card, .rank-panel { background: var(--surface); border-color: var(--line); color: var(--ink); border-radius: .85rem; }
.card p { color: var(--quiet); }
.card .actions { padding-top: 1rem; }
.rankings { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rank-panel h3 { font: 400 1.28rem var(--heading); }
.footer { border-color: var(--line); padding: 2rem 0; }
.footer nav { font-size: .93rem; }
.footer nav > a { text-decoration: none; }
.footer nav > a:hover { text-decoration: underline; }
dialog { background: var(--surface); color: var(--ink); border-color: #d8c4cd; border-radius: 1rem; }
dialog::backdrop { background: #211824d9; }
#story { color: #302731; }
@media(max-width: 950px) {
  .mast form { width: 100%; }
  .mast input { flex: 1; }
  .rankings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 760px) {
  .portal { grid-template-columns: 1fr; gap: 2rem; }
  .portal > div+div { border-left: 0; padding-left: 0; }
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mast nav { gap: .5rem .8rem; }
}
@media(max-width: 460px) {
  main, .footer { width: calc(100% - 1.5rem); }
  .hero { margin-top: 1.5rem; }
  .hero .cover { min-height: 12rem; }
  .mast .brand img { width: 38px; height: 35px; }
  .controls, .rankings { grid-template-columns: 1fr; }
}


/* Edição editorial */
.hero-heading {
  padding: clamp(2rem, 7vw, 5.25rem) 1rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: radial-gradient(ellipse at center, #fffdfa 20%, #f7edf0 100%);
}
.hero-heading .eyebrow { letter-spacing: .16em; }
.hero .cover { margin-top: .85rem; }
.mast nav { column-gap: .95rem; }
.editorial-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .85rem;
}
#theme-list .secondary { border-radius: 999px; padding: .34rem .75rem; font-size: .9rem; }
#series-list > section { border-top: 1px solid var(--line); padding-block: 1.15rem; }
#series-list h3 { font: normal 1.55rem var(--heading); }
#series-list article { padding: .3rem 0 .8rem; }
#series-list article p { margin: .35rem 0; color: var(--quiet); }
/* Realce editorial para os contos publicados */
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: .16em; }
.card .eyebrow { border-radius: 999px; background: var(--soft); padding: .25rem .6rem; letter-spacing: .065em; }
.card .cover-image { border-radius: .6rem; }
.card:focus-within { border-color: #b67894; }
.hero-heading { box-shadow: inset 0 1px #fff; }
