/* MeMori — Scopri nello stile «Ritagli» (28/10/2026, prova in tools/prova-scopri): Consigli e Lettori.
 * Consigli: titolo, le quattro strade come grandi ritagli colorati da toccare (quella scelta si alza
 * con l'ombra d'inchiostro e un ✓), i pannelli «Partendo da un libro» (le copertine dei letti) e
 * «Scelgo io» (le pillole), il primo consiglio «In apertura» grande e gli altri in riquadri col ♡ e
 * la ✕ tondi, «Affina» in una pillola, «Mostrane altri». Lettori: il tuo profilo, il podio delle
 * opere più lette coi gradini e l'elenco, i profili pubblici come riquadri con l'iniziale in un
 * bollino. Vale solo dentro #recommend-view e #readers-view. Caratteri e colori: ritagli.css.
 * Animazioni: motion.css (D13) e motion.js («Consigli e Lettori»). */

:is(#recommend-view, #readers-view, #news-view) {
  position: relative;
  font-family: var(--rt-body);
  color: var(--rt-ink);
}

:is(#recommend-view, #readers-view, #news-view) > :not(.sc-blobs) {
  position: relative;
  z-index: 1;
}

:is(#recommend-view, #readers-view, #news-view) a {
  color: inherit;
  text-decoration: none;
}

:is(#recommend-view, #readers-view, #news-view) [hidden] {
  display: none;
}

.sc-blobs {
  --sc-rise: 200px;
  position: absolute;
  inset: calc(-1 * var(--sc-rise)) 0 0 0;
  z-index: 0;
  overflow: clip;
  pointer-events: none;
}

.sc-blob {
  position: absolute;
  will-change: translate;
}

.sc-blob path,
.sc-blob circle {
  fill: currentColor;
}

.sc-blob-1 {
  right: -150px;
  top: calc(var(--sc-rise) - 150px);
  width: 460px;
  color: var(--rt-blush);
}

.sc-blob-2 {
  left: -80px;
  top: calc(var(--sc-rise) + 800px);
  width: 240px;
  color: var(--rt-sage);
}

/* --- Testa ---------------------------------------------------------------------------------- */
.sc-kick {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
}

:is(#recommend-view, #readers-view, #news-view) h1 {
  margin: 0 0 0.4rem;
  font: 800 clamp(2.2rem, 5vw, 3.4rem) / 0.92 var(--rt-display);
  letter-spacing: -0.045em;
  text-transform: none;
}

.sc-lede {
  max-width: 62ch;
  margin: 0 0 1.6rem;
  color: var(--muted);
}

/* --- Le quattro strade ---------------------------------------------------------------------- */
.sc-ways {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.sc-way {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.2rem;
  min-height: 120px;
  padding: 1rem 1.1rem;
  border: 2px solid var(--rt-ink);
  border-radius: 26px 20px 28px 22px;
  background: var(--c);
  color: #161616;
  font-family: var(--rt-body);
  text-align: left;
  cursor: pointer;
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}

.sc-way-1 { --c: #e0a518; }
.sc-way-2 { --c: #e9785a; }
.sc-way-3 { --c: #c3cbb0; }
.sc-way-4 { --c: #f3cfc3; }

.sc-way i {
  font-style: normal;
  font-size: 1.6rem;
  line-height: 1;
}

.sc-way b {
  font: 800 1.1rem/1.1 var(--rt-display);
}

.sc-way span {
  font-size: 0.8rem;
  opacity: 0.8;
}

.sc-way:hover {
  translate: -2px -2px;
  box-shadow: 4px 4px 0 var(--rt-ink);
}

.sc-way[aria-pressed="true"] {
  translate: -3px -3px;
  box-shadow: 6px 6px 0 var(--rt-ink);
}

.sc-way[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: -10px;
  right: -10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--rt-ink);
  color: var(--rt-bg);
  font-weight: 800;
  font-size: 0.85rem;
}

.sc-way:focus-visible {
  outline: 3px solid var(--rt-ink);
  outline-offset: 3px;
}

/* --- Pannelli («Partendo da un libro», «Scelgo io») ---------------------------------------- */
.sc-panel {
  margin-bottom: 1.8rem;
  padding: 1.2rem 1.3rem;
  border-radius: 30px 24px 34px 26px;
  background: var(--rt-paper);
}

.sc-panel-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sc-panel h2 {
  margin: 0;
  font: 800 1.4rem/1 var(--rt-display);
  letter-spacing: -0.01em;
  text-transform: none;
}

.sc-x {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  border: 2px solid var(--rt-ink);
  border-radius: 50%;
  background: none;
  color: var(--rt-ink);
  cursor: pointer;
}

.sc-hint {
  margin: 0.3rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.sc-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  background: var(--rt-bg);
  color: var(--muted);
}

.sc-search:focus-within {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

.sc-search .icon {
  flex: none;
  width: 18px;
  height: 18px;
}

.sc-search input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rt-ink);
  font: 500 0.92rem var(--rt-body);
  box-shadow: none;
}

.sc-search input:focus {
  outline: none;
}

/* I libri letti come copertine da toccare: ✓ senape su quelle scelte. */
#recommend-view .sc-reads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 1rem 0.8rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

#recommend-view .rec-book {
  position: relative;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rt-ink);
  font-family: var(--rt-body);
  text-align: left;
  cursor: pointer;
}

#recommend-view .rec-book .book-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  box-shadow: 3px 3px 0 var(--rt-ink);
  container-type: inline-size;
}

