/* =========================================================
   Charles Dickens · La Voce della Londra Vittoriana
   Foglio di stile — carta, inchiostro e fregi d'oro
   ========================================================= */

:root {
  /* Carta */
  --paper: #F4ECD8;
  --paper-2: #EFE4D0;
  --paper-3: #E5D6B6;
  --paper-edge: #D3BE93;

  /* Inchiostri */
  --ink: #2B1B17;
  --ink-2: #3D2314;
  --ink-soft: #5B4636;
  --ink-faint: rgba(61, 35, 20, .35);

  /* Accenti */
  --burgundy: #6B1D2F;
  --burgundy-deep: #4E1322;
  --gold: #9A7B38;
  --gold-bright: #B8860B;
  --gold-pale: #E3CD8F;
  --sage: #2A4736;

  /* Tipografia */
  --font-display: 'Playfair Display', 'Bodoni 72', Georgia, serif;
  --font-caps: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-gothic: 'UnifrakturMaguntia', 'Old English Text MT', serif;
  --font-body: 'EB Garamond', 'Crimson Text', Garamond, Georgia, serif;

  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 68ch;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-print: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 14px 32px -16px rgba(43, 27, 23, .5);

  --pen-stroke: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 C 18 2, 32 7, 50 4 S 82 2, 99 5' fill='none' stroke='%236B1D2F' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.06rem, 1rem + .3vw, 1.22rem);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  font-feature-settings: "liga", "onum", "kern";
  -webkit-font-smoothing: antialiased;
}

/* Texture di carta: grana + vignettatura + macchie d'umidità */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(120, 82, 34, .2) 100%),
    radial-gradient(circle at 12% 18%, rgba(160, 110, 40, .07) 0 6%, transparent 14%),
    radial-gradient(circle at 86% 72%, rgba(160, 110, 40, .08) 0 5%, transparent 12%),
    radial-gradient(circle at 70% 12%, rgba(140, 90, 30, .05) 0 3%, transparent 8%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .3 0 0 0 0 .16 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
}

::selection { background: var(--burgundy); color: var(--paper); }

img, svg { max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-2); line-height: 1.15; margin: 0 0 .5em; }

p { margin: 0 0 1em; }

a { color: var(--burgundy); }

em { font-style: italic; }

button { font: inherit; }

:focus-visible {
  outline: 2px dashed var(--burgundy);
  outline-offset: 3px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.smallcaps { font-variant: small-caps; letter-spacing: .06em; }

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-caps);
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Sottolineatura a penna stilografica ---------- */
.ink-link {
  color: inherit;
  text-decoration: none;
  background: var(--pen-stroke) no-repeat 0 100% / 0% 7px;
  padding-bottom: 3px;
  transition: background-size .55s var(--ease), color .35s ease, text-shadow .35s ease;
}
.ink-link:hover,
.ink-link:focus-visible {
  background-size: 100% 7px;
  color: var(--burgundy);
  text-shadow: 0 0 .5px rgba(107, 29, 47, .45);
}
button.ink-link {
  border: 0;
  cursor: pointer;
  font-style: italic;
  color: var(--burgundy);
  background-color: transparent;
}
.inline-work { font: inherit; font-style: italic; padding: 0 0 2px; }

/* ---------- Barra di avanzamento a inchiostro ---------- */
.ink-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 70;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--burgundy-deep), var(--burgundy) 70%, var(--gold-bright));
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- Pulsanti ---------- */
.btn {
  --btn-c: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  font-family: var(--font-caps);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--btn-c);
  background: transparent;
  border: 1px solid var(--btn-c);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--btn-c);
  cursor: pointer;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease, transform .2s ease;
}
.btn:hover { background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 3px var(--ink-2), inset 0 0 0 4px var(--gold-pale); }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--burgundy);
  color: var(--paper);
  border-color: var(--burgundy-deep);
  box-shadow: inset 0 0 0 3px var(--burgundy), inset 0 0 0 4px var(--gold-pale);
}
.btn--primary:hover { background: var(--ink); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--gold-pale); }

.btn--small { padding: .65rem 1.1rem; font-size: .7rem; }

/* ---------- Ornamenti ---------- */
.divider {
  display: block;
  width: min(260px, 70%);
  height: 44px;
  margin: .75rem auto 0;
  color: var(--gold);
}

/* ---------- Testata ---------- */
.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(244, 236, 216, .9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 3px double var(--ink-2);
  transition: box-shadow .35s ease, background-color .35s ease;
}
.masthead.is-scrolled {
  background: rgba(244, 236, 216, .97);
  box-shadow: 0 8px 22px -14px rgba(43, 27, 23, .6);
}
.masthead__inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
}
.brand__mono {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1.5px solid var(--burgundy);
  border-radius: 50%;
  font-family: var(--font-gothic);
  font-size: 1.15rem;
  color: var(--burgundy);
  background: var(--paper-2);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold);
  transition: transform .6s var(--ease);
}
.brand:hover .brand__mono { transform: rotate(-12deg); }
.brand__text {
  display: flex; flex-direction: column;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .14em;
  line-height: 1.15;
}
.brand__text small {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .08em;
  color: var(--ink-soft);
  font-size: .72rem;
}

/* Navigazione */
.nav__toggle { display: none; }
.nav__panel-title { display: none; }

