@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
/* Lettere latine che l'italiano non usa (turco, tedesco, lingue dell'est): il browser scarica
   questi file solo se la pagina ne contiene. Cirillico e arabo usano il carattere di sistema. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Disegno: manifesto anni '70. Carta color crema, inchiostro blu notte, cinque bande
   (sole, arancio, rosso, vino, petrolio) che fanno da strada: la «retro way». */
:root {
  color-scheme: light dark;
  --paper: light-dark(oklch(96.5% 0.022 85), oklch(17.5% 0.03 268));
  --paper-2: light-dark(oklch(92.5% 0.032 82), oklch(23% 0.036 268));
  --card: light-dark(oklch(99% 0.01 85), oklch(21% 0.034 268));
  --ink: light-dark(oklch(23% 0.045 268), oklch(95% 0.02 85));
  --ink-2: light-dark(oklch(43% 0.04 268), oklch(78% 0.03 85));
  --rule: light-dark(oklch(86% 0.035 82), oklch(33% 0.04 268));
  --accent: light-dark(oklch(55% 0.2 33), oklch(74% 0.16 42));
  --on-accent: light-dark(oklch(98.5% 0.012 85), oklch(17.5% 0.03 268));
  --ok: light-dark(oklch(45% 0.11 155), oklch(80% 0.13 155));
  --danger: light-dark(oklch(48% 0.19 25), oklch(74% 0.16 25));

  --night: oklch(21% 0.055 272);
  --night-2: oklch(29% 0.075 290);
  --on-night: oklch(96.5% 0.022 85);
  --on-night-2: oklch(82% 0.045 80);
  --sun: oklch(85% 0.15 86);
  --orange: oklch(73% 0.17 55);
  --red: oklch(60% 0.2 33);
  --wine: oklch(42% 0.14 12);
  --teal: oklch(56% 0.09 195);
  --stripes: linear-gradient(90deg, var(--sun) 0 20%, var(--orange) 20% 40%, var(--red) 40% 60%, var(--wine) 60% 80%, var(--teal) 80% 100%);

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --body: "Instrument Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 1.25rem;
  --radius-s: 0.7rem;
  --shadow: 0 1px 0 oklch(23% 0.045 268 / 0.05), 0 22px 44px -26px oklch(23% 0.045 268 / 0.45);
  --top-h: 4.6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 1rem); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
p { margin: 0; }
img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--sun); color: var(--night); }

.wrap { width: min(100% - clamp(2rem, 6vw, 5rem), 74rem); margin-inline: auto; }
.page { padding-bottom: 1rem; }
.skip { position: absolute; inset-inline-start: -999rem; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.8rem; z-index: 60; border-radius: 99px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Intestazione: una barra a pillola che resta in alto e galleggia sopra la scena */
.top { position: sticky; top: 0; z-index: 40; height: var(--top-h); padding-top: 0.7rem; pointer-events: none; }
.top__bar {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; gap: 0.5rem 1.5rem;
  min-height: 3.2rem; padding: 0.4rem 0.45rem; padding-inline-start: 1.15rem;
  background: color-mix(in oklch, var(--card) 90%, transparent);
  border: 1px solid var(--rule); border-radius: 99px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font: 800 1.4rem/1 var(--display); letter-spacing: -0.05em; text-decoration: none; }
.brand:hover { color: inherit; }
.brand__mark { width: 1.7rem; height: 1.7rem; flex: none; transition: translate 0.3s var(--ease); }
.brand:hover .brand__mark { translate: 0 -2px; }
.mark__l { fill: var(--sun); } .mark__c { fill: var(--red); } .mark__r { fill: var(--teal); }
.top__menu { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; flex: 1; min-width: 0; }
.top__links, .top__nav { display: flex; align-items: center; gap: 0.2rem; font-size: 0.95rem; font-weight: 500; }
.top__links a, .top__nav a:not(.btn), .top__nav .linklike {
  padding: 0.45rem 0.8rem; border-radius: 99px; text-decoration: none; color: var(--ink-2); white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.top__links a:hover, .top__nav a:not(.btn):hover, .top__nav .linklike:hover { background: var(--paper-2); color: var(--ink); }
.top__links a[aria-current] { color: var(--ink); font-weight: 700; background: var(--paper-2); }
.top__nav form { display: contents; }
.top__nav .btn { margin-inline-start: 0.4rem; }

/* Scelta della lingua: il sito segue quella del browser, da qui la si cambia a mano. */
.lang { position: relative; }
.lang summary {
  display: flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.7rem; border-radius: 99px;
  list-style: none; cursor: pointer; color: var(--ink-2); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  transition: background-color 0.2s, color 0.2s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: var(--paper-2); color: var(--ink); }
.lang summary svg { width: 1.1rem; height: 1.1rem; flex: none; }
.lang ul {
  position: absolute; z-index: 5; top: calc(100% + 0.7rem); inset-inline-end: 0;
  display: grid; gap: 0.1rem; min-width: 11rem; margin: 0; padding: 0.4rem; list-style: none;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang li a { display: block; }
.top__nav .lang a[aria-current] { color: var(--ink); font-weight: 700; background: var(--paper-2); }
.top__add { flex: none; gap: 0.28em; }
.top__toggle { display: none; }

@media (max-width: 75rem) {
  .top__bar { gap: 0.5rem; }
  .top__add { margin-inline-start: auto; }
  .top__toggle {
    display: inline-grid; place-items: center; order: 3; width: 2.5rem; height: 2.5rem; flex: none;
    border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer;
  }
  .top__toggle svg { width: 1.1rem; height: 1.1rem; }
  .top__toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .top__menu {
    display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0.25rem; padding: 0.6rem;
    background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  .top__menu.is-open { display: flex; animation: drop 0.35s var(--ease); }
  .top__links, .top__nav { flex-direction: column; align-items: stretch; gap: 0.1rem; font-size: 1.05rem; }
  .top__links a, .top__nav a:not(.btn), .top__nav .linklike { padding: 0.7rem 0.9rem; text-align: start; }
  .top__nav { padding-top: 0.35rem; border-top: 1px solid var(--rule); }
  .top__nav .btn { margin: 0.4rem 0 0; }
  .lang summary { padding: 0.7rem 0.9rem; font-size: 0.95rem; }
  .lang ul {
    position: static; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    min-width: 0; padding: 0 0 0.3rem; border: 0; border-radius: 0; box-shadow: none; background: none;
  }
}
/* Senza JavaScript il pulsante del menu non può aprirlo: le voci restano in pagina. */
@media (max-width: 75rem) and (scripting: none) {
  .top { position: static; height: auto; padding-bottom: 0.7rem; }
  .top__bar { flex-wrap: wrap; border-radius: var(--radius); }
  .top__toggle { display: none; }
  .top__menu { display: flex; position: static; order: 4; flex-basis: 100%; border: 0; box-shadow: none; padding: 0; background: none; }
}
@media (max-width: 26rem) {
  .top__add-more { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }

/* Controlli */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.6rem 1.15rem; border: 1px solid var(--ink); border-radius: 99px;
  background: transparent; color: var(--ink);
  font: 600 0.95rem/1.2 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 10px 20px -12px var(--accent); }
.btn--primary:hover { background: color-mix(in oklch, var(--accent), var(--ink) 22%); border-color: transparent; color: var(--on-accent); transform: translateY(-1px); }
.btn--sun { background: var(--sun); border-color: var(--sun); color: var(--night); }
.btn--sun:hover { background: var(--on-night); border-color: var(--on-night); color: var(--night); transform: translateY(-1px); }
.btn--ghost { border-color: color-mix(in oklch, currentColor 35%, transparent); }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: var(--on-accent); }
.btn--wide { width: 100%; padding-block: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: default; pointer-events: none; box-shadow: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.linklike:hover { color: var(--accent); }
.linklike--danger { color: var(--danger); text-decoration-color: currentColor; }
.top__nav .linklike { text-decoration: none; }
.count { display: inline-block; font: 600 0.72rem/1.5 var(--body); letter-spacing: 0; padding-inline: 0.5em; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-variant-numeric: tabular-nums; vertical-align: middle; }

input:not([type="radio"], [type="checkbox"], [type="file"]), select, textarea {
  width: 100%; padding: 0.6rem 0.85rem; border: 1px solid var(--rule); border-radius: var(--radius-s);
  background: var(--card); color: var(--ink); font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:not([type="radio"], [type="checkbox"], [type="file"]):focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 25%, transparent);
}
textarea { resize: vertical; line-height: 1.5; }
input[type="file"] { font: inherit; max-width: 100%; }
input[type="file"]::file-selector-button { margin-inline-end: 0.75rem; padding: 0.45rem 0.9rem; border: 1px solid var(--ink); border-radius: 99px; background: transparent; color: var(--ink); font: 600 0.9rem var(--body); cursor: pointer; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }

/* Messaggi */
.flashes { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.flash { padding: 0.8rem 1.1rem; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--card); }
.flash--ok { border-color: var(--ok); background: color-mix(in oklch, var(--ok) 9%, var(--card)); }
.flash--error { border-color: var(--danger); color: var(--danger); font-weight: 600; background: color-mix(in oklch, var(--danger) 7%, var(--card)); }
.errors { margin-top: 1.25rem; }
.errors ul { margin: 0.4rem 0; padding-inline-start: 1.2rem; font-weight: 400; }
.errors a { text-decoration-color: currentColor; }
.errors a:hover { color: inherit; text-decoration-thickness: 0.14em; }

.toasts { position: fixed; z-index: 70; left: 50%; bottom: 1.25rem; translate: -50% 0; display: grid; gap: 0.5rem; justify-items: center; width: min(100% - 2rem, 30rem); pointer-events: none; }
.toast { padding: 0.75rem 1.2rem; border-radius: 99px; background: var(--night); color: var(--on-night); font-weight: 600; text-align: center; box-shadow: var(--shadow); animation: toast 0.5s var(--ease); transition: opacity 0.3s, transform 0.3s; }
.toast--ok::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-inline-end: 0.55rem; border-radius: 50%; background: var(--sun); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(0.96); } }

/* Scena: cielo al tramonto, sole a strisce, colline e la strada a cinque bande.
   Ogni strato si muove a una velocità diversa (site.js). */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  margin-top: calc(-1 * var(--top-h)); padding: calc(var(--top-h) + clamp(2rem, 6vw, 4.5rem)) 0 clamp(5rem, 11vw, 9rem);
  min-height: clamp(31rem, 40vw, 56rem);
  display: grid; align-items: center;
  color: var(--on-night);
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 34%, oklch(40% 0.13 350) 58%, oklch(58% 0.18 35) 78%, var(--orange) 92%, var(--sun) 100%);
}
.hero::after { content: ""; position: absolute; z-index: 2; inset: auto 0 -1px 0; height: 2.25rem; background: var(--paper); border-radius: 2.25rem 2.25rem 0 0; }
.hero__layer { position: absolute; z-index: -1; left: -4%; bottom: 0; width: 108%; height: 100%; will-change: transform; pointer-events: none; }
.hero__layer--stars { height: 60%; top: 0; bottom: auto; }
.hero__inner { position: relative; z-index: 1; will-change: transform, opacity; }
.hero__text { max-width: 36rem; }
.hero h1 { font-size: clamp(2.7rem, 1.5rem + 5vw, 5.2rem); line-height: 0.9; letter-spacing: -0.055em; text-wrap: balance; }
.hero__sub { margin-top: 1.1rem; font-size: 1.1rem; color: var(--on-night-2); max-width: 30rem; }
.f-star { fill: var(--on-night); }
.f-hill-1 { fill: oklch(37% 0.12 345); }
.f-hill-2 { fill: oklch(29% 0.09 305); }
.f-ground { fill: var(--night); }
.f-sun { fill: var(--sun); } .f-orange { fill: var(--orange); } .f-red { fill: var(--red); } .f-wine { fill: var(--wine); } .f-teal { fill: var(--teal); }
.s-sun { stop-color: var(--sun); } .s-red { stop-color: oklch(66% 0.2 38); }