#recommend-view .rec-book-text {
  display: grid;
  font-size: 0.72rem;
  line-height: 1.15;
}

#recommend-view .rec-book-text strong {
  font-weight: 700;
}

#recommend-view .rec-book-text .muted {
  font-size: 0.68rem;
}

#recommend-view .rec-check {
  position: absolute;
  top: -8px;
  right: -8px;
  display: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--rt-ink);
}

#recommend-view .rec-book[aria-pressed="true"] .rec-check {
  display: grid;
}

#recommend-view .rec-book[aria-pressed="true"] .book-cover {
  outline: 3px solid var(--rt-accent);
  outline-offset: 3px;
}

#recommend-view .rec-book:focus-visible {
  outline: 3px solid var(--rt-accent);
  outline-offset: 4px;
  border-radius: 6px;
}

/* Le pillole di «Scelgo io» e di «Affina». */
#recommend-view .rec-group h3 {
  margin: 0.9rem 0 0.45rem;
  color: var(--muted);
  font: 700 0.8rem var(--rt-body);
  letter-spacing: 0;
  text-transform: none;
}

#recommend-view .rec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#recommend-view .rec-chip {
  padding: 0.3rem 0.75rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  background: none;
  color: var(--rt-ink);
  font: 600 0.8rem var(--rt-body);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

#recommend-view .rec-chip[aria-pressed="true"] {
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
}

#recommend-view .rec-chip:focus-visible {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

/* In «Affina» quelle spente si vedono barrate. */
#recommend-view .sc-refine .rec-chip[aria-pressed="false"] {
  opacity: 0.55;
  text-decoration: line-through;
}

/* Il bottone principale: un ritaglio senape con l'ombra d'inchiostro. */
.sc-go {
  margin-top: 1rem;
  padding: 0.7rem 1.3rem;
  border: 0;
  border-radius: 22px 28px 24px 26px;
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
  font: 800 1rem var(--rt-display);
  box-shadow: 4px 4px 0 var(--rt-ink);
  cursor: pointer;
}

.sc-go:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: default;
}

.sc-go:focus-visible,
.sc-x:focus-visible {
  outline: 3px solid var(--rt-ink);
  outline-offset: 3px;
}

/* --- I consigli ----------------------------------------------------------------------------- */
.sc-reshead {
  margin-bottom: 1rem;
}

.sc-kind {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.8rem;
}

.sc-reshead h2 {
  margin: 0.1rem 0 0;
  font: 800 1.8rem/1 var(--rt-display);
  letter-spacing: -0.02em;
  text-transform: none;
}