.nav__list {
  display: flex;
  gap: .15rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .35rem;
  padding: .55rem .75rem;
  font-family: var(--font-caps);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .3s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: .75rem; right: .75rem; bottom: .2rem;
  height: 7px;
  background: var(--pen-stroke) no-repeat 0 0 / 0% 100%;
  transition: background-size .5s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--burgundy); }
.nav__link:hover::after, .nav__link[aria-current="true"]::after { background-size: 100% 100%; }
.nav__num {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--burgundy);
}

@media (max-width: 960px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    font-family: var(--font-caps);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-2);
    background: transparent;
    border: 1px solid var(--ink-2);
    box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink-faint);
    cursor: pointer;
  }
  .nav__burger, .nav__burger span, .nav__burger::before, .nav__burger::after { display: block; width: 18px; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), opacity .2s; }
  .nav__burger { position: relative; background: transparent; }
  .nav__burger span { position: absolute; top: 0; }
  .nav__burger::before, .nav__burger::after { content: ""; position: absolute; }
  .nav__burger::before { top: -5px; }
  .nav__burger::after { top: 5px; }
  .nav.is-open .nav__burger span { opacity: 0; }
  .nav.is-open .nav__burger::before { transform: translateY(5px) rotate(45deg); }
  .nav.is-open .nav__burger::after { transform: translateY(-5px) rotate(-45deg); }

  .nav__panel {
    position: absolute;
    top: calc(100% + 3px);
    left: var(--gutter); right: var(--gutter);
    padding: 1.5rem 1.5rem 1rem;
    background: var(--paper);
    border: 1px solid var(--ink-2);
    outline: 1px solid var(--ink-2);
    outline-offset: -7px;
    box-shadow: 0 24px 40px -20px rgba(43, 27, 23, .6);
    transform-origin: top center;
    transform: translateY(-8px) scaleY(.96);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, transform .4s var(--ease), visibility 0s .4s;
  }
  .nav.is-open .nav__panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s ease, transform .4s var(--ease), visibility 0s;
  }
  .nav__panel-title {
    display: block;
    margin: 0 0 .75rem;
    text-align: center;
    font-family: var(--font-caps);
    font-size: .72rem;
    letter-spacing: .3em;
    color: var(--burgundy);
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link {
    padding: .8rem .25rem;
    font-size: .85rem;
    border-bottom: 1px dotted var(--ink-faint);
  }
  .nav__list li:last-child .nav__link { border-bottom: 0; }
  .nav__link::after { left: .25rem; right: auto; width: 60%; bottom: .35rem; }
  .nav__num { min-width: 2.4em; }
}

@media (max-width: 420px) {
  .brand__text { font-size: .78rem; }
  .brand__text small { display: none; }
}

/* ---------- Hero / Frontespizio ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + clamp(16px, 3vw, 40px)) var(--gutter) clamp(56px, 7vw, 88px);
}

.plate {
  position: relative;
  width: 100%;
  max-width: 1160px;
  padding: clamp(40px, 6vw, 80px) clamp(22px, 5.5vw, 80px) clamp(28px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(255, 252, 242, .55), rgba(239, 228, 208, .4));
  border: 1.5px solid var(--ink-2);
  box-shadow: var(--shadow-print);
}
.plate::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--ink-2);
  pointer-events: none;
}
.plate::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: .5px solid var(--gold);
  pointer-events: none;
}

.corner {
  position: absolute;
  z-index: 1;
  width: clamp(38px, 6vw, 66px);
  height: clamp(38px, 6vw, 66px);
  color: var(--burgundy);
}
.corner--tl { top: 16px; left: 16px; }
.corner--tr { top: 16px; right: 16px; transform: scaleX(-1); }
.corner--bl { bottom: 16px; left: 16px; transform: scaleY(-1); }
.corner--br { bottom: 16px; right: 16px; transform: scale(-1, -1); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero__main { text-align: center; }

.hero__kicker {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, .9rem + .4vw, 1.2rem);
  color: var(--ink-soft);
}

.hero__title { margin: 0; }
.hero__name {
  display: block;
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: clamp(3.1rem, 1.6rem + 6.4vw, 6.6rem);
  line-height: .95;
  color: var(--burgundy);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 0 1px rgba(107, 29, 47, .4);
  animation: ink-bleed 1.8s var(--ease) both;
}
.hero__sub {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-caps);
  font-weight: 600;
  font-size: clamp(.95rem, .7rem + 1.1vw, 1.55rem);
  letter-spacing: .2em;
  color: var(--ink-2);
  animation: fade-up 1.2s .5s var(--ease) both;
}

@keyframes ink-bleed {
  0% { opacity: 0; filter: blur(6px); letter-spacing: .06em; }
  60% { opacity: 1; filter: blur(.6px); }
  100% { opacity: 1; filter: none; letter-spacing: 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-quote {
  margin: 1.25rem auto 1.75rem;
  max-width: 34em;
  min-height: 8.5em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity .6s ease, transform .6s var(--ease), filter .6s ease;
}
.hero-quote.is-fading { opacity: 0; transform: translateY(6px); filter: blur(2px); }
.hero-quote__text {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-2);
}
.hero-quote__cite {
  margin-top: .65rem;
  font-family: var(--font-caps);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--burgundy);
}
.hero-quote__cite cite { font-style: normal; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  justify-content: center;
}

.hero__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

.medallion {
  width: clamp(170px, 22vw, 230px);
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(43, 27, 23, .25));
  animation: medal-in 1.6s .3s var(--ease) both;
}
.medallion__ring-text {
  font-family: var(--font-caps);
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--ink-2);
}
.medallion__mono {
  font-family: var(--font-gothic);
  font-size: 54px;
  fill: var(--burgundy);
}
@keyframes medal-in {
  from { opacity: 0; transform: rotate(-20deg) scale(.9); }
  to { opacity: 1; transform: none; }
}

/* Indice / sommario */
.toc {
  width: 100%;
  max-width: 400px;
  padding: .9rem 0 .6rem;
  border-top: 3px double var(--ink-2);
  border-bottom: 3px double var(--ink-2);
}
.toc__title {
  margin: 0 0 .5rem;
  text-align: center;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .3em;
  color: var(--burgundy);
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  padding: .32rem 0;
  color: var(--ink);
  text-decoration: none;
}
.toc__num {
  min-width: 2.2em;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--burgundy);
}
.toc__label {
  background: var(--pen-stroke) no-repeat 0 100% / 0% 6px;
  padding-bottom: 2px;
  transition: background-size .5s var(--ease), color .3s;
}
.toc a:hover .toc__label { background-size: 100% 6px; color: var(--burgundy); }
.toc__dots {
  flex: 1;
  min-width: 1rem;
  border-bottom: 2px dotted var(--ink-faint);
  transform: translateY(-.3em);
}
.toc__page {
  font-family: var(--font-display);
  font-style: italic;
  font-size: .9em;
  color: var(--ink-soft);
  font-variant-numeric: oldstyle-nums;
}

