:root {
  color-scheme: dark;
  --fondo: #121827;
  --carta: #fbebd4;
  --tenue: #d5c3b4;
  --rosa: #ecaaa1;
  --rosso: #aa5147;
  --riga: #efd7bf38;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fondo); color: var(--carta); font: 1rem var(--sans); }
button, select { font: inherit; }
a { color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #f7b6a5; outline-offset: 5px; }

.apertura {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(2.25rem, 7vw, 8rem);
  min-height: 100svh;
  padding: clamp(3.5rem, 8vw, 7rem) max(clamp(1.4rem, 8vw, 8rem), calc((100vw - 1510px) / 2));
  overflow: hidden;
  background: radial-gradient(ellipse at 83% 42%, #404055, #212638 48%, #121827 77%);
}

.apertura::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 0 42%;
  background: url('media/01-copertina.webp') 55% 90% / cover;
  opacity: .12;
  mask-image: linear-gradient(90deg, transparent, #000 48%);
}

.introduzione { position: relative; z-index: 1; }
.genere { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; margin: 0 0 1.8rem; color: var(--rosa); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.genere span:first-child { width: 2rem; border-top: 1px solid currentColor; }
.separatore { font-size: 1rem; line-height: .75; }
.introduzione h1 { margin: 0; color: var(--carta); font: 400 clamp(4rem, 7.6vw, 8.25rem)/.91 var(--serif); letter-spacing: -.071em; }
.introduzione h1 em { color: var(--rosa); font-weight: 400; white-space: nowrap; }
.trama { max-width: 34ch; margin: 2rem 0 2.35rem; color: var(--tenue); font: 400 clamp(1.05rem, 1.56vw, 1.35rem)/1.6 var(--sans); }
.inizia { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.8rem; padding: .95rem 1.18rem; min-height: 50px; border-radius: 3px; background: var(--carta); color: #251d28; font-weight: 700; text-decoration: none; }
.inizia:hover { background: #f6d0ba; }
.inizia span { font-size: 1.25rem; line-height: 1; }

.libro { display: grid; justify-items: center; }
.cornice { position: relative; width: min(100%, 380px, 53svh); }
.cornice::before { content: ''; position: absolute; inset: -15px 15px 15px -15px; border: 1px solid #e4c3a373; }
.cornice::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 10px; background: linear-gradient(to right, #11172559, transparent); pointer-events: none; }
.cornice img { display: block; position: relative; width: 100%; height: auto; aspect-ratio: 2 / 3; box-shadow: 13px 24px 42px #080b13af; }
.senza-script { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; }

.lettore { min-height: 100svh; padding: 1.7rem 0 0; background: radial-gradient(ellipse at 50% 12%, #2b3045, #121827 62%); }
.tavola { width: min(calc(100% - 2rem), 43rem); margin: 0 auto 1.25rem; }
.tavola img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; background: #e9ddcc; box-shadow: 0 12px 35px #080c18a0; }
.cornice img, .tavola img { touch-action: pan-y pinch-zoom; }
.comandi { position: sticky; bottom: 0; z-index: 2; padding: .7rem 1rem max(.7rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--riga); background: #121827f5; backdrop-filter: blur(8px); }
.comandi-interno { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: min(100%, 68rem); margin: 0 auto; }
.torna-catalogo { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; min-height: 44px; color: var(--tenue); text-underline-offset: .22em; }
.torna-catalogo:hover { color: var(--carta); }
.sfoglia, .comandi select { min-height: 44px; border: 1px solid var(--riga); border-radius: 3px; color: var(--carta); background: #252b3d; }
.sfoglia { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .55rem .95rem; font-size: .92rem; white-space: nowrap; }
.sfoglia:hover { background: #3f2d36; border-color: var(--rosa); }
.avanti { background: var(--carta); color: #251d28; border-color: var(--carta); font-weight: 700; }
.avanti:hover { background: #f6d0ba; color: #251d28; }
.comandi select { flex: none; padding: .4rem .55rem; font-size: .9rem; }

.solo-lettori { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .apertura { grid-template-columns: 1fr; gap: 3.25rem; padding: 3.5rem max(1.5rem, 7vw) 3rem; background: radial-gradient(ellipse at 90% 60%, #38394f, #1b2030 70%, #121827); }
  .apertura::before { inset: 18% 0 0 17%; }
  .genere { margin-bottom: 1.45rem; }
  .introduzione h1 { font-size: clamp(3.55rem, 12.5vw, 5.7rem); }
  .trama { margin: 1.5rem 0 1.65rem; }
  .cornice { width: min(88%, 340px); }
  .lettore { padding-top: .75rem; }
  .tavola { width: min(calc(100% - .9rem), 43rem); }
}

@media (max-width: 480px) {
  .comandi { padding-inline: .5rem; }
  .comandi-interno { gap: .35rem; }
  .comandi .torna-catalogo, .comandi .sfoglia, .comandi select { font-size: .82rem; }
  .comandi .sfoglia, .comandi select { padding-inline: .38rem; }
  .comandi-interno [aria-hidden="true"] { display: none; }
}

@media (max-width: 350px) {
  .genere { gap: .4rem; letter-spacing: .11em; }
  .introduzione h1 { font-size: 3.2rem; }
}

.introduzione h1 { font-size: clamp(3.5rem, 7.2vw, 8rem); }
.introduzione h1 em { display: inline-block; font-size: .73em; letter-spacing: -.06em; }
@media (max-width: 760px) {
  .introduzione h1 { font-size: clamp(3rem, 12.7vw, 6rem); }
}

.catalogo-ritorno { padding: 1.15rem clamp(1rem, 6vw, 5rem); border-top: 1px solid var(--riga); }

.testata-lettore {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .6rem clamp(.9rem, 6vw, 5rem);
  border-bottom: 1px solid var(--riga);
}
.testata-lettore .manga-language { margin: 0; }
.testata-lettore select { min-height: 42px; }
.apertura { min-height: calc(100svh - 4.4rem); }
.introduzione h1 { font-size: clamp(3rem, 6.1vw, 6.5rem); }
.introduzione h1 em { max-width: 100%; white-space: normal; text-wrap: balance; }
.lettore .tavola { position: relative; }
.lettore .manga-letter.battuta {
  filter: drop-shadow(0 .22cqw .24cqw #080f1ca6);
  line-height: 1.18;
  hyphens: manual;
}
.lettore .manga-letter.battuta::before {
  border-radius: 3.2cqw 3.9cqw 3.65cqw 2.85cqw / 2.6cqw 2.85cqw 2.6cqw 2.95cqw;
  border: .15cqw solid #9a7768;
  background: #fff4df;
}
.lettore .manga-letter.battuta[data-coda]::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 92%;
  width: 5cqw;
  height: 2.9cqw;
  background: #fff4df;
}
.lettore .manga-letter.battuta[data-coda="sinistra"]::after {
  left: 15%;
  clip-path: polygon(28% 0, 100% 0, 0 100%);
}
.lettore .manga-letter.battuta[data-coda="destra"]::after {
  right: 15%;
  clip-path: polygon(0 0, 72% 0, 100% 100%);
}
.lettore .manga-letter.battuta[data-coda="sopra-sinistra"]::after {
  top: -1.6cqw;
  left: 16%;
  clip-path: polygon(0 0, 76% 100%, 24% 100%);
}
.lettore .battuta .manga-letter-text {
  z-index: 1;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-weight: 700;
}
.lettore .cartoncino { transform: rotate(var(--inclinazione, 0deg)); }
.lettore .cartoncino::before { background: none; }
.lettore .cartoncino .manga-letter-text {
  color: #3d251a;
  font-family: Georgia, serif;
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}
.lettore .tavola img { min-height: unset; }

@media (max-width: 760px) {
  .introduzione h1 { font-size: clamp(3rem, 12vw, 5.7rem); }
  .apertura { padding-top: 2.5rem; }
}
@media (max-width: 360px) {
  .testata-lettore .torna-catalogo { font-size: .93rem; }
}