.sc-from {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sc-refine {
  margin: 0 0 1.4rem;
}

.sc-refine summary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
}

.sc-refine summary::-webkit-details-marker {
  display: none;
}

.sc-refine summary span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.sc-refine[open] {
  padding: 0.9rem 1rem 1rem;
  border-radius: 22px;
  background: var(--rt-paper);
}

.sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Le brevi: copertina, titolo, autore, il primo motivo; il ♡ e la ✕ tondi in basso a destra. */
.rc-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.9rem 0.9rem 3.4rem;
  border-radius: 22px 18px 24px 20px;
  background: var(--rt-paper);
}

.rc-cv {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  container-type: inline-size;
}

#recommend-view .rc-cv .book-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  box-shadow: 4px 4px 0 var(--rt-ink);
}

.rc-body {
  min-width: 0;
}

.rc-flag {
  display: none;
}

.rc-card h3 {
  margin: 0;
  font: 800 1rem/1.1 var(--rt-display);
  letter-spacing: 0;
  text-transform: none;
}

.rc-title {
  padding: 0;
  border: 0;
  background: none;
  color: var(--rt-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.rc-title:hover {
  text-decoration: underline;
  text-decoration-color: var(--rt-accent);
  text-underline-offset: 3px;
}

.rc-title:focus-visible,
.rc-cv:focus-visible {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

.rc-by {
  margin: 0.15rem 0 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.rc-sum,
.rc-pubs,
.rc-ghost {
  display: none;
}

.rc-why {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rc-why li {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--rt-bg);
  font-size: 0.74rem;
}

.rc-card:not(:first-child) .rc-why li:nth-child(n + 2) {
  display: none;
}

.rc-acts {
  position: absolute;
  right: 0.8rem;
  bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rc-wish,
.rc-nope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
}

/* Nelle brevi solo i segni: la parola resta per i lettori di schermo (aria-label). */
.rc-card:not(:first-child) .rc-word {
  display: none;
}

.rc-wish {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
  font-size: 1rem;
  box-shadow: 2px 2px 0 var(--rt-ink);
}

.rc-wish.is-on {
  background: var(--rt-coral);
  color: #161616;
}

.rc-nope {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--rt-ink);
  border-radius: 50%;
  background: var(--rt-paper);
  color: var(--rt-ink);
  font-size: 0.8rem;
}

.rc-wish:focus-visible,
.rc-nope:focus-visible,
.rc-ghost:focus-visible {
  outline: 3px solid var(--rt-ink);
  outline-offset: 2px;
}

.rc-wish:disabled,
.rc-nope:disabled {
  cursor: default;
}

/* In apertura: il primo, grande, con tutto. */
.rc-card:first-child {
  grid-column: 1 / -1;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.8rem;
  margin-top: 0.8rem;
  padding: 1.5rem;
  border-radius: 34px 28px 36px 30px;
}

.rc-card:first-child .rc-flag {
  position: absolute;
  top: -14px;
  left: 22px;
  display: block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--rt-coral);
  color: #161616;
  font: 800 0.85rem var(--rt-display);
  box-shadow: 3px 3px 0 var(--rt-ink);
  rotate: -4deg;
}

#recommend-view .rc-card:first-child .rc-cv .book-cover {
  box-shadow: 8px 8px 0 var(--rt-ink);
}

.rc-card:first-child h3 {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.rc-card:first-child .rc-by {
  margin: 0.3rem 0 0.8rem;
  font-size: 1rem;
}

.rc-card:first-child .rc-sum {
  display: block;
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}

.rc-card:first-child .rc-why {
  margin-bottom: 1rem;
}

.rc-card:first-child .rc-pubs {
  display: block;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.rc-card:first-child .rc-acts {
  position: static;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
}

.rc-card:first-child .rc-wish {
  width: auto;
  height: auto;
  padding: 0.65rem 1.2rem;
  border-radius: 22px 28px 24px 26px;
  font: 800 0.95rem var(--rt-display);
  box-shadow: 4px 4px 0 var(--rt-ink);
}

.rc-card:first-child .rc-ghost {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  background: none;
  color: var(--rt-ink);
  font: 700 0.85rem var(--rt-body);
  cursor: pointer;
}

.rc-card:first-child .rc-nope {
  width: auto;
  height: auto;
  padding: 0.3rem 0.2rem;
  border: 0;
  background: none;
  color: var(--muted);
  font: 600 0.82rem var(--rt-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sc-status {
  margin: 1rem 0 0;
  color: var(--muted);
}

.sc-status:empty {
  display: none;
}

.sc-more {
  display: block;
  margin: 1.6rem auto 0;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  background: none;
  color: var(--rt-ink);
  font: 800 0.95rem var(--rt-body);
  cursor: pointer;
}

.sc-more:focus-visible {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

/* --- Lettori -------------------------------------------------------------------------------- */
.rd-me {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1.6rem;
  padding: 1rem 1.2rem;
  border: 2px dashed var(--rt-ink);
  border-radius: 22px;
}

.rd-me p {
  flex: 1 1 280px;
  margin: 0;
  font-size: 0.9rem;
}

.rd-me-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rd-ghost {
  padding: 0.5rem 1rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.rd-ghost:hover {
  background: var(--rt-paper);
}

.sc-box {
  margin-bottom: 2rem;
  padding: 1.3rem 1.4rem;
  border-radius: 30px 24px 34px 26px;
  background: var(--rt-paper);
}

.sc-box h2 {
  margin: 0 0 1rem;
  font: 800 1.45rem/1 var(--rt-display);
  letter-spacing: -0.01em;
  text-transform: none;
}

.sc-box h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 6px;
  margin-top: 0.4rem;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  background: var(--rt-accent);
}

/* Il podio: il primo al centro, gradini senape, salvia e corallo. */
.rd-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.rd-pod {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  min-width: 0;
  text-align: center;
}

#readers-view .rd-pod .book-cover {
  width: 92px;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  box-shadow: 5px 5px 0 var(--rt-ink);
  container-type: inline-size;
}

.rd-pod b {
  font: 800 0.9rem/1.1 var(--rt-display);
  overflow-wrap: anywhere;
}

.rd-pod small {
  color: var(--muted);
  font-size: 0.75rem;
}

.rd-step {
  display: grid;
  place-items: center;
  width: 100%;
  height: 64px;
  border-radius: 14px 14px 0 0;
  background: #c3cbb0;
  color: #161616;
  font: 800 1.5rem var(--rt-display);
}

.rd-pod-1 .rd-step {
  height: 90px;
  background: #e0a518;
}

.rd-pod-3 .rd-step {
  height: 46px;
  background: #e9785a;
}

.rd-poplist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-poplist li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 16px;
  background: var(--rt-bg);
  font-size: 0.88rem;
}

.rd-poplist i {
  color: var(--muted);
  font: 800 0.9rem var(--rt-display);
  font-style: normal;
}

.rd-poplist em {
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  white-space: nowrap;
}

.rd-readers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-reader {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 20px;
  background: var(--rt-bg);
  transition: translate 0.15s ease, box-shadow 0.15s ease;
}

.rd-reader:hover {
  translate: -2px -2px;
  box-shadow: 4px 4px 0 var(--rt-ink);
}

.rd-reader:focus-visible {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

.rd-ini {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  background: hsl(var(--hue, 30) 55% 72%);
  color: #161616;
  font: 800 1.3rem var(--rt-display);
  box-shadow: 3px 3px 0 var(--rt-ink);
}

.rd-reader b {
  display: block;
  font: 800 1rem var(--rt-display);
  overflow-wrap: anywhere;
}

.rd-reader small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

/* --- Profilo di un lettore (#profile-view, 28/10/2026) ------------------------------------ */
#profile-view {
  position: relative;
  font-family: var(--rt-body);
  color: var(--rt-ink);
}

#profile-view > :not(.sc-blobs) {
  position: relative;
  z-index: 1;
}

#profile-view [hidden] {
  display: none;
}

#profile-view a {
  color: inherit;
  text-decoration: none;
}

.pp-back {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.pp-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
  margin-bottom: 1.2rem;
  padding: 1.5rem;
  border-radius: 34px 28px 36px 30px;
  background: var(--rt-paper);
}

.pp-ini {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  background: hsl(var(--hue, 30) 55% 72%);
  color: #161616;
  font: 800 2.8rem var(--rt-display);
  box-shadow: 6px 6px 0 var(--rt-ink);
  rotate: -4deg;
}

.pp-who {
  min-width: 0;
}

#profile-view h1 {
  margin: 0;
  font: 800 clamp(1.6rem, 4vw, 2.4rem) / 1 var(--rt-display);
  letter-spacing: -0.04em;
  text-transform: none;
  overflow-wrap: anywhere;
}