.hero__imprint {
  margin: clamp(28px, 4vw, 44px) 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--ink-faint);
  text-align: center;
  font-family: var(--font-caps);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--ink-soft);
}

.scroll-cue {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: var(--burgundy);
  text-decoration: none;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translate(-50%, 0) rotate(90deg); }
  50% { transform: translate(-50%, 7px) rotate(90deg); }
}

@media (max-width: 600px) {
  .plate { padding-top: 64px; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__aside { flex-direction: column-reverse; }
  .hero-quote { min-height: 9.5em; }
}

/* ---------- Sezioni ---------- */
.section {
  position: relative;
  padding: clamp(72px, 10vw, 136px) var(--gutter);
}
.section--alt {
  background:
    linear-gradient(180deg, rgba(229, 214, 182, .55), rgba(239, 228, 208, .35) 30%, rgba(229, 214, 182, .55));
  border-top: 3px double var(--ink-faint);
  border-bottom: 3px double var(--ink-faint);
}
.container { max-width: 1200px; margin: 0 auto; }

.section-head {
  text-align: center;
  margin: 0 auto clamp(36px, 5vw, 60px);
  max-width: 760px;
}
.kicker {
  margin: 0 0 .6rem;
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.section-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.section-title em { font-weight: 400; color: var(--burgundy); }
.section-lede {
  margin: 1.25rem auto 0;
  max-width: 40em;
  font-style: italic;
  font-size: 1.08em;
  color: var(--ink-soft);
}

.section-intro {
  max-width: var(--measure);
  margin: 0 auto clamp(48px, 6vw, 72px);
  font-size: 1.1em;
}

/* Capolettera decorato */
.dropcap::first-letter {
  float: left;
  margin: .06em .14em 0 0;
  padding: .12em .14em .02em;
  font-family: var(--font-gothic);
  font-size: 3.6em;
  line-height: .82;
  color: var(--burgundy);
  background:
    radial-gradient(circle at 30% 30%, rgba(184, 134, 11, .15), transparent 70%),
    var(--paper-2);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold);
  text-shadow: 1px 1px 0 var(--gold-pale);
}

/* ---------- Comparsa allo scorrimento ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Pannelli espandibili ---------- */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: .25rem 0 0;
  padding: .35rem 0;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--burgundy);
  background: none;
  border: 0;
  cursor: pointer;
}
.toggle__icon {
  position: relative;
  width: 18px; height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: transform .45s var(--ease), background-color .3s;
}
.toggle__icon::before, .toggle__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.toggle__icon::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .45s var(--ease); }
.toggle[aria-expanded="true"] .toggle__icon { transform: rotate(180deg); }
.toggle[aria-expanded="true"] .toggle__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.toggle:hover .toggle__label { text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.js .expand {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease);
}
.js .expand > div { overflow: hidden; min-height: 0; }
.js .expand .expand__inner { opacity: 0; transform: translateY(-6px); transition: opacity .45s ease, transform .55s var(--ease); }
.js .expand.is-open { grid-template-rows: 1fr; }
.js .expand.is-open .expand__inner { opacity: 1; transform: none; }
.expand__inner { padding-top: .9rem; }
.expand__inner p:last-child { margin-bottom: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 1100px; margin: 0 auto; }

.years {
  position: sticky;
  top: calc(var(--header-h) + 10px);
  z-index: 5;
  display: flex;
  gap: .25rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(40px, 6vw, 64px);
  padding: .45rem;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(244, 236, 216, .96);
  border: 1px solid var(--ink-2);
  outline: 1px solid var(--ink-2);
  outline-offset: 3px;
  box-shadow: 0 10px 20px -16px rgba(43, 27, 23, .7);
}
.years::-webkit-scrollbar { display: none; }
.years a {
  flex: 0 0 auto;
  padding: .35rem .8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background-color .35s ease, color .35s ease;
}
.years a:hover { color: var(--burgundy); background: rgba(107, 29, 47, .07); }
.years a[aria-current="true"] { background: var(--burgundy); color: var(--paper); }

