/* Font serviti dal sito (OFL, assets/fonts/): niente Google Fonts, quindi
   nessun CSS bloccante da un altro dominio e nessun terzo che vede l'IP
   del visitatore. Sottoinsiemi latin / latin-ext come li serviva Google:
   il browser scarica solo quello che la pagina usa (pl = latin-ext).
   Sorgente: i TTF dell'app in assets/fonts/, convertiti con fontTools
   (docs/MANUALE_SVILUPPATORE.md §7.1). Pesi usati: 400 600 700 800 + Archivo Black. */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/archivo-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/archivo-400-latin-ext.woff2') format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/archivo-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/archivo-600-latin-ext.woff2') format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/archivo-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/archivo-700-latin-ext.woff2') format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/archivo-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/archivo-800-latin-ext.woff2') format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/archivo-black-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo Black';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/archivo-black-latin-ext.woff2') format('woff2');
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Ottomino — www.ottomino.app. Stile "carta e inchiostro da enigmistica",
   design tokens dal design handoff (settembre 2026). UNICO foglio di
   stile del sito: landing, classifica, invito di gruppo, privacy. */

:root {
  --paper: #F3EDDE;
  --paper-light: #FBF7EC;
  --cell-empty: #E9E0CB;
  --shadow-soft: #E4DAC4;
  --ink: #1C1917;
  --text-2: #575044;
  --text-3: #8A8171;
  --text-2-dark: #B5AC9C;
  --vermilion: #D9472A;
  --green: #1E6E50;
  --amber: #F0A83B;
  --indigo: #4F46E5;
  --font-display: 'Archivo Black', 'Arial Black', 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
}
a { color: var(--ink); text-decoration: none; transition: color .15s; }
a:hover { color: var(--vermilion); }
img { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .22em;
}
.wordmark.small { font-size: 16px; letter-spacing: .2em; }

/* --- Brand -------------------------------------------------------------- */
/* Logo = icona dell'app (PNG con angoli già arrotondati e trasparenza). */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 40px; height: 40px; display: block; }
.brand.small .logo { width: 28px; height: 28px; }
.hero-logo {
  width: 96px;
  height: 96px;
  display: block;
  border-radius: 24px;
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  background: #2372F5;
}

/* --- Nav ---------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 2px solid var(--ink);
}
.topnav { display: flex; align-items: center; gap: 24px; }
.topnav .nav-link {
  font-size: 15px;
  font-weight: 700;
  border-bottom: 2px solid var(--vermilion);
  padding-bottom: 2px;
}
/* The page one is on: still in the row, so the menu never shrinks from
   page to page, but quiet — no red underline, muted ink. */