.pp-who p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.pp-shows {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

.pp-shows li {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--rt-bg);
  font-size: 0.75rem;
  font-weight: 600;
}

.pp-status:empty {
  display: none;
}

.pp-status,
.pp-preview {
  margin: 0 0 1rem;
  color: var(--muted);
}

.pp-preview {
  padding: 0.7rem 1rem;
  border: 2px dashed var(--rt-ink);
  border-radius: 18px;
  font-size: 0.88rem;
}

.pp-nums {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.4rem;
}

.pp-nums div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding: 0.7rem 0.9rem;
  border-radius: 18px 22px 20px 16px;
  background: var(--rt-paper);
}

.pp-nums dd {
  margin: 0;
  font: 800 1.5rem/1 var(--rt-display);
}

.pp-nums dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.pp-common {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.2rem;
  margin-bottom: 1.4rem;
  padding: 1rem 1.2rem;
  border: 2px dashed var(--rt-ink);
  border-radius: 22px;
}

.pp-common p {
  flex: 1 1 260px;
  margin: 0;
}

.pp-common-covers {
  display: flex;
  gap: 0.4rem;
}

#profile-view .pp-common-covers .book-cover {
  width: 40px;
  height: auto;
  aspect-ratio: 2 / 3;
  padding: 0;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--rt-ink);
}

