/* ==========================================================
   KRYVORA MANGÁ — Experiência do leitor
   Início, explorar, loja, página do mangá, leitor, biblioteca, perfil.
   Carrega depois de components.css e só estende o que já existe.
   ========================================================== */

/* ---------- Cabeçalho do leitor (menu superior) ---------- */
.no-side .topbar { gap: 22px; padding: 0 32px; }
.no-side .topbar .logo { display: inline-flex; }
.no-side .topbar .logo b { font-size: 28px; }
.no-side .topbar .logo small { font-size: 11px; }
.no-side .search { max-width: 400px; margin-left: auto; }
.no-side .topbar-actions { margin-left: 0; }
.top-nav a { position: relative; }
.top-nav a.active { background: transparent; color: #fff; }
.top-nav a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: var(--red-hot); border-radius: 2px; }
@media (min-width: 901px) { .no-side .top-nav { display: flex; } .only-sm { display: none !important; } }
@media (max-width: 900px) { .hide-sm { display: none !important; } .no-side .topbar-actions { margin-left: auto; } }
@media (max-width: 560px) { .no-side .topbar-actions .btn-primary { display: none; } .no-side .topbar-actions .btn-ghost { display: inline-flex; } }
.no-side .page { padding-top: 28px; }

/* ---------- Cards ---------- */
.card-author { font-size: 12.5px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.age { position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.72); border: 1px solid var(--line-strong); }
.badge.green + .age { right: 8px; }

/* ---------- Carregando (skeleton) ---------- */
@keyframes shimmer { to { background-position: -200% 0; } }
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; }
.sk-card .sk-cover { aspect-ratio: 2/3; border-radius: var(--r-md); }
.sk-card .sk-line { height: 12px; margin-top: 10px; } .sk-card .sk-line.s { width: 60%; }