.search {
  display: flex; align-items: center; gap: 0.5rem; max-width: 33rem; margin-top: 2rem;
  padding: 0.4rem; padding-inline-start: 1.15rem; border-radius: 99px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 24px 46px -22px oklch(10% 0.05 272 / 0.7);
}
.search:focus-within { outline: 3px solid var(--sun); outline-offset: 3px; }
.search svg { flex: none; width: 1.15rem; height: 1.15rem; color: var(--ink-2); }
.search input[type="search"] { flex: 1; min-width: 0; padding: 0.55rem 0.2rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 1.05rem; }
.search input[type="search"]:focus-visible { box-shadow: none; }

.hero--sheet { min-height: clamp(26rem, 37vw, 46rem); align-items: end; padding-bottom: clamp(4rem, 7vw, 5.5rem); }
.hero--sheet h1 { font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.6rem); }

@media (max-width: 48rem) {
  .hero { align-items: start; padding-bottom: 15rem; }
  .hero__layer { height: 17rem; }
  .hero__layer--stars { height: 55%; }
  .hero--sheet { padding-bottom: 12rem; }
  .hero--sheet .hero__layer:not(.hero__layer--stars) { height: 13.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero__text > * { animation: rise 0.9s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: 70ms; }
  .hero__text > :nth-child(3) { animation-delay: 140ms; }
  .hero__text > :nth-child(4) { animation-delay: 210ms; }
  .hero__text > :nth-child(5) { animation-delay: 280ms; }
  .hero__layer--sun { animation: sunrise 1.4s var(--ease) both; }
  @keyframes sunrise { from { translate: 0 90px; } }
  @keyframes twinkle { 50% { opacity: 0.25; } }
  .f-star:nth-child(3n) { animation: twinkle 3.2s ease-in-out infinite; }
  .f-star:nth-child(4n + 1) { animation: twinkle 4.6s ease-in-out 0.8s infinite; }
}

/* Titolo di pagina e filtro */
.lead { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; margin-block: clamp(1.75rem, 5vw, 3rem) 1.5rem; }
.lead__sub { color: var(--ink-2); margin-top: 0.6rem; }
.filter { display: flex; gap: 0.5rem; flex: 0 1 26rem; }
.filter input { flex: 1; min-width: 0; }
.filter select { width: auto; }

.listing { transition: opacity 0.2s; }
.listing[aria-busy="true"] { opacity: 0.55; }
.listing__bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; flex-wrap: wrap; margin-block: 0.25rem 1.5rem; }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; max-width: 100%; }
.chips a { padding: 0.5rem 1rem; border: 1px solid var(--rule); border-radius: 99px; background: var(--card); color: var(--ink-2); font-weight: 600; font-size: 0.93rem; text-decoration: none; white-space: nowrap; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.chips a:hover { border-color: var(--ink); color: var(--ink); }
.chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-block: -0.75rem 1.5rem; }
.filters select { width: auto; max-width: 100%; padding: 0.45rem 0.8rem; border-radius: 99px; color: var(--ink-2); font-weight: 600; font-size: 0.88rem; cursor: pointer; }
.filters select:has(option:checked:not([value=""])) { border-color: var(--ink); color: var(--ink); }
.filters .btn { padding: 0.45rem 1rem; font-size: 0.88rem; }
.filters__state { margin-inline-start: auto; font-size: 0.88rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.filters__state a { margin-inline-start: 0.6rem; font-weight: 600; color: var(--ink); }
@media (max-width: 40rem) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; }
  .filters select { width: 100%; }
  .filters__state, .filters noscript { grid-column: 1 / -1; margin-inline-start: 0; }
}
/* La lista che si apre ha il disegno del sito (lo stesso del menu delle lingue) al posto di quella del
   browser. Resta un <select> vero: tastiera, lettori di schermo e invio senza JavaScript non cambiano.
   Dove `appearance: base-select` manca si vede la lista di sistema. */