.tl-list {
  --progress: 0;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tl-list::before,
.tl-list::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}
.tl-list::before {
  bottom: 0;
  background: repeating-linear-gradient(180deg, var(--ink-faint) 0 7px, transparent 7px 12px);
}
.tl-list::after {
  width: 3px;
  height: calc(var(--progress) * 100%);
  background: linear-gradient(180deg, var(--burgundy-deep), var(--burgundy));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(107, 29, 47, .35);
}

.tl-item {
  position: relative;
  width: 50%;
  padding: 0 3.25rem clamp(40px, 5vw, 64px) 0;
}
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 clamp(40px, 5vw, 64px) 3.25rem; }

.tl-item__year {
  position: absolute;
  top: 0;
  right: -36px;
  z-index: 2;
  width: 72px; height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--burgundy);
  background: var(--paper);
  border: 2px solid var(--burgundy);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold);
  transition: background-color .5s ease, color .5s ease, transform .5s var(--ease);
}
.tl-item:nth-child(even) .tl-item__year { right: auto; left: -36px; }
.tl-item.is-reached .tl-item__year { background: var(--burgundy); color: var(--paper); transform: scale(1.04); }

.tl-card {
  position: relative;
  margin-top: 10px;
  padding: 1.5rem 1.7rem 1.3rem;
  background: linear-gradient(180deg, rgba(255, 252, 244, .7), rgba(239, 228, 208, .7));
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-print);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tl-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink-faint);
  pointer-events: none;
}
.tl-card::after {
  content: "";
  position: absolute;
  top: 24px;
  right: -9px;
  width: 16px; height: 16px;
  background: var(--paper-2);
  border-top: 1px solid var(--ink-2);
  border-right: 1px solid var(--ink-2);
  transform: rotate(45deg);
}
.tl-item:nth-child(even) .tl-card::after { right: auto; left: -9px; transform: rotate(-135deg); }
.tl-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 22px 40px -18px rgba(43, 27, 23, .55); }

.tl-card__place {
  margin: 0 0 .35rem;
  font-family: var(--font-caps);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--sage);
}
.tl-card__title { font-size: clamp(1.35rem, 1.1rem + .8vw, 1.7rem); }
.tl-card__title em { color: var(--burgundy); }

@media (max-width: 760px) {
  .tl-list::before, .tl-list::after { left: 28px; }
  .tl-item, .tl-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 40px 74px;
  }
  .tl-item__year, .tl-item:nth-child(even) .tl-item__year {
    left: 0; right: auto;
    width: 56px; height: 56px;
    font-size: .88rem;
  }
  .tl-card::after, .tl-item:nth-child(even) .tl-card::after { right: auto; left: -9px; top: 18px; transform: rotate(-135deg); }
  .tl-card { padding: 1.25rem 1.2rem 1.1rem; }
  .years { justify-content: flex-start; }
}

/* ---------- Biblioteca ---------- */
.lib-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 1.1rem 0 1.2rem;
  border-top: 3px double var(--ink-2);
  border-bottom: 1px solid var(--ink-2);
}
.filters { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  padding: .45rem .9rem;
  font-family: var(--font-caps);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(244, 236, 216, .6);
  border: 1px solid var(--ink-2);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--ink-faint);
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease;
}
.chip:hover { background: rgba(107, 29, 47, .1); color: var(--burgundy); }
.chip[aria-pressed="true"] { background: var(--ink-2); color: var(--paper); box-shadow: inset 0 0 0 2px var(--ink-2), inset 0 0 0 3px var(--gold-pale); }
.chip__count { font-family: var(--font-display); font-style: italic; letter-spacing: 0; opacity: .75; margin-left: .25rem; text-transform: none; }

.lib-tools { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.field { display: flex; flex-direction: column; gap: .2rem; }
.field__label {
  font-family: var(--font-caps);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input, .field select {
  min-width: 0;
  padding: .35rem .2rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink-2);
  border-radius: 0;
}
.field input { width: 15rem; max-width: 100%; }
.field input::placeholder { color: var(--ink-soft); opacity: .8; }
.field input:focus, .field select:focus { outline: none; border-bottom-color: var(--burgundy); box-shadow: 0 2px 0 -0.5px var(--burgundy); }
.field select { cursor: pointer; padding-right: 1rem; }
.field select option { background: var(--paper); font-style: normal; }

.lib-count {
  margin: .9rem 0 clamp(28px, 4vw, 44px);
  font-style: italic;
  color: var(--ink-soft);
  text-align: right;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr));
  gap: clamp(28px, 3.5vw, 48px) clamp(20px, 3vw, 40px);
}