#profile-view .pp-common-covers .book-cover > * {
  display: none;
}

.pp-reading {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp-reading li:not(.pp-empty) {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: 18px;
  background: var(--rt-bg);
}

.pp-reading b {
  display: block;
  font: 800 0.95rem var(--rt-display);
}

.pp-reading small {
  color: var(--muted);
  font-size: 0.78rem;
}

#profile-view :is(.pp-reading, .pp-covers) .book-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 5px;
  box-shadow: 4px 4px 0 var(--rt-ink);
  container-type: inline-size;
}

.pp-covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 1rem 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp-covers li > span {
  display: block;
  margin-top: 0.4rem;
  font: 700 0.72rem/1.15 var(--rt-display);
  overflow-wrap: anywhere;
}

.pp-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

/* Le recensioni: col dorso colorato (--hue dal titolo) e il voto in un bollino. */
#profile-view .pp-reviews {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#profile-view .pp-reviews .review {
  position: relative;
  margin: 0;
  padding: 1rem 1.1rem 1rem 1.4rem;
  border: 0;
  border-radius: 6px 20px 18px 6px;
  background: var(--rt-bg);
}

#profile-view .pp-reviews .review::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  border-radius: 6px 0 0 6px;
  background: hsl(var(--hue, 30) 38% 34%);
}

#profile-view .pp-reviews .review-work {
  display: block;
  font: 800 1rem var(--rt-display);
}

@media (max-width: 760px) {
  .pp-ini {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    box-shadow: 4px 4px 0 var(--rt-ink);
  }

  .pp-nums {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Telefono -------------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .sc-ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .sc-way {
    min-height: 100px;
    padding: 0.8rem 0.9rem;
  }

  .sc-way b {
    font-size: 0.98rem;
  }

  #recommend-view .sc-reads {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem 0.6rem;
  }

  .sc-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  .rc-card {
    padding: 0.9rem 6.2rem 0.9rem 0.9rem;
  }

  .rc-acts {
    top: 50%;
    bottom: auto;
    translate: 0 -50%;
  }

  .rc-card:first-child {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.1rem;
  }

  .rc-card:first-child h3 {
    font-size: 1.35rem;
  }

  .rc-card:first-child .rc-acts {
    grid-column: 1 / -1;
    translate: none;
  }

  .rd-poplist {
    grid-template-columns: minmax(0, 1fr);
  }

  #readers-view .rd-pod .book-cover {
    width: 70px;
  }
}