.topnav .nav-link[aria-current="page"] { border-bottom-color: transparent; color: var(--text-3); }
.lang-select {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 700 13px var(--font-body);
  padding: 6px 26px 6px 14px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0h8L4 6z' fill='%231C1917'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* --- Hero --------------------------------------------------------------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
  padding: 80px 0 88px;
}
.hero-copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 8px 14px;
  border-radius: 4px;
}
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: -.01em;
  font-weight: 400;
  text-wrap: balance;
}
.hero-copy h1 .accent { color: var(--vermilion); }
.hero-copy .lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 520px;
  text-wrap: pretty;
}
.badges { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.badge-link { display: inline-flex; transition: transform .15s, filter .15s; }
.badge-link:hover { transform: translate(-2px, -2px); }
.badge-link img { height: 52px; width: auto; display: block; }
.badge-btn {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 17px;
}
.badges-note { font-size: 14px; color: var(--text-3); font-weight: 600; margin: 0; }

/* Board illustrativa */
.hero-board { position: relative; display: flex; justify-content: center; }
.board-card {
  background: var(--paper-light);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 10px 10px 0 var(--ink);
  transform: rotate(2deg);
}
.board-8 {
  display: grid;
  grid-template-columns: repeat(8, var(--cell, 42px));
  gap: 5px;
  --cell: clamp(28px, 3.6vw, 42px);
}
.board-8 i {
  width: var(--cell, 42px);
  height: var(--cell, 42px);
  border-radius: 8px;
  background: var(--cell-empty);
  display: block;
}
.sticker {
  position: absolute;
  font-family: var(--font-display);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  white-space: nowrap;
}
.sticker.line {
  top: -22px;
  right: 8px;
  background: var(--vermilion);
  font-size: 19px;
  padding: 12px 20px;
  border-radius: 12px;
  transform: rotate(6deg);
  box-shadow: 5px 5px 0 var(--ink);
}
.sticker.streak {
  bottom: -16px;
  left: 24px;
  background: var(--green);
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 10px;
  transform: rotate(-4deg);
  box-shadow: 4px 4px 0 var(--ink);
}

/* --- Sezioni ------------------------------------------------------------ */
section { padding: 0 0 88px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.sec-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
}
.sec-head .rule { flex: 1; border-bottom: 2px solid var(--ink); }

/* Come funziona */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
ol.steps-grid { list-style: none; margin: 0; padding: 0; }
.step {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 6px 6px 0 var(--shadow-soft);
  transition: transform .15s, box-shadow .15s;
}
.step:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow-soft); }
.step-n { font-family: var(--font-display); font-size: 44px; line-height: 1; }
.step:nth-child(1) .step-n { color: var(--vermilion); }
.step:nth-child(2) .step-n { color: var(--green); }
.step:nth-child(3) .step-n { color: var(--indigo); }
.step h3 { margin: 0; font-size: 20px; font-weight: 700; }
.step p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* Tre modi di giocare: stesse card di "Come funziona", con un'emoji al
   posto del numero — un'emoji a 44px sballa la linea di base. */
.mode-ico { font-size: 34px; line-height: 1.25; }

/* Le regole in prosa: due paragrafi, larghezza di lettura. */
.facts-lead { margin: -12px 0 24px; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 760px; }
/* minmax(0, 1fr): a big number must not stretch its column past the screen. */
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
.fact {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 6px 6px 0 var(--shadow-soft);
}
.fact dt { font-family: var(--font-display); font-size: 26px; line-height: 1.1; margin: 0 0 8px; overflow-wrap: anywhere; }
.fact:nth-child(4n+1) dt { color: var(--vermilion); }
.fact:nth-child(4n+2) dt { color: var(--green); }
.fact:nth-child(4n+3) dt { color: var(--indigo); }
.fact:nth-child(4n) dt { color: var(--amber); }
.fact dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.prose-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.prose-2 p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }

/* Domande frequenti: sempre visibili, non a fisarmonica — sono il
   contenuto vero della pagina, per chi legge e per chi indicizza. */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.qa {
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 22px 24px;
  background: var(--paper);
}
.qa h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.qa p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* Screenshot */
/* Sette schermate: su desktop vanno a capo (due file, centrate), sotto
   i 1024px la striscia scorre in orizzontale (media query in fondo). */
.screens-strip { display: flex; flex-wrap: wrap; gap: 30px 22px; justify-content: center; padding-bottom: 14px; }
.screens-strip img {
  width: 200px;
  height: auto;
  border-radius: 22px;
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.screens-strip img:nth-child(1) { transform: rotate(-1.5deg); }
.screens-strip img:nth-child(2) { transform: rotate(1deg) translateY(14px); }
.screens-strip img:nth-child(3) { transform: rotate(-1deg); }
.screens-strip img:nth-child(4) { transform: rotate(1.5deg) translateY(14px); }
.screens-strip img:nth-child(5) { transform: rotate(-.5deg); }
.screens-strip img:nth-child(6) { transform: rotate(1deg) translateY(14px); }
.screens-strip img:nth-child(7) { transform: rotate(-1.5deg); }

/* Giocatori AI: la sezione che spiega perché non sono numeri. */
.agents-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.agents-lead { font-size: 19px; line-height: 1.5; margin: 0 0 26px; font-weight: 500; }
.agents-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.agents-points li { display: flex; gap: 14px; align-items: flex-start; }
.agents-points .ai-badge { margin-top: 6px; font-size: 11px; padding: 3px 7px; flex: 0 0 auto; }
.agents-points h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.agents-points p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.agents-close { margin: 26px 0 0; font-size: 16px; font-weight: 700; }
.agents-shot { margin: 0; display: flex; justify-content: center; }
.agents-shot img {
  width: 100%; max-width: 300px; height: auto; border-radius: 26px;
  border: 2.5px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); transform: rotate(1.5deg);
}
@media (max-width: 900px) {
  .agents-grid { grid-template-columns: 1fr; gap: 32px; }
  .agents-shot img { max-width: 240px; }
}