@supports (appearance: base-select) {
  .filters select, .filters select::picker(select) { appearance: base-select; }
  /* La freccia ha un posto fisso; il testo scelto non va mai a capo. */
  .filters select { display: inline-block; position: relative; padding-inline-end: 2.15rem; overflow: hidden; white-space: nowrap; }
  .filters select:open { border-color: var(--ink); color: var(--ink); }
  .filters select::picker-icon { content: ""; position: absolute; inset-block-start: calc(50% - 0.21rem); inset-inline-end: 0.95rem; width: 0.42rem; height: 0.42rem; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -0.12rem; transition: rotate 0.2s, translate 0.2s; }
  .filters select:open::picker-icon { rotate: 225deg; translate: 0 0.12rem; }
  .filters select::picker(select) {
    margin-block: 0.45rem; padding: 0.4rem; max-inline-size: calc(100vw - 2rem); max-block-size: min(21rem, 70vh);
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); color: var(--ink-2); box-shadow: var(--shadow);
    scrollbar-width: thin; scrollbar-color: var(--rule) transparent;
    /* Si apre sotto il filtro; sopra solo quando sotto non ci sta (il browser sceglierebbe il lato più ampio). */
    position-try-order: normal;
  }
  .filters option { padding: 0.5rem 0.85rem; border-radius: 99px; white-space: nowrap; cursor: pointer; transition: background-color 0.2s, color 0.2s; }
  .filters option + option { margin-top: 0.1rem; }
  .filters option::checkmark { display: none; }
  .filters option:hover, .filters option:focus-visible { background: var(--paper-2); color: var(--ink); }
  .filters option:focus-visible { outline-offset: -2px; }
  .filters option:checked { background: var(--paper-2); color: var(--ink); font-weight: 700; }
  @media (prefers-reduced-motion: no-preference) {
    .filters select::picker(select) { transition: opacity 0.18s, translate 0.3s var(--ease); }
    @starting-style { .filters select::picker(select):popover-open { opacity: 0; translate: 0 -0.35rem; } }
  }
  /* Su telefono ogni filtro è largo quanto la sua voce (qui il testo non si tronca da solo come nella
     lista di sistema): due per riga finché ci stanno, una voce lunga prende la riga intera. */
  @media (max-width: 40rem) {
    .filters { display: flex; }
    .filters select { flex: 1 1 auto; width: auto; }
    .filters__state, .filters noscript { flex-basis: 100%; }
  }
}
.seg { display: inline-flex; padding: 0.22rem; border-radius: 99px; background: var(--paper-2); }
.seg a { padding: 0.38rem 0.9rem; border-radius: 99px; color: var(--ink-2); font-weight: 600; font-size: 0.88rem; text-decoration: none; white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a[aria-current] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px oklch(23% 0.045 268 / 0.18); }

/* Classifica */
.chart { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.row {
  display: grid; align-items: center; gap: 0.7rem 1.5rem;
  grid-template-columns: 3.25rem 468px minmax(0, 1fr) auto;
  grid-template-areas: "rank banner meta vote";
  padding: 1rem; padding-inline-end: 1.35rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.2s;
}
.row:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in oklch, var(--ink) 30%, var(--rule)); }
.chart--plain .row { grid-template-columns: 468px minmax(0, 1fr) auto; grid-template-areas: "banner meta vote"; padding-inline-start: 1.1rem; }
.row__rank {
  grid-area: rank; display: grid; place-items: center; width: 3.25rem; aspect-ratio: 1; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-2);
  font: 800 1.45rem/1 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums;
}
.row--top .row__rank { background: var(--sun); color: var(--night); }
.row--top:nth-child(2) .row__rank { background: var(--orange); }
.row--top:nth-child(3) .row__rank { background: var(--red); color: oklch(98.5% 0.012 85); }
.row__banner { grid-area: banner; display: block; border-radius: var(--radius-s); overflow: hidden; }
.row__banner img, .sheet__banner, .mine img, .queue img, .form__banner {
  display: block; width: 468px; aspect-ratio: 468 / 60; background: var(--paper-2); border-radius: var(--radius-s);
}
.row__banner img { transition: scale 0.6s var(--ease); }
.row:hover .row__banner img { scale: 1.03; }
.row__meta { grid-area: meta; min-width: 0; }
.row__meta h2 { font-size: 1.22rem; font-weight: 700; }
.row__meta h2 a { text-decoration: none; }
.row__meta h2 a:hover { text-decoration: underline; }
.row__tagline { color: var(--ink-2); margin-top: 0.2rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; margin-top: 0.5rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.row__facts a { text-decoration: none; color: var(--ink); }
.row__facts a:hover { color: var(--accent); }
.row__game { padding: 0.15rem 0.6rem; border-radius: 99px; background: var(--paper-2); }
.row__vote { grid-area: vote; display: grid; justify-items: end; gap: 0.5rem; text-align: end; }
.row__count { font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; }
.row__count strong { display: inline-block; font: 800 1.6rem/1 var(--display); letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-end: 0.15em; }
.is-bumped { animation: bump 0.6s var(--ease); }
@keyframes bump { 35% { transform: scale(1.35); color: var(--accent); } }

/* Paesi */
.flag { display: inline-block; width: 1.3125rem; height: 0.875rem; vertical-align: -0.08em; outline: 1px solid var(--rule); outline-offset: -1px; border-radius: 2px; }
h2 .flag { vertical-align: 0.02em; margin-inline-end: 0.15em; }
.accepts { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.accepts__more { font-variant-numeric: tabular-nums; }
.countries { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }

/* Posizioni a pagamento: un pannello scuro a parte, dichiarato, sopra la classifica */
.ads { position: relative; margin-bottom: 1.75rem; padding: 1.1rem 1.1rem 1.1rem; border-radius: calc(var(--radius) + 0.6rem); background: var(--night); color: var(--on-night); overflow: clip; }
.ads::before { content: ""; position: absolute; top: 0; inset-inline-end: 2.25rem; width: 6rem; height: 0.5rem; border-radius: 0 0 0.5rem 0.5rem; background: var(--stripes); }
.ads__head { font-size: 0.88rem; color: var(--on-night-2); padding: 0.15rem 0.4rem 0.85rem; }
.ads__head strong { font: 700 0.76rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sun); margin-inline-end: 0.7rem; }
.ads__head a { color: var(--on-night); }
.ads__head a:hover { color: var(--sun); }
.chart--ads { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); color: var(--ink); }
.chart--ads .row { border-color: transparent; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "banner banner" "meta meta" "rank vote"; align-items: end; padding: 1rem; }
.chart--ads .row__banner img { width: 100%; }
.chart--ads .row__vote { grid-auto-flow: column; align-items: center; gap: 0.9rem; }
.chart--ads:has(> :only-child) .row { grid-template-columns: 3.25rem 468px minmax(0, 1fr) auto; grid-template-areas: "rank banner meta vote"; align-items: center; padding: 1rem; padding-inline-end: 1.35rem; }
.chart--ads:has(> :only-child) .row__banner img { width: 468px; }
.chart--ads:has(> :only-child) .row__vote { grid-auto-flow: row; gap: 0.5rem; }
.row__ad { grid-area: rank; }
/* Banner pubblicitario in testa all'elenco: 728×90, si restringe con la pagina. */
.spot { position: relative; width: fit-content; max-width: 100%; margin: 0 auto 1.75rem; line-height: 0; }
.spot a { display: block; border-radius: var(--radius-s); overflow: hidden; }
.spot img, .spot-preview { display: block; width: 728px; max-width: 100%; height: auto; aspect-ratio: 728 / 90; background: var(--paper-2); border-radius: var(--radius-s); }
.spot__tag { position: absolute; top: 0.3rem; inset-inline-end: 0.3rem; line-height: 1; pointer-events: none; }
/* Sotto il banner: il link per chi vuole comprare lo spazio. */
.spot .spot__sell { display: block; width: fit-content; margin: 0.45rem 0 0; margin-inline-start: auto; padding: 0.22rem 0.8rem; border: 1px solid var(--accent); border-radius: 99px; overflow: visible; color: var(--accent); font: 600 0.8rem/1.5 var(--body); text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.spot .spot__sell:hover { background: var(--accent); color: var(--on-accent); }
/* Spazio vuoto: al posto del banner, l'invito a comprarlo. */
.spot--free a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; box-sizing: border-box; width: 728px; max-width: 100%; min-height: 3.6rem; aspect-ratio: 728 / 90; padding: 0.4rem 1rem; border: 2px dashed color-mix(in oklch, var(--ink) 30%, transparent); background: var(--paper-2); color: var(--ink-2); line-height: 1.3; text-align: center; text-decoration: none; transition: border-color 0.2s, color 0.2s; }
.spot--free a:hover { border-color: var(--accent); color: var(--ink); }
.spot--free strong { color: var(--ink); font: 700 1.05rem/1.2 var(--display, var(--body)); }
.spot--free span { font-size: 0.82rem; }
.spot__tag abbr { display: inline-block; padding: 0.1rem 0.4rem; border-radius: 99px; background: var(--sun); color: var(--night); font: 700 0.62rem/1.5 var(--body); letter-spacing: 0.1em; text-decoration: none; }
.row__ad abbr, .sheet__ad abbr { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 99px; background: var(--sun); color: var(--night); font: 700 0.7rem/1.5 var(--body); letter-spacing: 0.1em; text-decoration: none; cursor: help; }
.row__facts .row__boost { color: var(--accent); text-decoration: underline; text-decoration-color: currentColor; }