.book {
  display: flex;
  flex-direction: column;
  perspective: 1200px;
  animation: shelve .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes shelve {
  from { opacity: 0; transform: translateY(24px) rotate(-1deg); }
  to { opacity: 1; transform: none; }
}

.book__cover {
  --cloth: #5A1A26;
  position: relative;
  height: 290px;
  border-radius: 3px 9px 9px 3px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .45) 0, rgba(255, 255, 255, .1) 3.5%, rgba(0, 0, 0, .22) 6.5%, transparent 9%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 70% 20%, rgba(255, 255, 255, .1), transparent 60%),
    var(--cloth);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .3),
    inset -2px 0 4px rgba(255, 255, 255, .08),
    5px 5px 0 -1px var(--paper-3),
    5px 5px 0 0 var(--paper-edge),
    9px 9px 0 -1px var(--paper-2),
    9px 9px 0 0 var(--paper-edge),
    16px 22px 30px -12px rgba(43, 27, 23, .55);
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  transition: transform .7s var(--ease), box-shadow .7s var(--ease);
  cursor: pointer;
}
.book:hover .book__cover,
.book:focus-within .book__cover { transform: rotateY(-16deg) translateX(-2px); }

.book__frame {
  position: absolute;
  inset: 16px 16px 16px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem .75rem;
  text-align: center;
  color: var(--gold-pale);
  border: 1.5px solid rgba(227, 205, 143, .85);
  outline: 1px solid rgba(227, 205, 143, .55);
  outline-offset: -7px;
}
.book__author, .book__year {
  font-family: var(--font-caps);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--gold-pale);
}
.book__orn { width: 110px; height: 20px; color: var(--gold-pale); opacity: .9; }
.book__title {
  font-family: var(--font-caps);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: .04em;
  background: linear-gradient(175deg, #FBEBB7 0%, #E3C46E 35%, #B8860B 60%, #F0D88E 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .55));
}

.book__body { padding: 1.4rem .2rem 0; display: flex; flex-direction: column; flex: 1; }
.book__meta {
  margin: 0 0 .25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: .95rem;
  color: var(--burgundy);
}
.book__heading { margin: 0 0 .5rem; font-size: 1.45rem; }
.book__plot { font-size: 1rem; line-height: 1.55; flex: 1; }
.book__body .btn { align-self: flex-start; }

.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0 0 .8rem; padding: 0; }
.tags li {
  padding: .12rem .55rem;
  font-family: var(--font-caps);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
  border: 1px solid rgba(42, 71, 54, .55);
  border-radius: 2px;
}

.lib-empty {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  border: 1px dashed var(--ink-faint);
}

/* ---------- Modal d'approfondimento ---------- */
.folio {
  width: min(880px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 40px 90px -20px rgba(20, 10, 5, .75);
  overflow: hidden;
}
.folio[open] { animation: folio-in .55s var(--ease) both; }
.folio.is-closing { animation: folio-out .3s ease-in both; }
.folio::backdrop {
  background: rgba(43, 27, 23, .62);
  -webkit-backdrop-filter: blur(3px) sepia(.4);
  backdrop-filter: blur(3px) sepia(.4);
}
.folio[open]::backdrop { animation: fade .4s ease both; }
.folio.is-closing::backdrop { animation: fade .3s ease reverse both; }

@keyframes folio-in {
  from { opacity: 0; transform: perspective(1200px) translateY(40px) rotateX(8deg) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes folio-out {
  to { opacity: 0; transform: translateY(24px) scale(.97); }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.folio__inner {
  position: relative;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(28px, 5vw, 60px) clamp(20px, 5vw, 64px);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .5), transparent 60%),
    var(--paper);
}
.folio__inner::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--ink-2);
  outline: 1px solid var(--gold);
  outline-offset: -5px;
  pointer-events: none;
}
.folio__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 2;
  margin: -12px -12px 0 1rem;
  padding: .45rem .8rem;
  font-family: var(--font-caps);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--burgundy);
  border: 0;
  box-shadow: inset 0 0 0 2px var(--burgundy), inset 0 0 0 3px var(--gold-pale);
  cursor: pointer;
  transition: background-color .3s;
}
.folio__close:hover { background: var(--ink); }

.folio__head { text-align: center; margin-bottom: 1.5rem; clear: none; }
.folio__kicker {
  margin: 0;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--burgundy);
}
.folio__title {
  margin: .4rem 0 .25rem;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
}
.folio__original { margin: 0; font-style: italic; color: var(--ink-soft); }
.folio__meta {
  margin: .6rem 0 0;
  font-family: var(--font-caps);
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--sage);
}

.folio__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 44px);
}
.folio h3 {
  margin: 1.4rem 0 .5rem;
  font-family: var(--font-caps);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--burgundy);
}
.folio h3:first-child { margin-top: 0; }
.folio__section p { font-size: 1.05rem; }

.cast { list-style: none; margin: 0; padding: 0; }
.cast li { padding: .55rem 0; border-bottom: 1px dotted var(--ink-faint); font-size: .98rem; line-height: 1.45; }
.cast strong { display: block; font-family: var(--font-display); color: var(--ink-2); }

.folio__aside {
  padding: 1.25rem 1.25rem .5rem;
  background: rgba(229, 214, 182, .45);
  border: 1px solid var(--ink-faint);
  align-self: start;
}
.folio__quote {
  margin: 2rem 0 0;
  padding: 1.5rem 1rem 0;
  border-top: 3px double var(--ink-faint);
  text-align: center;
}
.folio__quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink-2);
}
.folio__quote figcaption { margin-top: .5rem; font-family: var(--font-caps); font-size: .74rem; letter-spacing: .14em; color: var(--burgundy); }

body.has-modal { overflow: hidden; }

@media (max-width: 700px) {
  .folio__grid { grid-template-columns: 1fr; }
  .folio__close span { display: none; }
}