/* Perché Ottomino */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.feature {
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 26px 28px;
  display: flex;
  gap: 18px;
  background: var(--paper);
}
.feature .ico { font-size: 30px; line-height: 1.2; }
.feature h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.feature p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }

/* CTA */
.cta {
  background: var(--ink);
  border-radius: 24px;
  padding: 64px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
  margin-bottom: 64px;
}
.cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  color: var(--paper);
  text-wrap: balance;
}
.cta h2 .accent { color: var(--amber); }
.cta p { margin: 0; font-size: 17px; color: var(--text-2-dark); }
.cta .badge-btn { background: var(--paper); color: var(--ink); }
.cta a { color: var(--paper); }
.cta a:hover { color: var(--amber); }

/* Footer */
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 2px solid var(--ink);
  padding: 28px 0 40px;
}
/* The links wrap on a phone: a row that cannot wrap is wider than the
   screen, and the browser zooms the whole page out to fit it. */
footer nav { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14px; color: var(--text-2); }
footer nav a { font-weight: 600; overflow-wrap: anywhere; }
footer .fine { font-size: 13px; color: var(--text-3); margin: 0; }

/* --- Pagine interne (classifica, invito, privacy) ------------------------ */
.page { max-width: 760px; margin: 0 auto; padding: 44px 0 72px; }
.page .sec-head { margin-bottom: 28px; }
.page .sec-head h2 { font-size: 32px; }
.panel {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 6px 6px 0 var(--shadow-soft);
}
.muted { color: var(--text-2); }
.lb-intro { margin: 0 0 20px; font-size: 15px; line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fine { font-size: 13px; color: var(--text-3); }

/* Bottoni "timbro" */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 12px 22px;
  font: 700 15px var(--font-body);
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow-soft);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { color: var(--paper); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--shadow-soft); }
.btn.ghost { background: var(--paper-light); color: var(--ink); }
.btn.ghost:hover { color: var(--vermilion); }