@media (max-width: 66rem) {
  .row, .chart--plain .row, .chart--ads:has(> :only-child) .row {
    grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "banner banner banner" "rank meta vote";
    align-items: start; padding: 0.9rem;
  }
  .chart--plain .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "banner banner" "meta vote"; }
  .row__banner img, .chart--ads:has(> :only-child) .row__banner img { width: 100%; }
  .row__rank { width: 2.6rem; font-size: 1.15rem; }
}
@media (max-width: 34rem) {
  .row, .chart--ads:has(> :only-child) .row { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "banner banner" "rank meta" "vote vote"; }
  .chart--plain .row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "banner" "meta" "vote"; }
  .row__vote { grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; padding-top: 0.6rem; border-top: 1px solid var(--rule); }
}

@media (prefers-reduced-motion: no-preference) {
  .chart > .row { animation: rise 0.7s var(--ease) both; }
  .chart > .row:nth-child(2) { animation-delay: 50ms; }
  .chart > .row:nth-child(3) { animation-delay: 100ms; }
  .chart > .row:nth-child(4) { animation-delay: 150ms; }
  .chart > .row:nth-child(5) { animation-delay: 200ms; }
  .chart > .row:nth-child(n + 6) { animation-delay: 250ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
}

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.75rem 0.5rem; }
.pager__pos { color: var(--ink-2); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pager a { padding: 0.55rem 1.1rem; border: 1px solid var(--ink); border-radius: 99px; font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.pager a:hover { background: var(--ink); color: var(--paper); }

.empty { padding-block: clamp(3rem, 10vw, 6rem); max-width: 34rem; }
.empty::before { content: ""; display: block; width: 4.5rem; height: 0.6rem; margin-bottom: 1.4rem; border-radius: 99px; background: var(--stripes); }
.empty h1, .empty h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 800; letter-spacing: -0.035em; }
.empty p { margin-top: 0.8rem; color: var(--ink-2); }

/* Invito in fondo alla classifica */
.cta { position: relative; isolation: isolate; overflow: clip; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.5rem 3rem; margin-top: clamp(3rem, 7vw, 5rem); padding: clamp(1.75rem, 4vw, 3rem); border-radius: calc(var(--radius) + 0.75rem); background: var(--sun); color: var(--night); }
.cta h2 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.9rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.98; }
.cta p { margin-top: 0.7rem; max-width: 34rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta .btn { border-color: var(--night); color: var(--night); }
.cta .btn:hover { background: var(--night); color: var(--on-night); }
.cta .btn--primary { background: var(--night); color: var(--on-night); box-shadow: none; }
.cta .btn--primary:hover { background: var(--red); border-color: var(--red); color: oklch(98.5% 0.012 85); }
.cta__rings { position: absolute; z-index: -1; inset-inline-end: -7rem; top: 50%; width: 26rem; aspect-ratio: 1; translate: 0 -50%; border-radius: 50%; background: repeating-radial-gradient(circle, var(--orange) 0 1.6rem, var(--sun) 1.6rem 3.2rem); opacity: 0.55; will-change: transform; }
@media (max-width: 48rem) {
  .cta { grid-template-columns: minmax(0, 1fr); }
  .cta__rings { inset-inline-end: -12rem; top: 0; translate: none; }
}

/* Scheda del server */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.6rem; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.9rem; }
.crumb a { color: var(--ink); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.hero .crumb { color: var(--on-night-2); }
.hero .crumb a, .hero .crumb span { padding: 0.25rem 0.75rem; border-radius: 99px; background: oklch(100% 0 0 / 0.12); color: var(--on-night); }
.hero .crumb a:hover { background: var(--sun); color: var(--night); }
.hero .crumb .crumb__rank { background: var(--sun); color: var(--night); }
.sheet__head { margin-block: clamp(1.75rem, 5vw, 3rem) 2.25rem; }
.hero .sheet__head { margin: 0; max-width: 46rem; }
.sheet__tagline { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; margin-top: 0.8rem; }
.hero .sheet__tagline { color: var(--on-night-2); }
.sheet__banner { margin-top: 1.5rem; }
.hero .sheet__banner { box-shadow: 0 18px 36px -18px oklch(10% 0.05 272 / 0.8); }
.sheet__ad { margin-top: 0.9rem; font-size: 0.9rem; color: var(--ink-2); max-width: 60ch; }
.hero .sheet__ad { color: var(--on-night-2); }
.hero .sheet__ad a, .hero .sheet__rating a { color: var(--on-night); text-decoration-color: var(--sun); }
.hero .sheet__ad a:hover, .hero .sheet__rating a:hover { color: var(--sun); }
.sheet__ad abbr { margin-inline-end: 0.4rem; }
.sheet__body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2rem 3.5rem; align-items: start; padding-top: 0.5rem; }
.sheet__main section + section { margin-top: 2.75rem; }
.sheet__main h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 1rem; }
.prose { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; max-width: 66ch; }
.sheet__side { position: sticky; top: calc(var(--top-h) + 0.75rem); z-index: 3; margin-top: clamp(-9rem, -11vw, -6rem); }
.sheet__preview { margin-top: 1.25rem; }
/* Con un messaggio sopra la scheda il riquadro del voto non sale sulla scena: lo coprirebbe. */
.flashes + .sheet .sheet__side, .sheet__preview + .sheet__body .sheet__side { margin-top: 0; }
.sheet__report { margin-top: 1.25rem; font-size: 0.85rem; color: var(--ink-2); text-align: center; }