/* --- Novità (dal 30/10/2026, scelta 2A dell'utente in tools/prova-installa-novita) ---------------
   Le tre schede in una pillola, le novità su fogli di carta con la data in un bollino salvia, le
   idee da votare con il pulsante del voto (pieno quando è il tuo), «Scrivici» con i tre tipi. */
#news-view .nw-tabs {
  display: flex;
  gap: 0.3rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.4rem;
  padding: 0.25rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
}

#news-view .nw-tabs button {
  padding: 0.45rem 1rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--rt-ink);
  font: 700 0.92rem var(--rt-body);
  cursor: pointer;
}

#news-view .nw-tabs [aria-selected="true"] {
  background: var(--rt-ink);
  color: var(--rt-bg);
}

#news-view .nw-entry {
  max-width: 44rem;
  margin-bottom: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 26px 20px 28px 22px;
  background: var(--rt-paper);
}

#news-view .nw-when {
  display: inline-block;
  padding: 0.05rem 0.65rem;
  border-radius: 999px;
  background: var(--rt-sage);
  font: 700 0.78rem var(--rt-body);
}

#news-view .nw-entry ul {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
}

#news-view .nw-entry li,
.nw-pop li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-top: 0.4rem;
}

#news-view .nw-entry li .ph,
.nw-pop li .ph {
  margin-top: 0.15em;
  color: var(--rt-coral);
}

.nw-pop {
  margin: 0;
  padding: 0;
  list-style: none;
}

#news-view .nw-ideas {
  max-width: 44rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#news-view .nw-idea {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 22px 18px 24px 20px;
  background: var(--rt-paper);
}

#news-view .nw-idea > div {
  flex: 1;
  min-width: 0;
}

#news-view .nw-idea b {
  display: block;
}

#news-view .nw-idea small {
  color: var(--muted);
}

#news-view .nw-vote {
  display: grid;
  justify-items: center;
  min-width: 3.2rem;
  padding: 0.35rem 0.3rem;
  border: 2px solid var(--rt-ink);
  border-radius: 14px;
  background: none;
  color: var(--rt-ink);
  font: 800 0.95rem var(--rt-body);
  cursor: pointer;
}

#news-view .nw-vote[aria-pressed="true"] {
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
}

#news-view .nw-done {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--rt-sage);
  font: 700 0.82rem var(--rt-body);
}

#news-view .nw-hint {
  color: var(--muted);
  font-size: 0.9rem;
  list-style: none;
}

#news-view .nw-write {
  display: grid;
  gap: 0.8rem;
  max-width: 36rem;
}

#news-view .nw-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

#news-view .nw-kinds label {
  position: relative;
  cursor: pointer;
}

#news-view .nw-kinds input {
  position: absolute;
  opacity: 0;
}

#news-view .nw-kinds span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--rt-ink);
  border-radius: 999px;
  font-weight: 600;
}

#news-view .nw-kinds input:checked + span {
  background: var(--rt-ink);
  color: var(--rt-bg);
}

#news-view .nw-kinds input:focus-visible + span {
  outline: 3px solid var(--rt-accent);
  outline-offset: 2px;
}

#news-view .nw-write textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem;
  border: 2px solid var(--rt-ink);
  border-radius: 18px;
  background: var(--rt-paper);
  color: var(--rt-ink);
  font: 400 1rem var(--rt-body);
  resize: vertical;
}

#news-view .nw-send {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: var(--rt-accent);
  color: var(--rt-accent-ink);
  box-shadow: 3px 3px 0 var(--rt-ink);
  font: 700 1rem var(--rt-body);
  cursor: pointer;
}