/* Classifica */
.board-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 10px 16px; }
.board-head h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 400; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.daynav {
  width: 30px; height: 30px; border-radius: 8px; line-height: 1;
  border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
  font: 700 16px var(--font-body); cursor: pointer;
}
.daynav:hover:not(:disabled) { color: var(--vermilion); }
.daynav:disabled { opacity: .3; cursor: default; }
.countdown { color: var(--text-2); font-size: 14px; text-align: right; }
.countdown b { color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown small { color: var(--text-3); font-size: 12px; }

/* The hidden attribute wins over any display rule below (.board-head,
   .tabs, .levels are flex): what the script hides stays hidden. */
[hidden] { display: none !important; }

/* Which board (classifica.html): the day's, all-time, this month. A
   segmented switch above the panel, heavier than the zone tabs inside
   it — they are different boards, not different zones. */
.kind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.kind-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 10px; border-radius: 14px;
  border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
  font: 700 15px var(--font-body); cursor: pointer;
  box-shadow: 4px 4px 0 var(--shadow-soft);
  transition: background .15s, color .15s, transform .1s, box-shadow .1s;
}
.kind-btn:hover { color: var(--vermilion); }
.kind-btn.active { background: var(--ink); color: var(--paper); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-soft); }
.kind-ico { font-family: var(--font-display); font-size: 18px; line-height: 1; }
.kind-btn[data-kind="alltime"].active, .kind-btn[data-kind="month"].active { background: var(--vermilion); border-color: var(--vermilion); }
.panel--total { border-color: var(--vermilion); box-shadow: 6px 6px 0 var(--vermilion); }
.board-head--total { display: block; }
.board-head--total h2 { display: block; }
.board-head--total .sigma { color: var(--vermilion); }
.total-sub { margin: 6px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.panel--total .board li .pos { color: var(--vermilion); }
@media (max-width: 480px) {
  .kind { gap: 6px; }
  .kind-btn { flex-direction: column; gap: 4px; font-size: 13px; padding: 8px 4px; }
}

.tabs { display: flex; gap: 8px; margin: 20px 0 14px; flex-wrap: wrap; }
.tab {
  flex: 1; min-width: 90px; height: 38px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
  font: 700 14px var(--font-body); cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { color: var(--vermilion); }
.tab.active { background: var(--ink); color: var(--paper); }

.levels { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.level-select {
  flex: 1 1 160px; height: 40px; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
  padding: 0 10px; font: 700 14px var(--font-body); cursor: pointer;
}
.level-select[hidden] { display: none; }

.search-row { position: relative; margin-bottom: 14px; }
#comune-search {
  width: 100%; height: 44px; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--paper-light);
  color: var(--ink); padding: 0 14px; font: 500 15px var(--font-body); outline: none;
}
#comune-search::placeholder { color: var(--text-3); }
#comune-search:focus { box-shadow: 3px 3px 0 var(--shadow-soft); }
.search-results {
  position: absolute; z-index: 5; left: 0; right: 0; top: 50px;
  background: var(--paper-light); border: 2px solid var(--ink);
  border-radius: 12px; overflow: hidden; max-height: 260px; overflow-y: auto;
  box-shadow: 4px 4px 0 var(--shadow-soft);
}
.search-results button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  background: none; border: none; color: var(--ink); cursor: pointer;
  font: 600 14px var(--font-body);
}
.search-results button:hover { background: var(--cell-empty); }
.search-results small { color: var(--text-3); }