.shots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; }
.shots li:first-child { grid-column: span 2; grid-row: span 2; }
.shots a { display: block; height: 100%; background: var(--paper-2); border-radius: var(--radius-s); overflow: hidden; }
.shots img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: scale 0.6s var(--ease); }
.shots a:hover img { scale: 1.05; }
.shots--edit { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1rem 0.75rem; margin-bottom: 1.5rem; }
.shots--edit li:first-child { grid-column: auto; grid-row: auto; }
.shots--edit img { height: auto; margin-bottom: 0.3rem; border-radius: var(--radius-s); }
.shots--edit .linklike { font-size: 0.85rem; }

.votebox { position: relative; overflow: clip; padding: 1.5rem 1.5rem 1.6rem; border-radius: calc(var(--radius) + 0.25rem); background: var(--night); color: var(--on-night); box-shadow: var(--shadow); }
.votebox::before { content: ""; position: absolute; top: 0; inset-inline-start: 1.5rem; width: 4.5rem; height: 0.45rem; border-radius: 0 0 0.45rem 0.45rem; background: var(--stripes); }
.votebox__n { font: 800 4.8rem/0.9 var(--display); letter-spacing: -0.06em; font-variant-numeric: tabular-nums; color: var(--sun); margin-top: 0.4rem; width: fit-content; transform-origin: left center; }
.votebox__label { color: var(--on-night-2); font-size: 0.9rem; margin-top: 0.4rem; }
.votebox form, .votebox__done { margin-top: 1.2rem; }
.votebox__done { font-weight: 600; }
.votebox__note { margin-top: 0.8rem; font-size: 0.85rem; color: var(--on-night-2); }
.votebox a:not(.btn), .votebox .linklike { color: var(--on-night); text-decoration-color: var(--sun); }
.votebox a:not(.btn):hover, .votebox .linklike:hover { color: var(--sun); }
.votebox .btn:not(.btn--primary, .btn--sun) { border-color: var(--on-night); color: var(--on-night); }
.votebox .btn:not(.btn--primary, .btn--sun):hover { background: var(--on-night); color: var(--night); }
.votebox .field__hint { color: var(--on-night-2); }

.facts { margin: 1.5rem 0 0; }
.facts dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); margin-top: 1rem; }
.facts dd { margin: 0.15rem 0 0; overflow-wrap: anywhere; }
.sheet__side .facts { margin-top: 0.9rem; padding: 0.35rem 1.4rem 1.4rem; background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.25rem); }
.facts--pairs { margin: 0 0 1.25rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.35rem 1.5rem; align-items: baseline; }
.facts--pairs dt, .facts--pairs dd { margin: 0; }
.facts__addr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; }
code { font: 0.92em ui-monospace, "Cascadia Mono", Consolas, monospace; }
.facts__addr .linklike { font-size: 0.85rem; }

@media (max-width: 58rem) {
  .sheet__body { grid-template-columns: minmax(0, 1fr); }
  .sheet__side { position: relative; top: auto; order: -1; margin-top: -4.5rem; }
}
@media (max-width: 34rem) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Screenshot ingrandito */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: oklch(15% 0.05 272 / 0.95); color: var(--on-night); }
.lightbox[open] { display: grid; place-items: center; animation: fade 0.3s; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: 94vw; max-height: 84dvh; width: auto; height: auto; border-radius: var(--radius-s); }
.lightbox button { background: none; border: 0; color: inherit; font: 600 0.95rem var(--body); cursor: pointer; padding: 0.8rem 1rem; }
.lightbox button:hover { color: var(--sun); }
.lightbox__close { position: fixed; top: 0.5rem; inset-inline-end: 0.75rem; }
.lightbox__nav { position: fixed; top: 50%; translate: 0 -50%; font-size: 2.6rem !important; line-height: 1; }
.lightbox__nav--prev { left: 0.25rem; }
.lightbox__nav--next { right: 0.25rem; }
.lightbox__pos { position: fixed; bottom: 1rem; left: 0; right: 0; text-align: center; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
@keyframes fade { from { opacity: 0; } }

/* Moduli */
.narrow { max-width: 31rem; margin: clamp(1.75rem, 5vw, 3rem) auto; }
.narrow { padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.5rem); box-shadow: var(--shadow); }
.narrow::before { content: ""; display: block; width: 4rem; height: 0.5rem; margin-bottom: 1.4rem; border-radius: 99px; background: var(--stripes); }
.narrow h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.7rem); margin-bottom: 1rem; }
.aside { color: var(--ink-2); margin-block: 0.75rem; }
.form { display: grid; gap: 1.3rem; margin-top: 1.5rem; justify-items: start; }
.form > * { width: 100%; }
.form > .btn { width: auto; }
.field { display: grid; gap: 0.35rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; }
.field > legend { padding: 0; margin-bottom: 0.35rem; }
.field__hint { font-size: 0.85rem; color: var(--ink-2); }
.field__msg { font-size: 0.85rem; font-weight: 600; color: var(--danger); }
.field--error input, .field--error textarea, .field--error select { border-color: var(--danger); }
.choice, .field > label.choice { display: flex; align-items: baseline; gap: 0.55rem; font-weight: 400; }
.form__group { border: 0; padding: 0; margin: 0; display: grid; gap: 1rem; min-width: 0; }
.form__group legend { font: 700 1.15rem var(--display); padding: 0; letter-spacing: -0.02em; }
.form__group legend + .field { margin-top: 0.4rem; }
.form--inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.form--inline .field__hint, .form--inline .field__msg { grid-row: 3; }
.form--admin { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px dashed var(--rule); }
.choice input { flex: none; }

/* Scelta dei paesi accolti: l'elenco compare solo con «Solo alcuni paesi» */
.picker { display: grid; gap: 0.5rem; margin-top: 0.35rem; }
[data-audience]:not(:has(input[value="some"]:checked)) .picker { display: none; }
.picker__list { list-style: none; margin: 0; padding: 0.7rem 0.9rem; max-height: 16rem; overflow-y: auto; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--card); display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.3rem 1rem; }
.field--error .picker__list { border-color: var(--danger); }
.picker__list .choice { align-items: center; }
.picker__list [hidden] { display: none; }
.picker__empty { color: var(--ink-2); font-size: 0.9rem; }
.plain { padding: 0; list-style: none; display: grid; gap: 0.4rem; }
.plain code { color: var(--ink-2); margin-inline-start: 0.6rem; }

/* I miei server e code del pannello di gestione */
.mine, .queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.mine__item, .queue__item { display: grid; grid-template-columns: 468px minmax(0, 1fr) auto; gap: 0.8rem 1.5rem; align-items: center; padding: 1rem; padding-inline-end: 1.35rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.queue__item--text { grid-template-columns: minmax(0, 1fr) auto; align-items: start; padding-inline-start: 1.35rem; }
.mine__meta h2, .queue h3 { font-size: 1.15rem; font-weight: 700; }
.mine__links { display: flex; gap: 1.25rem; }
.mine__reason { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.25rem; }
.state { font-weight: 600; font-size: 0.9rem; margin-top: 0.15rem; color: var(--ink-2); }
.state--approved { color: var(--ok); }
.state--rejected, .state--hidden { color: var(--danger); }
.queue__actions { display: grid; gap: 0.5rem; justify-items: end; }
.queue__reject { display: flex; gap: 0.4rem; }
.queue__reject input { width: 14rem; }
.page > section { margin-top: 2.75rem; }
.page > section > h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 0.9rem; }
@media (max-width: 66rem) {
  .mine__item, .queue__item { grid-template-columns: minmax(0, 1fr); padding: 0.9rem; }
  .mine img, .queue img { width: 100%; }
  .queue__actions { justify-items: start; }
}