/* ---------- Temi ---------- */
.themes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px);
}
.theme {
  position: relative;
  padding: clamp(24px, 3.4vw, 40px);
  background: linear-gradient(180deg, rgba(255, 252, 244, .6), rgba(239, 228, 208, .55));
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-print);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.theme::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--ink-faint);
  pointer-events: none;
}
.theme:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255, 255, 255, .55) inset, 0 26px 44px -22px rgba(43, 27, 23, .6); }
.theme__num {
  position: absolute;
  top: -.1em; right: .3em;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 6.5rem;
  line-height: 1;
  color: var(--burgundy);
  opacity: .08;
  pointer-events: none;
}
.theme__icon {
  width: 66px; height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  color: var(--burgundy);
  background: var(--paper);
  border: 1.5px solid var(--burgundy);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gold);
  transition: transform .6s var(--ease), color .4s;
}
.theme__icon svg { width: 36px; height: 36px; }
.theme:hover .theme__icon { transform: rotate(-8deg) scale(1.05); color: var(--ink-2); }
.theme__title { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.8rem); }
.theme p { font-size: 1.04rem; }

.fact {
  margin-top: 1rem;
  padding: .8rem 1rem;
  font-style: italic;
  font-size: .98rem;
  line-height: 1.5;
  background: rgba(42, 71, 54, .07);
  border-left: 3px solid var(--sage);
}
.fact__label {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--font-caps);
  font-style: normal;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
}

.theme__works {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .9rem;
  margin: 1.1rem 0 0;
  padding-top: .9rem;
  border-top: 1px dotted var(--ink-faint);
}
.theme__works > span {
  font-family: var(--font-caps);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.theme__works button { font-size: 1.02rem; padding: 0 0 2px; }

@media (max-width: 820px) {
  .themes { grid-template-columns: 1fr; }
}

/* ---------- Mappa ---------- */
.map-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.map {
  margin: 0;
  padding: 10px;
  background: var(--paper-2);
  border: 1.5px solid var(--ink-2);
  outline: 1px solid var(--ink-2);
  outline-offset: 4px;
  box-shadow: var(--shadow-print);
}
.map svg { display: block; width: 100%; height: auto; border: 1px solid var(--ink-faint); }
.map__caption {
  margin-top: .6rem;
  text-align: center;
  font-style: italic;
  font-size: .9rem;
  color: var(--ink-soft);
}

.map__streets path { fill: none; stroke: var(--ink-2); stroke-width: 3; stroke-opacity: .16; stroke-linecap: round; stroke-linejoin: round; }
.map__ditch { fill: none; stroke: #5f6f70; stroke-width: 2; stroke-dasharray: 6 5; opacity: .5; }
.map__bridges path { stroke: var(--ink-2); stroke-width: 6; stroke-linecap: butt; opacity: .7; }
.map__river { font-family: var(--font-display); font-style: italic; font-size: 17px; fill: var(--ink-2); letter-spacing: .25em; }
.map__park { font-family: var(--font-display); font-style: italic; font-size: 12px; fill: var(--sage); }
.map__district text {
  font-family: var(--font-caps);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .35em;
  text-transform: uppercase;
  fill: var(--ink-soft);
  opacity: .55;
}
.map__cartouche-title { font-family: var(--font-gothic); font-size: 36px; fill: var(--burgundy); }
.map__cartouche-sub { font-family: var(--font-caps); font-size: 11px; letter-spacing: .14em; fill: var(--ink-2); }
.map__compass text, .map__scale text { font-family: var(--font-caps); font-size: 13px; font-weight: 700; fill: var(--ink-2); }
.map__scale text { font-size: 11px; font-weight: 400; letter-spacing: .08em; }

.hotspot { cursor: pointer; outline: none; }
.hotspot__pulse {
  fill: none;
  stroke: var(--burgundy);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.6s ease-out infinite;
}
.hotspot__pin {
  fill: var(--burgundy);
  stroke: var(--paper);
  stroke-width: 2.5;
  transition: fill .3s ease;
}
.hotspot__focus { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 3; opacity: 0; }
.hotspot__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  fill: var(--paper);
  pointer-events: none;
}
.hotspot__label {
  font-family: var(--font-caps);
  font-size: 14px;
  font-weight: 700;
  fill: var(--ink-2);
  paint-order: stroke;
  stroke: var(--paper-2);
  stroke-width: 5px;
  stroke-linejoin: round;
  transition: fill .3s;
  pointer-events: none;
}
.hotspot:hover .hotspot__pin, .hotspot.is-active .hotspot__pin { fill: var(--gold-bright); }
.hotspot:hover .hotspot__label, .hotspot.is-active .hotspot__label { fill: var(--burgundy); }
.hotspot.is-active .hotspot__num, .hotspot:hover .hotspot__num { fill: var(--ink); }
.hotspot:focus-visible .hotspot__focus { opacity: 1; }
.hotspot g.hotspot__scale { transition: transform .35s var(--ease); transform-box: fill-box; transform-origin: center; }
.hotspot:hover g.hotspot__scale, .hotspot.is-active g.hotspot__scale { transform: scale(1.18); }

@keyframes pulse {
  0% { transform: scale(.9); opacity: .8; }
  80%, 100% { transform: scale(2); opacity: 0; }
}

.map-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.map-panel__inner {
  position: relative;
  padding: 1.6rem 1.5rem 1.3rem;
  background: var(--paper);
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-print);
  min-height: 15rem;
}
.map-panel__inner::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ink-faint);
  pointer-events: none;
}
.map-panel__inner.is-updating { animation: ink-in .7s var(--ease); }
.map-panel__kicker {
  margin: 0 0 .25rem;
  font-family: var(--font-caps);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--sage);
}
.map-panel__title { font-size: 1.6rem; margin-bottom: .6rem; }
.map-panel__title .num { font-style: italic; color: var(--burgundy); margin-right: .35rem; }
.map-panel__inner p { font-size: 1.02rem; line-height: 1.55; }
.map-panel__works { display: flex; flex-wrap: wrap; gap: .25rem .8rem; margin: 0; padding-top: .7rem; border-top: 1px dotted var(--ink-faint); }