.board-meta { display: flex; justify-content: space-between; color: var(--text-2); font-size: 14px; margin-bottom: 10px; }
#board-label { font-weight: 700; color: var(--ink); }
.board-meta { align-items: center; gap: 10px; }
.board-meta-end { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.board-share {
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 2px solid var(--ink); background: var(--paper-light); color: var(--ink);
  font: 700 13px var(--font-body); cursor: pointer;
}
.board-share:hover { color: var(--vermilion); }

.board { list-style: none; margin: 0; padding: 8px; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; }
.board li {
  display: grid; grid-template-columns: 48px 34px 1fr auto;
  align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px;
}
.board li + li { border-top: 1px solid var(--cell-empty); }
.board li .pos { font-family: var(--font-display); font-size: 14px; color: var(--text-3); }
.board li:nth-child(1) .pos { color: var(--amber); }
.board li:nth-child(2) .pos { color: var(--text-2); }
.board li:nth-child(3) .pos { color: #B45309; }
.board .avatar {
  width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--paper-light);
}
.board .who b { display: block; font-size: 15px; }
.board .who small { color: var(--text-3); font-size: 12px; }
.board .pts { font-family: var(--font-display); font-size: 16px; font-variant-numeric: tabular-nums; }
.board .placeholder { display: block; text-align: center; color: var(--text-3); padding: 28px 0; }

.ai-badge {
  display: inline-block; background: var(--ink); color: var(--paper);
  font-size: 9px; font-weight: 800; border-radius: 4px; padding: 1px 5px;
  vertical-align: 2px; letter-spacing: .08em;
}
/* Quale prova del giorno ha fatto il punteggio (dalla seconda in poi). */
.try-badge {
  display: inline-block; background: transparent; color: var(--text-2);
  font-size: 9px; font-weight: 800; border: 1.5px solid var(--text-3);
  border-radius: 4px; padding: 0 5px; vertical-align: 2px; letter-spacing: .06em;
  white-space: nowrap;
}
.ai-note { color: var(--text-3); font-size: 13px; margin: 14px 4px 0; }

/* Le arene pubbliche (arene.html): nome, #hashtag e numeri a sinistra,
   «Entra» a destra; la stessa cornice della classifica. */
#arena-search {
  width: 100%; height: 44px; border-radius: 12px;
  border: 2px solid var(--ink); background: var(--paper-light);
  color: var(--ink); padding: 0 14px; font: 500 15px var(--font-body); outline: none;
}
#arena-search::placeholder { color: var(--text-3); }
#arena-search:focus { box-shadow: 3px 3px 0 var(--shadow-soft); }
.board.arena-list li { grid-template-columns: 1fr auto; gap: 12px; }
.board.arena-list .arena-who { min-width: 0; }
.board.arena-list .arena-who b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.board.arena-list .arena-who small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.board.arena-list .arena-handle { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--vermilion); font-size: 13px; }
.board.arena-list .arena-join { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
/* The verified mark of an official arena: the rosette with a check in
   the accent colour, inline with the name, no word. */
.official-wrap { display: inline-block; vertical-align: -3px; margin-left: 4px; color: var(--vermilion); }
.official-mark { display: block; }
.arena-more { text-align: center; margin: 14px 0 0; }
.arena-more button[hidden] { display: none; }
.ai-note a { color: var(--text-2); font-weight: 600; border-bottom: 1px solid currentColor; }

/* Replay (replay.html) e "le partite di ieri" (index.html) */
.board li .watch { margin-left: 10px; font-size: 13px; font-weight: 700; color: var(--vermilion); text-decoration: none; white-space: nowrap; }
.board li .watch:hover { text-decoration: underline; }
.yesterday { padding: 0 0 56px; }
.yesterday .yd-lead { max-width: 720px; margin: -16px 0 18px; }
.yesterday .board { max-width: 640px; }
.yesterday .yd-all { margin-top: 14px; }
.yesterday .yd-all a { font-weight: 700; color: var(--vermilion); border-bottom: 2px solid currentColor; }
.yd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.yd-side .panel { padding: 18px 20px; }
.yd-side h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 17px; font-weight: 400; line-height: 1.3; }
.yd-side h3 .sigma { color: var(--vermilion); }
.yd-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.yd-facts li { font-size: 14px; line-height: 1.45; color: var(--text-2); padding-left: 14px; position: relative; }
.yd-facts li b { color: var(--ink); font-variant-numeric: tabular-nums; }
.yd-facts li::before { content: ''; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--vermilion); }
.yd-alltime { margin-top: 16px; }
.yd-side .board.small { padding: 4px; }
.yd-side .board.small li { padding: 8px 6px; }
.yd-side .board.small .who { min-width: 0; }
.yd-side .board.small .who b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yd-side .board.small .pts { font-size: 15px; }
.yd-side .yd-all { margin-top: 10px; font-size: 14px; }
@media (max-width: 900px) { .yd-grid { grid-template-columns: 1fr; } }
.replay-panel .board-head h2 { font-size: 26px; }
.replay-player { font-weight: 700; color: var(--vermilion); margin: 4px 0 10px; }
.replay-status { text-align: center; padding: 24px 0; }
.replay-board { width: 100%; max-width: 480px; height: auto; display: block; margin: 0 auto; background: var(--paper-light); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--shadow-soft); }
.replay-tray { display: flex; justify-content: space-around; gap: 10px; max-width: 480px; margin: 14px auto 6px; min-height: 60px; }
.replay-tray canvas { width: 60px; height: 60px; }
.replay-meta { text-align: center; color: var(--text-2); font-size: 14px; font-variant-numeric: tabular-nums; margin: 6px 0; }
.replay-range { display: block; width: 100%; max-width: 480px; margin: 6px auto; accent-color: var(--vermilion); }
.replay-ctl { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.replay-ctl .tab { min-width: 44px; }

/* Invito di gruppo */
.invite-card { text-align: center; max-width: 480px; margin: 0 auto; padding: 34px 28px; }
.invite-card h1 { margin: 12px 0 4px; font-family: var(--font-display); font-size: 30px; font-weight: 400; text-wrap: balance; }
.invite-card .trophy { font-size: 44px; line-height: 1; }
.grp-meta { color: var(--text-2); font-size: 15px; margin: 4px 0; }
/* L'hashtag e le etichette dell'arena (ufficiale, pubblica/privata, durata
   delle sessioni): dal riepilogo pubblico, sotto il nome. */
.grp-handle { margin: 0 0 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 16px; color: var(--vermilion); overflow-wrap: anywhere; }
.grp-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.grp-tags .tag {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-2); border: 1.5px solid var(--ink); border-radius: 999px; padding: 4px 10px;
}
.grp-tags .official-wrap { vertical-align: middle; margin-left: 0; }
.grp-qr { margin: 18px auto 0; text-align: center; }
.grp-qr img {
  display: block; margin: 0 auto 8px; width: 168px; height: 168px;
  background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 6px;
}
.invite-code {
  font: 800 30px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .18em;
  background: var(--paper); border: 2px dashed var(--ink);
  border-radius: 12px; padding: 18px 10px; margin: 16px 0;
}
.open-btn { margin-top: 18px; font-size: 16px; padding: 14px 30px; }
.copy-btn { font-size: 14px; padding: 10px 22px; }
.invite-card .badges { justify-content: center; margin-top: 6px; }
/* L'app non ha risposto al richiamo: il piano B (codice a mano, store)
   resta visibile e i badge si prendono l'attenzione. */