/* Piè di pagina */
.foot { position: relative; isolation: isolate; overflow: clip; margin-top: clamp(4rem, 9vw, 7rem); padding-top: 3.5rem; border-radius: 2.25rem 2.25rem 0 0; background: var(--night); color: var(--on-night-2); font-size: 0.93rem; }
.foot::before { content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0; width: min(15rem, 50%); height: 0.55rem; border-radius: 0 0 0.55rem 0.55rem; background: var(--stripes); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.9fr) minmax(0, 1.3fr); gap: 2.25rem 3rem; }
.foot .brand { color: var(--on-night); font-size: 1.7rem; }
.foot__about p { margin-top: 1rem; max-width: 36ch; }
.foot h2 { font: 700 0.76rem var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sun); margin-bottom: 1rem; }
.foot__nav { display: grid; gap: 0.55rem; justify-items: start; align-content: start; }
.foot a:not(.btn) { color: var(--on-night); text-decoration-color: color-mix(in oklch, var(--sun) 60%, transparent); }
.foot a:not(.btn):hover { color: var(--sun); }
.foot__nav a { text-decoration: none; }
.foot__discord p { margin-bottom: 1rem; max-width: 32ch; }
.foot .foot__owner { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.8rem; padding-top: 1.5rem; border-top: 1px solid oklch(100% 0 0 / 0.14); color: var(--on-night); line-height: 1.45; }
.foot__owner img, .doc__operator img { flex: none; border-radius: 22%; }
.foot__langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; font-size: 0.88rem; }
.foot .foot__langs a { color: var(--on-night-2); text-decoration: none; }
.foot .foot__langs a[aria-current] { color: var(--on-night); font-weight: 700; }
.foot__word { margin: 1rem 0 -0.19em; font: 800 clamp(5rem, 23vw, 20rem)/0.8 var(--display); letter-spacing: -0.065em; text-align: center; white-space: nowrap; color: oklch(100% 0 0 / 0.055); user-select: none; will-change: transform; }
.doc__operator { display: flex; align-items: center; gap: 1rem; margin-block: 1.1rem; padding: 1rem 1.2rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
@media (max-width: 62rem) {
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
  .foot__about, .foot__discord { grid-column: 1 / -1; }
}

/* Pagine di testo: linee guida, termini, Premium */
.doc { max-width: 46rem; margin-block: clamp(1.75rem, 5vw, 3rem); line-height: 1.65; }
.doc::before { content: ""; display: block; width: 4.5rem; height: 0.6rem; margin-bottom: 1.5rem; border-radius: 99px; background: var(--stripes); }
.doc h1 { font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.8rem); }
.doc__meta { margin-top: 0.8rem; font-size: 0.85rem; color: var(--ink-2); }
.doc__lead { margin-top: 1rem; font-size: 1.2rem; color: var(--ink-2); max-width: 52ch; line-height: 1.5; }
.doc h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.035em; border-top: 1px solid var(--rule); padding-top: 1.75rem; margin-block: 2.5rem 0.9rem; }
.doc h3 { font-size: 1.05rem; font-weight: 700; margin-block: 1.4rem 0.4rem; }
.doc p + p { margin-top: 0.7rem; }
.doc ul, .doc ol { margin: 0.6rem 0; padding-inline-start: 1.3rem; display: grid; gap: 0.45rem; }
.doc li::marker { color: var(--accent); font-weight: 700; }
.doc__see { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--ink-2); }
.doc pre { margin-block: 0.9rem; padding: 1rem 1.2rem; overflow-x: auto; border-radius: var(--radius-s); background: var(--night); color: var(--on-night); font-size: 0.86rem; line-height: 1.6; tab-size: 4; }
.doc pre code { font-size: 1em; }
.doc__copy { font-size: 0.9rem; }
.doc__for { margin-top: 1.5rem; }
.doc__for form { margin-top: 0.8rem; }
.doc__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.6rem; margin-top: 1.5rem; font-weight: 700; }
.doc__pick a { padding: 0.45rem 0.95rem; border: 1px solid var(--rule); border-radius: 99px; background: var(--card); font-weight: 600; text-decoration: none; }
.doc__pick a:hover { border-color: var(--accent); color: var(--accent); }
.doc__long { max-height: 19rem; overflow-y: auto; }
.doc__more { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.doc__more summary { width: fit-content; cursor: pointer; font-weight: 700; }
.doc__more[open] summary { margin-bottom: 1rem; }
/* Passaggi numerati della guida */
.doc .steps { list-style: none; padding: 0; gap: 1.6rem; counter-reset: step; }
.steps > li { position: relative; min-width: 0; padding-inline-start: 3.1rem; counter-increment: step; }
.steps > li::before { content: counter(step); position: absolute; inset-inline-start: 0; top: -0.2rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.doc .steps h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
@media (max-width: 36rem) {
  .steps > li { padding-inline-start: 0; padding-top: 2.8rem; }
  .steps > li::before { top: 0; }
}
/* Pagina di voto per chi arriva dal sito del server */
.votepage .form__banner { width: 100%; margin-bottom: 1.4rem; }
.votepage .form { margin-top: 1.2rem; justify-items: stretch; }
.votepage p + p { margin-top: 1.3rem; }
/* Larghi uguali finché le due etichette stanno su una riga; se una è lunga (altra lingua, nome del sito) vanno una sotto l'altra. */
.votepage__more { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.votepage__more .btn { flex: 1 1 0; min-width: fit-content; padding-block: 0.7rem; white-space: normal; text-align: center; }
.votepage__gate { margin-top: 1.2rem; }
.votepage__review { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.votepage__review summary { width: fit-content; cursor: pointer; font-weight: 700; }
.votepage__review[open] summary { margin-bottom: 1rem; }
mark { background: color-mix(in oklch, var(--sun), var(--paper) 40%); color: var(--night); padding: 0.05em 0.3em; border-radius: 4px; }

/* Pannello di gestione */
.panel { display: flex; gap: 0.2rem; width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin-top: 1.5rem; padding: 0.3rem; border-radius: 99px; background: var(--paper-2); }
.panel a { padding: 0.5rem 1rem; border-radius: 99px; font: 700 0.98rem/1.3 var(--display); letter-spacing: -0.015em; text-decoration: none; white-space: nowrap; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.panel a:hover { color: var(--ink); }
.panel a[aria-current] { background: var(--ink); color: var(--paper); }
.panel + .lead { margin-top: clamp(1.5rem, 4vw, 2.25rem); }

.tabs { display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; margin-bottom: 1rem; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.tabs a { padding-block: 0.3rem; color: var(--ink-2); text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }
.tabs__n { font-variant-numeric: tabular-nums; letter-spacing: 0; opacity: 0.75; }
.lead .tabs { margin-bottom: 0; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.25rem; }
.actions .queue__reject { flex: 0 1 auto; }
section > .actions { margin-block: 0.9rem; }
.clip { margin-top: 0.3rem; max-width: 70ch; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.state--report-open { color: var(--danger); }
.state--report-working { color: var(--ink); }
.state--report-closed { color: var(--ink-2); }
.row__facts .state { margin: 0; font-size: inherit; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.7rem; margin: 0; }
.figure { padding: 1.1rem 1.25rem 1.2rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.figure dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); }
.figure dd { margin: 0.4rem 0 0; font: 800 2.6rem/1 var(--display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.figure dd.figure__note { font: 400 0.85rem/1.4 var(--body); letter-spacing: 0; color: var(--ink-2); }
.delta { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table--narrow { max-width: 36rem; }
.table--wide th, .table--wide td { white-space: nowrap; }
.table .actions { flex-wrap: nowrap; white-space: nowrap; }
.table th, .table td { padding: 0.7rem 0; padding-inline-end: 1.25rem; text-align: start; vertical-align: baseline; border-bottom: 1px solid var(--rule); font-weight: 400; }
.table thead th { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid var(--ink); }
.table tbody th { font-weight: 600; }
.table th:last-child, .table td:last-child { padding-inline-end: 0; }
.table .num { text-align: end; }
.table .num--warn { color: var(--danger); font-weight: 600; }
/* Conti d'esempio in una pagina di testo: tre colonne che devono stare anche su un telefono. */
.doc .sums { margin-block: 0.9rem 1rem; }
.doc .sums thead th { white-space: normal; vertical-align: bottom; }
.doc .sums td:nth-child(2) { white-space: nowrap; }
.table__sub { display: block; font-size: 0.85rem; font-weight: 400; color: var(--ink-2); }

.graph { margin: 0 0 1.75rem; }
.graph figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; margin-bottom: 0.6rem; }
.graph figcaption strong { font: 700 1.05rem var(--display); letter-spacing: -0.02em; }
.graph figcaption span { font-size: 0.85rem; color: var(--ink-2); }
.graph__bars { display: block; width: 100%; height: 9rem; border-bottom: 1px solid var(--ink); }
.graph__bars rect { fill: var(--accent); }
.graph__bars rect:hover { fill: var(--ink); }
.graph__axis { display: flex; justify-content: space-between; margin-top: 0.3rem; font-size: 0.76rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.graph__empty { padding-block: 1.5rem; border-block: 1px solid var(--rule); color: var(--ink-2); }
.graphs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.graphs .graph__bars { height: 6rem; }
.data summary { cursor: pointer; font-weight: 600; width: fit-content; }
.data[open] summary { margin-bottom: 0.8rem; }

.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; margin-top: 2.75rem; }
.cols > section + section { margin-top: 0; }
.cols h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 0.9rem; }
.cols__next { margin-top: 2.5rem; }
.facts--numbers { border-top: 2px solid var(--ink); gap: 0; grid-template-columns: minmax(0, 1fr) auto; }
.facts--numbers dt, .facts--numbers dd { padding-block: 0.6rem; border-bottom: 1px solid var(--rule); }
.facts--numbers dt { font-size: 1rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.facts--numbers dd { text-align: end; font-weight: 600; font-variant-numeric: tabular-nums; }

.log { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.9rem; }
.log__item { padding-inline-start: 0.9rem; border-inline-start: 2px solid var(--rule); }
.log__item--note { border-inline-start-color: var(--accent); }
.log__item--event > p:first-child { color: var(--ink-2); }
.log__meta { font-size: 0.8rem; color: var(--ink-2); margin-top: 0.15rem; }
.votebox__state { font: 800 1.9rem/1 var(--display); letter-spacing: -0.04em; margin-top: 0.5rem; color: var(--sun); }
.votebox .form { gap: 1rem; }
.votebox textarea { min-height: 3.5rem; }

.form--row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 7rem auto; align-items: end; max-width: 48rem; }
.form--grant { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 6rem 8rem auto; max-width: 54rem; }
.form--pay { grid-template-columns: minmax(0, 1.2fr) 7rem 10rem minmax(0, 2fr) auto; max-width: 56rem; margin-top: 1.1rem; }
.form--inline.form--two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.handle { font-weight: 600; user-select: all; }
.form--short { max-width: 30rem; }
.plans.plans--manage { margin-top: 1rem; row-gap: 2.25rem; }
.plans--manage h3 { font-size: 1.15rem; font-weight: 700; }
.plans--manage .form { margin-top: 1rem; gap: 0.6rem; max-width: 22rem; }
.plans--manage > div > .actions { margin-top: 1rem; }

@media (max-width: 48rem) {
  .graphs, .cols { grid-template-columns: minmax(0, 1fr); }
  .cols > section + section { margin-top: 2.5rem; }
  .form--row, .form--grant, .form--pay { grid-template-columns: minmax(0, 1fr); }
}

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 3rem; }
.doc .plans { gap: 1rem; margin-top: 2rem; }
.doc .plans > section { padding: 1.5rem 1.5rem 1.6rem; background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.25rem); }
.doc .plans > section:first-child { background: var(--night); border-color: var(--night); color: var(--on-night); }
.doc .plans > section:first-child .plans__price { color: var(--sun); }
.doc .plans > section:first-child a, .doc .plans > section:first-child a:hover { color: var(--on-night); text-decoration-color: var(--sun); }
.doc .plans h2 { border: 0; padding: 0; margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.plans__price { font: 800 2.3rem/1 var(--display); letter-spacing: -0.05em; margin-bottom: 0.9rem; }
@media (max-width: 40rem) {
  .plans { grid-template-columns: minmax(0, 1fr); }
}

/* Recensioni: stelle, media, elenco nella scheda */
.stars { font-size: 1.05em; letter-spacing: 0.06em; white-space: nowrap; line-height: 1; }
.stars__on { color: var(--accent); }
.stars__off { color: var(--rule); }
.hero .stars__on { color: var(--sun); }
.hero .stars__off { color: oklch(100% 0 0 / 0.3); }
.rating-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; }
.rating-line .stars { font-size: 1.5rem; }
.rating-line strong { font: 800 1.5rem/1 var(--display); letter-spacing: -0.04em; }
.rating-line > span:last-child { font-size: 0.9rem; color: var(--ink-2); }
.reviews { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.review { padding: 1.1rem 1.3rem 1.2rem; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); border-end-start-radius: 0.35rem; }
.review__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.8rem; }
.review__head > span:last-child { font-size: 0.85rem; color: var(--ink-2); }
.review__body { margin-top: 0.5rem; max-width: 70ch; white-space: pre-line; overflow-wrap: anywhere; }
.reviews + .aside, .reviews__more { margin-top: 1.1rem; }
.reviews__more + .aside { margin-top: 0.7rem; max-width: 60ch; }
.row__facts .row__rating { letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.row__rating .stars { font-size: 1.25em; letter-spacing: 0.04em; vertical-align: -0.06em; }
.row__rating .row__reviews { letter-spacing: 0.06em; }
.sheet__rating { margin-top: 1rem; }
.sheet__rating a { font-size: 0.95rem; }
.sheet__rating .stars, #recensioni .rating-line .stars { font-size: 1.5rem; }
.row__reviews { color: var(--ink-2); }
.queue h3 .stars { margin-inline-end: 0.5rem; font-size: 0.95em; }
.state--review-pending { color: var(--danger); }
.state--review-approved { color: var(--ok); }
.state--review-rejected { color: var(--ink-2); }

/* Scelta delle stelle: sono cinque pulsanti di scelta, piene fino a quella selezionata */
.rating { display: inline-flex; width: fit-content; }
.rating__star { padding: 0.1rem 0.2rem; font-size: 2.25rem; line-height: 1; color: var(--rule); cursor: pointer; border-radius: 4px; transition: scale 0.3s var(--ease); }
.rating__star:hover { scale: 1.15; }
.rating__star:has(input:checked), .rating__star:has(~ .rating__star input:checked) { color: var(--accent); }
.rating:hover .rating__star { color: var(--rule); }
.rating .rating__star:hover, .rating .rating__star:has(~ .rating__star:hover) { color: var(--accent); }
.rating__star:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.field--error .rating__star:not(:has(input:checked)):not(:has(~ .rating__star input:checked)) { color: color-mix(in oklch, var(--danger), var(--paper) 55%); }

/* Posto tra gli sponsorizzati, nel pannello */
#scavalco, #pagamenti { font-size: 1.15rem; font-weight: 700; }
#scavalco ~ .scroll { margin-top: 0.8rem; }
#scavalco ~ .aside { margin-top: 0.7rem; }

/* Scelta del tema, nel pannello (Aspetto) */
.themes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; }
.themes__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; gap: 1rem 1.5rem; align-items: start; padding: 0.9rem 0.9rem 1.1rem; background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.25rem); }
.themes__item--on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.themes__item img { grid-column: 1 / -1; display: block; width: 100%; aspect-ratio: 720 / 450; object-fit: cover; object-position: top; border-radius: var(--radius-s); background: var(--paper-2); border: 1px solid var(--rule); }
.themes__text { padding-inline-start: 0.4rem; }
.themes__text h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.themes__text p { margin-top: 0.3rem; font-size: 0.93rem; color: var(--ink-2); }
.themes__state { display: flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.4rem; font-weight: 700; font-size: 0.95rem; }
.themes__state::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: currentColor; }

/* Riquadri: nel modulo del server e nel pannello ogni blocco sta in un contenitore */
.box { min-width: 0; padding: clamp(1.1rem, 3vw, 1.75rem); background: var(--card); border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.25rem); }
.box > h2, .box__head h2 { font-weight: 800; }
.box > h2, .box__head h2, .page > section.box > h2, .cols .box > h2 { font-size: 1.3rem; letter-spacing: -0.03em; margin-bottom: 0.9rem; }
.box__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.2rem 1rem; }
.box__head h2 { margin-bottom: 0; }
.box > :last-child, .box > form:last-child > :last-child { margin-bottom: 0; }
.box > h2 + .aside, .box > h2 + p { margin-top: 0; }
.box__part { margin-top: 1.75rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.box--danger { border-color: color-mix(in oklch, var(--danger) 45%, var(--rule)); }
.box--fields { display: grid; gap: 1.3rem; }
.box--fields > h2 { margin-bottom: 0; }
.box > .sheet__banner { margin-top: 0; margin-bottom: 1.1rem; }
.box > summary { font-weight: 700; }
.page > section.box { margin-top: 1rem; }
.page > section:not(.box) + section.box, .page > .figures + section.box { margin-top: 1.75rem; }
/* Dentro un riquadro le voci di una coda sono righe, non altri riquadri */
.box .queue { gap: 0; }
.box .queue__item { padding: 1rem 0; background: none; border: 0; border-top: 1px solid var(--rule); border-radius: 0; box-shadow: none; }
.box .queue__item:first-child { padding-top: 0.2rem; border-top: 0; }
.box .queue__item:last-child { padding-bottom: 0; }
.cols--side { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; margin-top: 1rem; }
.cols--side > section + section { margin-top: 0; }
.cols--side + section.box { margin-top: 1rem; }
.cols__stack { display: grid; gap: 1rem; min-width: 0; }
.sheet__main section.box + section.box { margin-top: 1rem; }
/* Due riquadri affiancati: la distanza è quella tra riquadri, non quella tra colonne di testo */
.cols:has(> .box) { gap: 1rem; margin-top: 1rem; }
.cols:has(> .box) > section + section { margin-top: 0; }
/* L'ultima riga di una tabella non raddoppia il bordo del riquadro */
.box > .table:last-child tbody tr:last-child > *, .box > .scroll:last-child .table tbody tr:last-child > * { border-bottom: 0; padding-bottom: 0.2rem; }
/* Modulo lungo dentro un riquadro largo: due colonne, pulsante su una riga sua */
.form--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 1.5rem; align-items: start; }
.form--grid > .btn { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 56rem) {
  .cols--side { grid-template-columns: minmax(0, 1fr); }
}