.place-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
}
.place-list button {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem .3rem .3rem;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--ink-2);
  background: rgba(244, 236, 216, .7);
  border: 1px solid var(--ink-faint);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .3s, background-color .3s, color .3s;
}
.place-list button span {
  display: grid;
  place-items: center;
  width: 1.45rem; height: 1.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  color: var(--paper);
  background: var(--burgundy);
  border-radius: 50%;
}
.place-list button:hover { border-color: var(--burgundy); color: var(--burgundy); }
.place-list button[aria-pressed="true"] { background: var(--ink-2); color: var(--paper); border-color: var(--ink-2); }
.place-list button[aria-pressed="true"] span { background: var(--gold-bright); color: var(--ink); }

@media (max-width: 960px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-panel { position: static; }
}
@media (max-width: 640px) {
  .hotspot__label, .map__district, .map__park, .map__scale { display: none; }
  .hotspot g.hotspot__scale { transform: scale(1.7); }
  .hotspot:hover g.hotspot__scale, .hotspot.is-active g.hotspot__scale { transform: scale(1.95); }
}

/* ---------- Gazzetta ---------- */
.games {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}
@media (max-width: 960px) { .games { grid-template-columns: 1fr; } }

.gazette {
  position: relative;
  padding: clamp(20px, 3.4vw, 40px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 20%),
    #EDE2C8;
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-print), 0 0 0 6px var(--paper), 0 0 0 7px var(--ink-faint);
  transform: rotate(-.4deg);
  overflow: hidden;
}
.gazette::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 48%, rgba(61, 35, 20, .05) 50%, transparent 52%);
}
.gazette__masthead { text-align: center; border-bottom: 4px double var(--ink); padding-bottom: .6rem; }
.gazette__motto { margin: 0; font-style: italic; font-size: .85rem; color: var(--ink-soft); }
.gazette__name {
  margin: .2rem 0 .1rem;
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.2rem);
  line-height: 1.05;
  color: var(--ink);
}
.gazette__strip {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  margin-top: .45rem;
  padding: .3rem 0;
  font-family: var(--font-caps);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.gazette__content { padding: 1.4rem 0 .5rem; min-height: 19rem; }
.gazette__content.is-printing { animation: ink-in .95s var(--ease); }
@keyframes ink-in {
  0% { opacity: 0; filter: blur(4px); transform: scale(1.02); }
  55% { opacity: 1; filter: blur(.6px); }
  100% { opacity: 1; filter: none; transform: none; }
}
.gazette__headline {
  margin: 0 0 1rem;
  padding-bottom: .8rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(1.15rem, .95rem + .9vw, 1.65rem);
  line-height: 1.15;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--ink);
}
.gazette__quote {
  margin: 0 auto;
  max-width: 30em;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem);
  line-height: 1.4;
  color: var(--ink);
}
.gazette__source {
  margin: .8rem 0 1.1rem;
  text-align: center;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--burgundy);
}
.gazette__source cite { font-style: normal; }
.gazette__note {
  margin: 0;
  padding-top: .9rem;
  border-top: 1px solid var(--ink);
  columns: 2 14em;
  column-gap: 1.6rem;
  column-rule: 1px solid var(--ink-faint);
  font-size: .98rem;
  line-height: 1.5;
  text-align: justify;
  hyphens: auto;
}
.gazette__note::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.6em;
  line-height: .85;
  margin: .05em .1em 0 0;
  color: var(--ink);
}
.gazette__stamp {
  position: absolute;
  top: 16px;
  right: 14px;
  padding: .35rem .7rem;
  font-family: var(--font-caps);
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--burgundy);
  border: 2px solid var(--burgundy);
  outline: 1px solid var(--burgundy);
  outline-offset: 2px;
  transform: rotate(12deg);
  opacity: .7;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.gazette__stamp.is-stamping { animation: stamp .55s var(--ease); }
@keyframes stamp {
  0% { transform: rotate(12deg) scale(1.8); opacity: 0; }
  60% { transform: rotate(12deg) scale(.94); opacity: .85; }
  100% { transform: rotate(12deg) scale(1); opacity: .7; }
}
.gazette__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 4px double var(--ink);
}
.gazette .btn { box-shadow: inset 0 0 0 3px #EDE2C8, inset 0 0 0 4px var(--btn-c); }
.gazette .btn--primary { box-shadow: inset 0 0 0 3px var(--burgundy), inset 0 0 0 4px var(--gold-pale); }
.gazette .btn:hover { box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--gold-pale); }