.no-app .badges { outline: 2px solid var(--vermilion); outline-offset: 12px; border-radius: 14px; }

/* Privacy */
.prose { padding: 32px 36px; }
.prose h1 { margin: 0 0 18px; font-family: var(--font-display); font-size: 32px; font-weight: 400; }
.prose h2 { font-size: 18px; margin: 28px 0 6px; }
.prose p, .prose li { color: var(--text-2); font-size: 15px; line-height: 1.6; }
.prose strong { color: var(--ink); }
.prose a { color: var(--vermilion); font-weight: 600; }
.prose .fine { margin-top: 28px; }
.prose .table-wrap { overflow-x: auto; margin: 10px 0 14px; }
.prose .rules-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose .rules-table th, .prose .rules-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(28,25,23,.12); vertical-align: top; color: var(--text-2); line-height: 1.45; }
.prose .rules-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.prose .rules-table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.prose .rules-table td:last-child, .prose .rules-table th:last-child { text-align: right; white-space: nowrap; }
.prose .rules-table.example td:nth-child(4) { text-align: right; white-space: nowrap; }
.step .mode-link { margin: 10px 0 0; font-size: 14px; }
.step .mode-link a { color: var(--vermilion); font-weight: 700; }
.rules .rules-more { margin: 18px 0 0; font-size: 16px; }
.rules .rules-more a { color: var(--vermilion); font-weight: 600; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; padding: 48px 0 72px; }
  .hero-copy h1 { font-size: 38px; }
  .sec-head h2 { font-size: 28px; }
  .cta h2 { font-size: 30px; }
  .steps-grid, .features-grid, .faq-grid, .prose-2 { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screens-strip {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 4px 22px;
  }
  .screens-strip img { scroll-snap-align: center; flex: 0 0 auto; }
  .screens-strip img:nth-child(2n) { transform: rotate(1deg); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  /* Brand + link + language selector must share ~350px: smaller
     wordmark tracking, tighter nav — nothing hidden. */
  .brand .logo { width: 32px; height: 32px; }
  .brand { gap: 8px; }
  .topbar .wordmark { font-size: 15px; letter-spacing: .14em; }
  /* Two links plus the selector no longer fit beside the brand on a
     390 px phone: the nav drops to its own row, right-aligned. */
  .topbar { padding: 14px 0; flex-wrap: wrap; row-gap: 10px; }
  /* Four links and the selector: on a 360 px phone they wrap to a
     second row rather than push past the edge. */
  .topnav { gap: 8px 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .topnav .nav-link { font-size: 13px; }
  .fact { padding: 16px; }
  .fact dt { font-size: 22px; }
  /* Footer links: no dots on a phone, they would start a line. */
  footer nav { gap: 6px 14px; }
  footer nav span { display: none; }
  /* One long word («Datenschutzerklärung») must break or hyphenate
     rather than widen the page. */
  .prose h1, .prose h2, .sec-head h2, .cta h2 { overflow-wrap: anywhere; hyphens: auto; }
  .prose h1 { font-size: 24px; }
  .prose .rules-table { font-size: 13px; }
  .prose .rules-table th, .prose .rules-table td { padding: 7px 6px; }
  .lang-select { font-size: 12px; padding: 5px 22px 5px 10px; }
  .page { padding: 28px 0 56px; }
  .panel { padding: 18px; }
  .prose { padding: 22px 20px; }
  .board-head h2 { font-size: 24px; }
  .countdown { text-align: left; }
  .board li { grid-template-columns: 40px 30px 1fr auto; gap: 8px; }
  .invite-code { font-size: 24px; }
  .cta { padding: 44px 24px; }
  .sticker.line { font-size: 15px; padding: 9px 14px; top: -18px; right: 0; }
  .sticker.streak { font-size: 13px; padding: 8px 12px; }
}

/* --- Partner arenas (partner.html): who it is for, the comparison, the form -- */
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 12px 0 6px; }
.who { border: 2px solid var(--ink); border-radius: 14px; padding: 16px; background: var(--paper); min-width: 0; }
.who .ico { font-size: 26px; line-height: 1; display: block; margin-bottom: 8px; }
.prose .who h3 { margin: 0 0 6px; font-size: 16px; }
.prose .who p { margin: 0; font-size: 14px; line-height: 1.5; }
/* Three text columns: nothing is nowrap, the Partner column reads as the answer. */
.prose .compare td:first-child { white-space: normal; }
.prose .compare td:last-child, .prose .compare th:last-child { text-align: left; white-space: normal; color: var(--ink); font-weight: 600; }
.prose .compare td:nth-child(2) { color: var(--text-3); }
.mark { font-weight: 800; font-size: 17px; line-height: 1; }
.mark.yes { color: var(--green); }
.mark.no { color: var(--text-3); }
.launch { border: 2px dashed var(--vermilion); border-radius: 14px; padding: 16px 18px; margin: 22px 0 6px; background: var(--paper); }
.prose .launch h3 { margin: 0 0 6px; font-size: 16px; color: var(--vermilion); }
.prose .launch p { margin: 0; }
.how-list { padding-left: 22px; margin: 8px 0 0; }
.how-list li { margin: 0 0 8px; }
.partner-form { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 12px; }
.partner-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); min-width: 0; }
.partner-form .field.full, .partner-form .form-privacy, .partner-form .form-actions, .partner-form .form-status { grid-column: 1 / -1; }
.partner-form input, .partner-form select, .partner-form textarea {
  width: 100%; min-height: 44px; border-radius: 12px; border: 2px solid var(--ink);
  background: var(--paper-light); color: var(--ink); padding: 10px 14px;
  font: 500 15px var(--font-body); outline: none; box-sizing: border-box;
}
.partner-form select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231C1917' stroke-width='2'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; }
.partner-form textarea { min-height: 110px; resize: vertical; }
.partner-form input::placeholder, .partner-form textarea::placeholder { color: var(--text-3); font-weight: 400; }
.partner-form input:focus, .partner-form select:focus, .partner-form textarea:focus { box-shadow: 3px 3px 0 var(--shadow-soft); }
.partner-form .bad { border-color: var(--vermilion); box-shadow: 3px 3px 0 var(--vermilion); }
/* The honeypot: off-screen for people (never display:none — some bots skip those). */
.partner-form .trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.prose .partner-form .form-privacy { margin: 0; }
.partner-form .form-actions { margin: 0; }
.partner-form .form-actions .btn { width: 100%; }
.prose .partner-form .form-status { margin: 0; font-size: 14px; font-weight: 600; color: var(--vermilion); }
.sent { border: 2px solid var(--green); border-radius: 14px; padding: 18px; margin-top: 12px; }
.prose .sent h3 { margin: 0 0 6px; }
.prose .sent p { margin: 0; }
.ar-partner { margin: -8px 0 20px; font-size: 14px; font-weight: 700; }
.ar-partner a { color: var(--vermilion); }
@media (max-width: 700px) {
  .who-grid, .partner-form { grid-template-columns: 1fr; }
}