/* ---------- Destaque da página inicial ---------- */
.feat { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); border: 1px solid var(--line-strong); display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; padding: 52px 60px; min-height: 500px; }
.feat-bg { position: absolute; inset: -60px; z-index: -2; filter: blur(48px) saturate(1.4); opacity: .6; }
.feat-bg svg { width: 100%; height: 100%; }
.feat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,7,10,.94) 0%, rgba(7,7,10,.62) 55%, rgba(7,7,10,.82) 100%); }
.feat-body { max-width: 600px; animation: rise .6s var(--ease) both; }
.feat-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.feat-kicker .tag { background: rgba(229,32,46,.18); color: #ff6a76; }
.feat h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(52px, 7.4vw, 104px); line-height: .9; letter-spacing: .015em; text-transform: uppercase; margin: 16px 0 14px; text-shadow: 0 6px 40px rgba(0,0,0,.55); }
.feat-by { color: var(--text-2); font-size: 14.5px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.feat-by b { color: var(--text); font-weight: 600; }
.feat-syn { color: var(--text-2); font-size: 16px; line-height: 1.6; margin: 18px 0 26px; max-width: 520px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.feat-cover { width: 100%; max-width: 300px; justify-self: center; transform: rotate(2.5deg); animation: rise .6s var(--ease) both; }
.feat-cover .cover { box-shadow: 0 40px 80px -24px var(--feat-glow, var(--red-glow)), 0 0 0 1px rgba(255,255,255,.08); border-radius: var(--r-lg); }
.feat-dots { position: absolute; left: 60px; bottom: 22px; display: flex; gap: 8px; }
.feat-dots button { width: 28px; height: 28px; background: none; border: 0; padding: 0; display: grid; place-items: center; }
.feat-dots button::after { content: ""; width: 22px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.25); transition: .3s var(--ease); }
.feat-dots button.active::after { background: var(--red-hot); width: 34px; }
.feat-dots button:hover::after { background: rgba(255,255,255,.55); }
.feat-dots button.active:hover::after { background: var(--red-hot); }

/* ---------- Ranking (Mais lidos) ---------- */
.ranked { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 28px; }
.rk { display: grid; grid-template-columns: 44px 62px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 12px 10px 4px; border-radius: var(--r-md); border: 1px solid transparent; transition: .2s var(--ease); }
.rk:hover { background: var(--surface); border-color: var(--line); }
.rk-n { font-family: var(--font-display); font-size: 46px; line-height: 1; text-align: center; color: transparent; -webkit-text-stroke: 1.4px rgba(255,255,255,.35); }
.rk:nth-child(-n+3) .rk-n { -webkit-text-stroke-color: var(--red-hot); }
.rk .cover { border-radius: 8px; box-shadow: none; }
.rk b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.rk small.rating { color: var(--amber); }

/* ---------- Barra de filtros (Explorar / Loja) ---------- */
.toolbar { display: grid; gap: 14px; margin-bottom: 26px; position: sticky; top: var(--topbar-h); z-index: 20; padding: 12px 0; background: linear-gradient(180deg, var(--bg) 70%, transparent); }
.toolbar-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.toolbar .search { display: block; max-width: none; flex: 1 1 320px; }
.toolbar .select { height: 42px; width: auto; min-width: 190px; border-radius: 99px; padding-right: 10px; background: var(--surface); }
.seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.seg button { height: 34px; padding: 0 16px; border: 0; background: none; border-radius: 99px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.seg button.active { background: var(--surface-3); color: #fff; box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button:not(.active):hover { color: #fff; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--text-2); font-size: 14px; }
.result-line button { background: none; border: 0; color: var(--red-hot); font-weight: 600; font-size: 13.5px; padding: 4px 0; }
.empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; padding: 70px 20px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-state .ico { width: 34px; height: 34px; color: var(--text-3); }
.empty-state h3 { font-size: 18px; } .empty-state p { color: var(--text-2); max-width: 380px; }
.shop-note { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--r-lg); background: linear-gradient(90deg, rgba(229,32,46,.14), transparent), var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.shop-note .ico { color: var(--red-hot); width: 22px; height: 22px; }
.shop-note b { color: var(--text); }

/* ---------- Página do mangá ---------- */
.md-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-xl); border: 1px solid var(--line-strong); padding: 48px; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.md-bg { position: absolute; inset: -60px; z-index: -2; filter: blur(50px) saturate(1.3); opacity: .5; }
.md-bg svg { width: 100%; height: 100%; }
.md-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,7,10,.9), rgba(7,7,10,.7) 60%, rgba(7,7,10,.85)); }
.md-hero .cover { box-shadow: 0 34px 70px -22px var(--md-glow, var(--red-glow)); border-radius: var(--r-lg); }
.md-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(46px, 6vw, 84px); line-height: .92; text-transform: uppercase; margin: 12px 0 10px; }
.md-by { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-2); }
.md-by a:hover b { color: var(--red-hot); }
.md-by b { color: #fff; }
.btn.on { color: var(--red-hot); border-color: rgba(229,32,46,.55); background: rgba(229,32,46,.1); }
.md-stats { display: flex; flex-wrap: wrap; gap: 18px 36px; margin: 22px 0; }
.md-stats div b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .03em; line-height: 1; }
.md-stats div span { font-size: 12.5px; color: var(--text-3); }
.md-syn { color: var(--text-2); font-size: 16.5px; line-height: 1.65; max-width: 62ch; }
.md-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.stars { display: inline-flex; align-items: center; gap: 2px; }
.stars button { background: none; border: 0; padding: 3px; color: var(--surface-3); line-height: 0; transition: transform .15s var(--ease), color .15s; }
.stars button .ico { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.stars button.on { color: var(--amber); } .stars button:hover { transform: scale(1.18); }
.rate-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; }
.rate-line .score { font-family: var(--font-display); font-size: 34px; color: #fff; letter-spacing: .02em; line-height: 1; }
.ch-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ch-list { display: grid; gap: 8px; margin-top: 16px; }
.ch { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 12px 14px 12px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.ch:hover { border-color: var(--line-strong); background: var(--surface-2); }
.ch .num { font-family: var(--font-display); font-size: 26px; color: var(--text-3); }
.ch .t { min-width: 0; } .ch .t a { font-weight: 600; font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .t a:hover { color: var(--red-hot); }
.ch .t small { color: var(--text-3); font-size: 12.5px; }
.ch.read .num { color: var(--green); }
.ch.current { border-color: rgba(229,32,46,.5); }
.ch-act { display: flex; gap: 8px; }
.more-row { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Biblioteca ---------- */
.resume { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 26px; align-items: center; padding: 22px 26px; border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: radial-gradient(90% 160% at 0 50%, rgba(229,32,46,.16), transparent 60%), var(--surface); margin-bottom: 34px; }
.resume .cover { border-radius: var(--r-md); }
.resume small { color: var(--text-3); font-size: 12.5px; }
.resume h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: .02em; text-transform: uppercase; margin: 4px 0 6px; }
.resume p { color: var(--text-2); font-size: 14px; margin-bottom: 12px; }
.pbar { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--red-hot); border-radius: 4px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.lib-card { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.lib-card:hover { border-color: var(--line-strong); }
.lib-card .cover { border-radius: 10px; box-shadow: none; }
.lib-card h3 { font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card .sub { color: var(--text-3); font-size: 12.5px; margin: 3px 0 10px; }
.lib-card .info { display: flex; flex-direction: column; min-width: 0; }
.lib-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; }
.lib-card .pct { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tag.done { background: rgba(47,209,122,.14); color: var(--green); }

/* ---------- Perfil ---------- */
.profile-head { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; padding: 30px; border-radius: var(--r-xl); border: 1px solid var(--line-strong); background: radial-gradient(70% 160% at 100% 0, rgba(229,32,46,.14), transparent 60%), var(--surface); margin-bottom: 30px; }
.avatar-lg { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 46px; letter-spacing: .04em; border: 3px solid rgba(255,255,255,.16); flex: none; background: var(--av, linear-gradient(135deg, var(--red), var(--red-deep))); }
.profile-head h1 { font-size: 30px; }
.profile-head .handle { color: var(--text-2); margin-top: 4px; }
.profile-stats { display: flex; gap: 28px; margin-left: auto; flex-wrap: wrap; }
.profile-stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: .03em; }
.profile-stats span { font-size: 12.5px; color: var(--text-3); }
.swatches { display: flex; gap: 8px; margin-top: 14px; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; background: var(--c); padding: 0; }
.swatches button.on { border-color: #fff; }
.hist { display: grid; gap: 10px; }
.hist-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.hist-item .cover { border-radius: 8px; box-shadow: none; }
.hist-item b { display: block; font-size: 14.5px; } .hist-item small { color: var(--text-3); font-size: 12.5px; }

/* ---------- Leitor dedicado ---------- */
body.rd { background: #050507; --zoom: 1; --avail: 100vw; }
.rd-top { position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: rgba(5,5,7,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: transform .28s var(--ease); }
.rd-top .crumb { flex: 1; min-width: 0; margin: 0 6px; line-height: 1.2; }
.rd-top .crumb small { display: block; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-top .crumb b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-tools { display: flex; align-items: center; gap: 6px; }
.rd-top .icon-btn { width: 38px; height: 38px; background: transparent; border-color: transparent; }
.rd-top .icon-btn:hover, .rd-top .icon-btn[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line-strong); }
.rd-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px; border-radius: 12px; border: 1px solid var(--line); }
.rd-zoom span { min-width: 46px; text-align: center; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }
.rd-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 60; background: var(--red-hot); box-shadow: 0 0 10px var(--red); transition: width .2s linear; }
.rd-thumbs { position: fixed; top: 56px; bottom: 0; left: 0; width: 104px; z-index: 40; overflow-y: auto; padding: 14px 10px 90px; display: none; gap: 10px; align-content: start; background: #050507; border-right: 1px solid var(--line); }
body.rd.thumbs-on .rd-thumbs { display: grid; }
.rd-thumbs button { position: relative; padding: 0; background: #fff; border: 2px solid transparent; border-radius: 6px; overflow: hidden; aspect-ratio: 2/3; opacity: .5; transition: .2s; }
.rd-thumbs button.vert { aspect-ratio: 2/3; }
.rd-thumbs button.active, .rd-thumbs button:hover { opacity: 1; border-color: var(--red-hot); }
.rd-thumbs button svg { width: 100%; height: 100%; object-fit: cover; }
.rd-thumbs em { position: absolute; left: 4px; bottom: 4px; font-style: normal; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.75); border-radius: 99px; padding: 0 7px; }
.rd-stage { padding: 56px 0 110px; display: flex; flex-direction: column; align-items: flex-start; overflow-x: auto; min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
@media (min-width: 901px) { body.rd.thumbs-on .rd-stage { margin-left: 104px; } body.rd.thumbs-on { --avail: calc(100vw - 104px); } }
.rd-page { flex: none; margin: 0 auto; width: calc(min(var(--avail), 840px) * var(--zoom)); background: #fff; line-height: 0; }
.rd-page svg { width: 100%; height: auto; display: block; }
.rd-page.strip { background: #0b0b10; }
body.rd.paged .rd-stage { padding-top: 64px; padding-bottom: 96px; }
body.rd.paged .rd-page { width: auto; height: calc((100dvh - 168px) * var(--zoom)); aspect-ratio: 600 / 880; max-width: none; cursor: pointer; box-shadow: 0 30px 80px -30px #000; }
body.rd.paged .rd-page.strip { aspect-ratio: auto; width: calc(min(var(--avail), 600px) * var(--zoom)); height: auto; }
body.rd.paged .rd-page svg { height: 100%; }
body.rd.paged .rd-page.strip svg { height: auto; }
.rd-card { flex: none; margin: 28px auto 0; width: min(calc(var(--avail) - 32px), 560px); text-align: center; padding: 34px 26px; line-height: 1.5; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-strong); }
.rd-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 36px; letter-spacing: .03em; text-transform: uppercase; }
.rd-card p { color: var(--text-2); margin: 8px 0 20px; }
.rd-card .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
body.rd.paged .rd-card { margin-top: 0; }
.rd-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 45; width: min(560px, calc(100vw - 24px)); display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 99px; background: rgba(17,17,24,.92); backdrop-filter: blur(14px); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); transition: transform .28s var(--ease); }
.rd-bar .icon-btn { width: 38px; height: 38px; border-radius: 50%; background: transparent; border-color: transparent; flex: none; }
.rd-bar .icon-btn:hover { background: var(--surface-3); }
.rd-bar .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.rd-bar .count { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 62px; text-align: center; }
.rd-bar input[type=range] { flex: 1; min-width: 0; accent-color: var(--red-hot); height: 24px; }
body.rd.ui-off .rd-top { transform: translateY(-100%); }
body.rd.ui-off .rd-bar { transform: translate(-50%, 160%); }
body.rd.ui-off .rd-progress { opacity: .6; }
@media (max-width: 900px) {
  .rd-thumbs { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 138px; padding: 12px 12px 12px; grid-auto-flow: column; grid-auto-columns: 74px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--line-strong); z-index: 48; background: rgba(5,5,7,.96); }
  body.rd.thumbs-on .rd-bar { bottom: 150px; }
  .rd-zoom { display: none; }
  .rd-top .hide-m { display: none; }
  body.rd.paged .rd-page { height: calc((100dvh - 150px) * var(--zoom)); }
}
@media (hover: none) { .rd-zoom { display: none; } }

/* ---------- Início: seções ---------- */
.section-head .sub { color: var(--text-3); font-size: 13.5px; font-weight: 400; margin-left: 4px; }
.cta .eyebrow { margin-bottom: 4px; }

/* ---------- Responsivo (leitor) ---------- */
@media (max-width: 1100px) {
  .ranked { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat { grid-template-columns: minmax(0, 1fr) 240px; gap: 36px; padding: 40px; } .feat-dots { left: 40px; }
  .md-hero { grid-template-columns: 230px minmax(0, 1fr); gap: 32px; padding: 34px; }
}
@media (max-width: 900px) {
  .no-side .topbar { padding: 0 16px; gap: 12px; }
  .toolbar { top: var(--topbar-h); }
  .feat { grid-template-columns: 1fr; padding: 26px 22px 52px; min-height: 0; gap: 22px; }
  .feat-cover { order: -1; max-width: 170px; justify-self: start; transform: rotate(-2deg); }
  .feat-dots { left: 12px; bottom: 12px; }
  .md-hero { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; }
  .md-hero .cover-wrap { max-width: 200px; }
  .resume { grid-template-columns: 90px minmax(0, 1fr); } .resume .btn { grid-column: 1 / -1; }
  .profile-stats { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .ranked { grid-template-columns: 1fr; }
  .ch { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .ch .ch-status { display: none; }
  .ch .num { font-size: 22px; }
  .lib-grid { grid-template-columns: 1fr; }
  .profile-head { padding: 22px 18px; }
  .section-head h2 { font-size: 26px; }
  .toolbar .select { flex: 1; min-width: 0; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .feat h1 { font-size: 50px; }
}

/* ---------- Leitor: ajustes finais ---------- */
.rd-page { scroll-margin-top: 56px; }
.rd-stage:focus { outline: none; }

/* abas roláveis em telas estreitas (sem rolagem horizontal da página) */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: none; }

/* selo "Grátis" no canto superior direito (o gênero fica impresso no canto esquerdo da capa) */
.cover .badge { left: auto; right: 8px; top: 8px; }
.age-txt { color: var(--text-3); font-size: 12px; }
.card-meta > span:first-child { white-space: nowrap; }

/* miniaturas do leitor: altura segue a proporção da página */
.rd-thumbs { grid-auto-rows: max-content; }
.rd-thumbs button { aspect-ratio: auto; height: auto; flex: none; }
.rd-thumbs button svg { height: auto; }
.rd-thumbs button.vert { aspect-ratio: 2/3; }
.rd-thumbs button.vert svg { height: 100%; }
@media (max-width: 900px) { .rd-thumbs button { aspect-ratio: 2/3; } .rd-thumbs button svg { height: 100%; } }

/* páginas reais (imagens do Storage) */
.rd-page img { width: 100%; height: auto; display: block; max-width: 100%; background: #0b0b10; }
body.rd.paged .rd-page img { height: 100%; object-fit: contain; }
body.rd.paged .rd-page.strip img { height: auto; }
.rd-thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-thumbs button:not(.vert) img { height: auto; }
.rd-note { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 45; background: rgba(245,165,36,.16); border: 1px solid rgba(245,165,36,.4); color: #f3c776; font-size: 12.5px; padding: 6px 12px; border-radius: 99px; max-width: calc(100vw - 24px); }

/* aviso de pagamento (retorno do Mercado Pago / erros de compra) */
.rd-pay { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 46; display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 24px)); padding: 9px 12px; border-radius: 14px; font-size: 13px; line-height: 1.45; background: #14141a; border: 1px solid var(--line, rgba(255,255,255,.14)); color: #e8e8ee; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.rd-pay.ok { background: rgba(47,209,122,.14); border-color: rgba(47,209,122,.45); color: #8ee9b4; }
.rd-pay.warn { background: rgba(245,165,36,.14); border-color: rgba(245,165,36,.4); color: #f3c776; }
.rd-pay.bad { background: rgba(229,32,46,.16); border-color: rgba(229,32,46,.5); color: #ff9aa2; }
.rd-pay.info { border-color: rgba(255,255,255,.22); }
.rd-pay span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.rd-pay .btn { flex: none; }
.rd-pay-x { flex: none; background: none; border: 0; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; opacity: .8; }

/* ---------- Bloco 11: acabamento no celular (alvos de toque ≥ 36px, filtros que não espremem) ---------- */
@media (max-width: 640px) {
  .toolbar .search { flex: 1 1 100%; }
  .toolbar .select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .footer a { display: inline-block; padding: 8px 2px; line-height: 20px; }
  .swatches { gap: 10px; } .swatches button { width: 36px; height: 36px; }
  .stars button { padding: 7px; }
  .feat-dots button { width: 36px; height: 36px; }
  #clear { min-height: 36px; }
}
/* títulos longos no "Continuar lendo": palavras grandes quebram em vez de estourar a largura (celulares de 360px) */
.resume > div { min-width: 0; } .resume h2 { overflow-wrap: anywhere; hyphens: auto; }