@media (max-width: 520px) {
  .gazette { transform: none; }
  .gazette__strip { flex-direction: column; align-items: center; gap: .1rem; }
  .gazette__stamp { display: none; }
}

/* ---------- Quiz ---------- */
.quiz {
  position: relative;
  padding: clamp(22px, 3.4vw, 40px);
  background: linear-gradient(180deg, rgba(255, 252, 244, .65), rgba(239, 228, 208, .6));
  border: 1px solid var(--ink-2);
  box-shadow: var(--shadow-print);
}
.quiz::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--ink-faint);
  pointer-events: none;
}
.quiz__head { text-align: center; margin-bottom: 1.2rem; }
.quiz__quill { width: 40px; height: 40px; color: var(--burgundy); }
.quiz__title { margin: .3rem 0 .3rem; font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); }
.quiz__sub { margin: 0; font-style: italic; color: var(--ink-soft); font-size: 1rem; }

.quiz__progress { display: flex; gap: 4px; margin-bottom: 1rem; }
.quiz__progress span { flex: 1; height: 4px; background: var(--ink-faint); transition: background-color .4s; }
.quiz__progress span.is-done { background: var(--burgundy); }
.quiz__step {
  margin: 0 0 .25rem;
  font-family: var(--font-caps);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--sage);
}
.quiz__q { margin: 0 0 1rem; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.45rem); outline: none; }
.quiz__options { display: grid; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.option {
  position: relative;
  width: 100%;
  padding: .8rem 1rem .8rem 3rem;
  font-family: var(--font-body);
  font-size: 1.04rem;
  line-height: 1.4;
  text-align: left;
  color: var(--ink);
  background: rgba(244, 236, 216, .55);
  border: 1px solid rgba(61, 35, 20, .45);
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, transform .25s var(--ease), color .3s;
}
.option::before {
  content: attr(data-letter);
  position: absolute;
  left: .65rem; top: 50%;
  width: 1.7rem; height: 1.7rem;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  color: var(--burgundy);
  border: 1px solid var(--burgundy);
  border-radius: 50%;
  transition: background-color .3s, color .3s;
}
.option:hover, .option:focus-visible { background: rgba(107, 29, 47, .07); border-color: var(--burgundy); transform: translateX(4px); }
.option:hover::before { background: var(--burgundy); color: var(--paper); }
.option.is-chosen { background: var(--ink-2); color: var(--paper); border-color: var(--ink-2); }
.option.is-chosen::before { background: var(--gold-bright); color: var(--ink); border-color: var(--gold-bright); }

.quiz__card { animation: fade-up .55s var(--ease) both; }

.quiz__result { text-align: center; }
.quiz__result-kicker {
  margin: 0;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--burgundy);
}
.quiz__result-name {
  margin: .3rem 0 0;
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.3rem);
  line-height: 1.05;
  color: var(--burgundy);
}
.quiz__result-epithet { margin: .3rem 0 1rem; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--ink-2); }
.quiz__result-text { text-align: left; font-size: 1.04rem; }
.quiz__result-motto {
  margin: 1rem 0 1.25rem;
  padding: .8rem 1rem;
  font-family: var(--font-display);
  font-style: italic;
  border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint);
}
.quiz__result-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

/* ---------- Colophon ---------- */
.colophon {
  padding: clamp(56px, 8vw, 96px) var(--gutter) clamp(40px, 5vw, 60px);
  text-align: center;
  color: var(--paper-2);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(184, 134, 11, .12), transparent 60%),
    var(--ink);
  border-top: 6px double var(--gold);
}
.colophon__device { width: 96px; height: 96px; color: var(--gold-pale); }
.colophon__device text { font-family: var(--font-caps); font-size: 10px; letter-spacing: .1em; fill: var(--gold-pale); }
.colophon__kicker {
  margin: 1rem 0 .4rem;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--gold-pale);
}
.colophon__main {
  margin: 0 auto 1rem;
  max-width: 34em;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem);
  line-height: 1.5;
}
.colophon__main em { color: var(--gold-pale); }
.colophon__year { font-family: var(--font-caps); font-size: .8rem; letter-spacing: .22em; color: #d8c8a8; }
.divider--light { color: var(--gold); }
.colophon__note { max-width: 40em; margin: 1.25rem auto; font-style: italic; font-size: .95rem; color: #cbbb9b; }
.colophon__top { color: var(--gold-pale); font-family: var(--font-caps); font-size: .78rem; letter-spacing: .16em; }
.colophon .ink-link {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 C 18 2, 32 7, 50 4 S 82 2, 99 5' fill='none' stroke='%23E3CD8F' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.colophon .ink-link:hover { color: #fff3d0; }

/* ---------- Torna su ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 50;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--burgundy);
  border-radius: 50%;
  text-decoration: none;
  font-size: .8rem;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--gold), 0 10px 20px -8px rgba(43, 27, 23, .6);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s var(--ease), background-color .3s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  padding: .7rem 1.2rem;
  font-family: var(--font-caps);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--paper);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px var(--gold);
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: opacity .35s, transform .35s var(--ease);
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Stampa ---------- */
@media print {
  .masthead, .ink-progress, .to-top, .scroll-cue, .years, .toggle, .gazette__actions { display: none !important; }
  .js .expand { grid-template-rows: 1fr; }
  .js .expand .expand__inner, .js .reveal { opacity: 1; transform: none; }
  body::before { display: none; }
}