/* Modulo del server: riquadri a sinistra, indice e avvisi a destra */
.edit { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; grid-template-areas: "head head" "main side"; gap: 1.25rem 1.5rem; align-items: start; margin-top: clamp(1.75rem, 5vw, 3rem); }
.edit__head { grid-area: head; min-width: 0; }
.edit__head h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.7rem); overflow-wrap: anywhere; }
.edit__main { grid-area: main; display: grid; gap: 1rem; min-width: 0; }
.edit__main > .flash, .edit__main > .errors { margin-top: 0; }
.edit__side { grid-area: side; position: sticky; top: calc(var(--top-h) + 0.75rem); min-width: 0; }
.edit__side .box { padding: 1rem; }
.edit__nav { display: grid; gap: 0.1rem; margin-top: 0.8rem; }
.edit__nav a { padding: 0.45rem 0.7rem; border-radius: var(--radius-s); font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ink-2); transition: background-color 0.2s, color 0.2s; }
.edit__nav a:hover { background: var(--paper-2); color: var(--ink); }
.edit__nav a[href="#elimina"] { color: var(--danger); }
.edit__side .edit__note { display: grid; gap: 0.7rem; padding: 1.25rem; font-size: 0.95rem; color: var(--ink-2); }
.form--boxes { gap: 1rem; margin-top: 0; }
.form__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 1rem; align-items: start; }
.form__pair--lead { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
.form__save { position: sticky; bottom: 0.75rem; z-index: 5; display: flex; align-items: center; gap: 1rem; padding: 0.6rem; padding-inline-start: 1.25rem; border: 1px solid var(--rule); border-radius: calc(var(--radius) + 0.25rem); background: color-mix(in oklch, var(--card) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.form__save p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--ink-2); }
.form__save .btn { flex: none; margin-inline-start: auto; }
/* Con «Discord» scelto come gioco: via host e porta, compare l'avviso sull'invito */
[data-kind-show] { display: none; }
form:has(#f-game_id option[data-kind="discord"]:checked) [data-kind-hide="discord"] { display: none; }
form:has(#f-game_id option[data-kind="discord"]:checked) [data-kind-show="discord"] { display: block; }
@media (max-width: 62rem) {
  .edit { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "main"; }
  .edit__side { position: static; }
  .edit__nav { display: flex; flex-wrap: wrap; gap: 0.2rem; }
  .edit__nav a { padding: 0.4rem 0.75rem; background: var(--paper-2); border-radius: 99px; font-size: 0.9rem; }
}
@media (max-width: 40rem) {
  .form__pair, .form__pair--lead, .form--grid { grid-template-columns: minmax(0, 1fr); }
}

/* Cambio di pagina senza ricaricare: dissolvenza breve tra una lista e l'altra */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.25s; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Arabo: si legge da destra a sinistra (dir="rtl" su <html>: margini e allineamenti sono scritti
   con le proprietà logiche e si specchiano da soli). Le lettere sono legate tra loro, quindi
   niente spaziatura; i segni sopra e sotto la riga chiedono più interlinea nei titoli. */
:lang(ar) { letter-spacing: 0 !important; }
h1:lang(ar), h2:lang(ar), h3:lang(ar) { line-height: 1.3; }
/* Indirizzi, codice e nomi tecnici restano da sinistra a destra anche in una pagina araba. */
[dir="rtl"] :is(code, kbd) { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] :is(pre, input[type="url"], input[type="email"]) { direction: ltr; text-align: left; }
