@font-face { font-family: "Dela Gothic One"; font-weight: 400; font-display: swap; src: url(/fonts/dela-gothic-one-latin.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400 800; font-display: swap; src: url(/fonts/figtree-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: "Figtree"; font-weight: 400 800; font-display: swap; src: url(/fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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; }

:root {
  --night: #0b1029;
  --night-2: #121a3a;
  --night-3: #1d2550;
  --line-dark: #3a4580;
  --on-night: #ffffff;
  --on-night-2: #cfd5f2;
  --on-night-3: #a9b1d8;
  --orange: #ff7a00;
  --orange-ink: #b84f00;
  --orange-shadow: #b84f00;
  --gold: #ffc531;
  --gold-shadow: #b8860b;
  --red: #d4140b;
  --paper: #fff8ee;
  --card: #ffffff;
  --card-line: #f0e2cc;
  --ink: #1a1d2e;
  --ink-2: #5a5f78;
  --ad: #f3ead9;
  --display: "Dela Gothic One", "Arial Black", system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1430;
    --card: #161e44;
    --card-line: #26305f;
    --ink: #eef0f8;
    --ink-2: #a9b1d8;
    --orange-ink: #ff9a3d;
    --ad: #161e44;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--text); background: var(--paper); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; letter-spacing: -0.005em; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-ink); }
.dark { background: var(--night); color: var(--on-night); }
.dark a { color: var(--gold); }

/* Bottoni */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 24px; border: 0; border-radius: 14px; font: 800 1.02rem/1.2 var(--text); text-decoration: none; cursor: pointer; background: var(--orange); color: var(--night) !important; box-shadow: 0 5px 0 var(--orange-shadow); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--orange-shadow); }
.btn.gold { background: var(--gold); box-shadow: 0 5px 0 var(--gold-shadow); }
.btn.ghost { background: transparent; color: var(--on-night) !important; box-shadow: inset 0 0 0 2px var(--line-dark); }
.btn.ghost:hover { transform: none; box-shadow: inset 0 0 0 2px var(--orange); }

/* Header */
.top { background: var(--night); border-bottom: 3px solid var(--orange); position: sticky; top: 0; z-index: 30; }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: flex; flex: none; margin-right: auto; }
.logo img { height: 54px; width: auto; }
.nav { display: none; }
.nav a { color: var(--on-night-2); text-decoration: none; font-weight: 600; font-size: 0.94rem; padding: 10px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { color: #fff; background: var(--night-3); }
.nav a[aria-current] { color: #fff; background: var(--night-3); font-weight: 700; }
.nav a.hot { color: var(--gold); font-weight: 700; }
.langs { display: flex; background: var(--night-3); border-radius: 999px; padding: 4px; flex: none; }
.langs a { color: var(--on-night-2); text-decoration: none; font-weight: 700; font-size: 0.8rem; padding: 8px 10px; border-radius: 999px; line-height: 1; }
.langs a[aria-current] { background: var(--gold); color: var(--night); font-weight: 800; }
.menu { position: static; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; background: var(--orange); color: var(--night); display: flex; align-items: center; justify-content: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--gold); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--night-2); border-bottom: 3px solid var(--orange); padding: 12px 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.menu-panel a { color: #fff; text-decoration: none; font-weight: 700; padding: 12px 14px; border-radius: 12px; background: var(--night-3); }
@media (min-width: 1060px) {
  .logo img { height: 68px; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; margin-right: auto; }
  .logo { margin-right: 8px; }
  .menu { display: none; }
}

/* Strisce decorative (eco del logo) */
.streaks { position: relative; overflow: hidden; isolation: isolate; }
.streaks::before, .streaks::after { content: ""; position: absolute; right: -80px; height: 16px; background: var(--orange); transform: rotate(-9deg); pointer-events: none; z-index: -1; }
.streaks::before { bottom: 34px; width: min(760px, 70vw); opacity: .8; }
.streaks::after { bottom: 14px; width: min(480px, 45vw); height: 7px; opacity: .5; }

/* Hero */
.hero-in { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding-top: 40px; padding-bottom: 52px; }
.hero-copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: 18px; }
.badge { align-self: flex-start; background: var(--night-3); color: var(--gold); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); line-height: 1.03; }
.hero h1 span { color: var(--orange); }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--on-night-2); margin: 0; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.hero-art { flex: 1 1 360px; display: flex; justify-content: center; }
.hero-art .frame { width: min(100%, 460px); aspect-ratio: 4 / 3; border-radius: 24px; background: var(--night-3); border: 3px solid var(--orange); transform: rotate(1.5deg); display: grid; place-items: center; overflow: hidden; }
.hero-art .frame img { width: 62%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); animation: bob 5s ease-in-out infinite; }
.hero-art .frame img.cover { width: 100%; height: 100%; object-fit: cover; animation: none; filter: none; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .frame img { animation: none; } }

/* Linea temporale delle serie */
.saga { background: var(--night-2); color: #fff; padding: 32px 0 38px; }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; }
.row-head h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.row-head a { font-weight: 700; font-size: 0.95rem; }
.saga-list { list-style: none; margin: 0; padding: 0 0 4px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; }
.saga-list a { scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border-radius: 16px; background: var(--night-3); border-top: 5px solid var(--orange); color: #fff; text-decoration: none; transition: transform .12s; }
.saga-list a:hover { transform: translateY(-3px); }
.saga-list small { color: var(--gold); font-weight: 700; font-size: 0.8rem; }
.saga-list strong { font-size: 1.05rem; line-height: 1.25; }
.saga-list span { color: var(--on-night-3); font-size: 0.88rem; }

/* Sezioni della home */
.home { display: flex; flex-direction: column; gap: 52px; padding-top: 48px; }
.home h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); color: var(--ink); }
.tiles { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 719px) { .tile { padding: 14px; } .tile span:last-child { font-size: 0.86rem; } .num { width: 36px; height: 36px; border-radius: 10px; } }
.tile { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border-radius: 18px; background: var(--card); border: 2px solid var(--card-line); color: var(--ink); text-decoration: none; transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-3px); border-color: var(--orange); }
.tile strong { font-size: 1.12rem; }
.tile span { color: var(--ink-2); font-size: 0.94rem; line-height: 1.45; }
.num { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; margin-bottom: 4px; background: var(--orange); color: var(--night); }
.num.c2 { background: var(--gold); }
.num.c3 { background: var(--night); color: var(--gold); }
.num.c4 { background: var(--red); color: #fff; }

.cards { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.home .cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.post { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; height: 100%; }
.post:hover strong { color: var(--orange-ink); }
.thumb { aspect-ratio: 16 / 9; border-radius: 18px; background: var(--night-3); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb img.mark { width: 34%; height: auto; object-fit: contain; opacity: .9; }
.post strong { font-size: 1.3rem; line-height: 1.25; }
.post span:last-child { color: var(--ink-2); line-height: 1.5; }

.heroes { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .heroes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.heroes a { display: flex; flex-direction: column; gap: 8px; color: var(--ink); text-decoration: none; }
.heroes a:hover strong { color: var(--orange-ink); }
.heroes .thumb { aspect-ratio: 16 / 10; }
.heroes strong { font-size: 1.05rem; }
.band { border-radius: 28px; padding: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.band-copy { flex: 1 1 380px; display: flex; flex-direction: column; gap: 12px; }
.band-copy p { margin: 0; color: var(--on-night-2); font-size: 1.08rem; }
.band h2 { color: #fff !important; }
.band-copy .btn { align-self: flex-start; }
.band-art { flex: 0 1 260px; aspect-ratio: 3 / 4; border-radius: 20px; background: var(--night-2); border: 3px solid var(--line-dark); display: grid; place-items: center; overflow: hidden; }
.band-art img { width: 70%; }
.split { display: flex; flex-wrap: wrap; gap: 22px; }
.split > * { flex: 1 1 360px; border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.panel { background: var(--card); border: 2px solid var(--card-line); }
.panel p { margin: 0; color: var(--ink-2); }
.panel.gold { background: var(--gold); border: 0; color: var(--night); }
.panel.gold p, .panel.gold .eyebrow { color: var(--night); }

/* Testata di sezione e articolo */
.pagehead .wrap { padding-top: 22px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 14px; }
.pagehead h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); line-height: 1.06; max-width: 900px; }
.pagehead .lead { margin: 0; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--on-night-2); max-width: 760px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; font-weight: 700; }
.pills span { background: var(--night-3); padding: 7px 12px; border-radius: 999px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 0.88rem; color: var(--on-night-3); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--on-night-3) !important; }
.crumbs [aria-current] { color: #fff; }

.listing { padding-top: 36px; }
.empty { padding: 28px; border: 2px dashed var(--card-line); border-radius: 18px; color: var(--ink-2); }

.layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 32px; }
.layout > article { flex: 999 1 620px; min-width: 0; }
.layout > aside { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 960px) { .layout > aside { position: sticky; top: 92px; } }

.prose { font-size: 1.12rem; line-height: 1.72; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); color: var(--ink); margin-top: 1.6em; scroll-margin-top: 90px; }
.prose h3 { font-size: 1.25rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.98rem; display: block; overflow-x: auto; background: var(--card); border: 2px solid var(--card-line); border-radius: 16px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; }
.prose th { font-weight: 800; background: var(--night); color: #fff; }
.prose tr + tr td { border-top: 1px solid var(--card-line); }
.prose blockquote { padding: 18px 22px; border-radius: 16px; background: var(--night); color: #fff; margin-left: 0; margin-right: 0; }
.prose a { font-weight: 600; }
.cover { aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; margin: -72px 0 24px; border: 4px solid var(--paper); background: var(--night-3); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.muted { color: var(--ink-2); font-size: 0.9rem; }

.box { background: var(--card); border: 2px solid var(--card-line); border-radius: 20px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.box h2 { font-size: 1.2rem; color: var(--ink); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 0.97rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 700; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 0.97rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--orange-ink); }
.box .label { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: var(--ink-2); }

.next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 36px; }
.next a { display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: 16px; text-decoration: none; background: var(--night-2); color: #fff; }
.next a span { color: var(--on-night-3); font-size: 0.9rem; }
.next a strong { font-size: 1.12rem; }
.next a.fwd { background: var(--orange); color: var(--night); text-align: right; }
.next a.fwd span { color: var(--night); font-weight: 700; }

/* Pubblicità: spazio sempre riservato, nessuno spostamento del layout */
.ad { margin: 28px 0; min-height: 280px; }
.ad-side { min-height: 600px; }

/* Form */
.form { display: grid; gap: 14px; margin: 24px 0; padding: 22px; background: var(--card); border: 2px solid var(--card-line); border-radius: 20px; }
.form label { display: grid; gap: 4px; font-weight: 700; font-size: 0.95rem; }
.form input, .form textarea { font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--card-line); background: var(--paper); color: var(--ink); }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--orange); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-msg:empty { display: none; }

/* Minigiochi */
.game { position: relative; margin: 0 auto 28px; max-width: 480px; touch-action: none; user-select: none; -webkit-user-select: none; }
.game.wide { max-width: 960px; }
.game canvas { width: 100%; height: auto; display: block; border-radius: 20px; background: var(--night); border: 3px solid var(--orange); }

/* Footer */
.foot { margin-top: 64px; background: var(--night); color: var(--on-night-3); }
.foot .wrap { padding-top: 40px; padding-bottom: 96px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-brand { flex: 1 1 380px; display: flex; flex-direction: column; gap: 14px; }
.foot-brand img { height: 52px; width: auto; align-self: flex-start; }
.foot-brand p { margin: 0; font-size: 0.88rem; line-height: 1.6; max-width: 560px; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; align-content: start; font-size: 0.95rem; }
.foot a, .linklike { color: #fff; }
.linklike { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }

/* Consenso */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 720px; margin: 0 auto; padding: 18px; border-radius: 20px; background: var(--night-2); color: #fff; border: 2px solid var(--line-dark); box-shadow: 0 16px 50px rgba(0,0,0,.4); }
.consent p { margin: 0 0 14px; font-size: 0.95rem; color: var(--on-night-2); }
.consent a { color: var(--gold); }
.consent-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent .btn { min-height: 44px; padding: 10px 18px; }
@media (max-width: 520px) { .consent-btns .btn { flex: 1; } }

/* Ricerca */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.search-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--night-3); color: #fff; flex: none; }
.search-ico:hover { background: var(--line-dark); }
.searchbox { display: flex; gap: 10px; flex-wrap: wrap; max-width: 720px; }
.searchbox input { flex: 1 1 260px; min-height: 52px; font: inherit; font-size: 1.05rem; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line-dark); background: var(--night-2); color: #fff; }
.searchbox input:focus { outline: none; border-color: var(--orange); }
.results { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.results a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 2px solid var(--card-line); color: var(--ink); text-decoration: none; }
.results a:hover { border-color: var(--orange); }
.results strong { font-size: 1.12rem; }
.results span:last-child { color: var(--ink-2); font-size: 0.95rem; }
.results mark { background: var(--gold); color: var(--night); border-radius: 3px; padding: 0 2px; }

/* Minigiochi: gioco in alto, istruzioni brevi, schermo intero (docs/GIOCHI.md) */
.gamehead .wrap { padding-top: 12px; padding-bottom: 14px; gap: 6px; }
.gamehead h1 { font-size: clamp(1.25rem, 3.2vw, 2rem); line-height: 1.15; }
.gamehead + .layout { padding-top: 14px; }
@media (max-width: 600px) { .gamehead .crumbs { display: none; } .gamehead .wrap { padding-top: 10px; padding-bottom: 10px; } .gamehead + .layout { padding-top: 10px; } }
/* Larghezza: tela intera ma mai più alta dello schermo (gioco + pulsante sotto restano visibili). */
.game-wrap { --ar: var(--ard, .75); --gw: var(--gwd, 480px); margin: 0 auto 14px; width: min(100%, var(--gw), max(260px, calc((100vh - 215px) * var(--ar)))); width: min(100%, var(--gw), max(260px, calc((100svh - 215px) * var(--ar)))); }
@media (pointer: coarse) { .game-wrap { --ar: var(--arm, var(--ard, .75)); --gw: 100%; width: min(100%, max(240px, calc((100svh - 175px) * var(--ar)))); } }
/* Telefono in orizzontale: la testata non resta fissa e la tela verticale entra intera nello schermo (scorrendo fino al gioco). */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  body:has(.game-wrap) .top { position: static; }
  .game-wrap { width: min(100%, calc((100svh - 64px) * var(--ar))); scroll-margin-top: 8px; }
}
.game-wrap .game { margin: 0; max-width: none; width: 100%; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.game-bar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.game-fs { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--orange); background: var(--night); color: #fff; font: 700 0.95rem/1 var(--text); cursor: pointer; touch-action: manipulation; }
.game-fs:hover { background: var(--night-3); }
.game-fs .i-out, .game-fs[aria-pressed="true"] .i-in { display: none; }
.game-fs[aria-pressed="true"] .i-out { display: inline; }
/* Schermo intero: nativo (:fullscreen) o pseudo (iPhone), stessa impaginazione. */
.game-wrap.fs { position: fixed; inset: 0; z-index: 2147483000; width: auto; max-width: none; height: 100vh; height: 100dvh; margin: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--night); overscroll-behavior: contain; touch-action: none;
  padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
.game-wrap.fs .game { flex: none; margin: auto 0; width: min(100%, calc((100vh - 68px) * var(--ar))); width: min(100%, calc((100dvh - 68px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--ar))); }
.game-wrap.fs .game canvas { border-radius: 0; border-width: 0; }
.game-wrap.fs .game-bar { order: -1; align-self: stretch; margin: 0; }
@media (orientation: landscape) and (max-height: 560px) {
  .game-wrap.fs { flex-direction: row; }
  .game-wrap.fs .game { margin: 0 auto; }
  .game-wrap.fs .game { width: min(calc(100% - 64px), calc((100vh - 12px) * var(--ar))); width: min(calc(100% - 64px), calc((100dvh - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * var(--ar))); }
  .game-wrap.fs .game-bar { order: 1; align-self: flex-start; }
  .game-wrap.fs .game-fs span { display: none; }
}
html.game-lock, html.game-lock body { overflow: hidden; overscroll-behavior: none; }
/* Istruzioni brevi: mostra il set del dispositivo (data-show), l'altro resta a un tocco. */
.howto { max-width: 760px; margin: 0 auto 20px; padding: 12px 18px 14px; border-radius: 18px; background: var(--card); border: 2px solid var(--card-line); }
.howto-head { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; }
.howto h2 { font-size: 1.1rem; color: var(--ink); }
.howto-sw { min-height: 44px; padding: 6px 0; background: none; border: 0; font: 700 0.92rem var(--text); color: var(--orange-ink); text-decoration: underline; cursor: pointer; }
.howto-set h3 { margin: 4px 0; font: 800 0.76rem var(--text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.howto ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; line-height: 1.45; }
.howto[data-show="keys"] [data-set="touch"], .howto[data-show="touch"] [data-set="keys"] { display: none; }
kbd { display: inline-block; min-width: 1.7em; padding: 0 6px; border-radius: 6px; border: 1px solid var(--card-line); border-bottom-width: 3px; background: var(--paper); color: var(--ink); font: 700 0.85em/1.5 var(--text); text-align: center; }
.game-lead { max-width: 760px; margin: 0 auto 18px; font-size: 1.08rem; color: var(--ink-2); }
.cover-game { margin: 0 0 24px; }

/* Episodi per serie */
.chips { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 2px solid var(--card-line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.chips a:hover { border-color: var(--orange); }
.ser-list { display: flex; flex-direction: column; gap: 22px; }
.ser { display: grid; gap: 16px; padding: 16px; background: var(--card); border: 2px solid var(--card-line); border-top: 5px solid var(--orange); border-radius: 22px; scroll-margin-top: 90px; }
@media (min-width: 860px) { .ser { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; padding: 22px; align-items: start; } }
.ser-art { display: block; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--night-3); }
.ser-art img { width: 100%; height: 100%; object-fit: cover; }
.ser-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ser h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
.ser h2 a { color: var(--ink); text-decoration: none; }
.ser h2 a:hover { color: var(--orange-ink); }
.ser-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; font-weight: 700; }
.ser-meta span { background: var(--night); color: var(--gold); padding: 5px 11px; border-radius: 999px; }
.sagas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.sagas a { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--card-line); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.sagas a span { flex: none; color: var(--ink-2); font-weight: 600; font-size: 0.82rem; }
.sagas a:hover { border-color: var(--orange); }
.ser-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.ser-guide { font-weight: 700; font-size: 0.95rem; }
.eps { margin: 0 0 32px; }
.eps { display: flex; flex-direction: column; gap: 10px; }
.ep-saga { scroll-margin-top: 90px; background: var(--card); border: 2px solid var(--card-line); border-radius: 16px; }
.ep-saga[open] { border-color: var(--orange); padding-bottom: 12px; }
.ep-saga summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; }
.ep-saga summary::-webkit-details-marker { display: none; }
.ep-saga summary::after { content: ""; flex: none; margin-left: auto; width: 10px; height: 10px; border-right: 3px solid var(--orange-ink); border-bottom: 3px solid var(--orange-ink); transform: rotate(45deg); transition: transform 0.15s; }
.ep-saga[open] summary::after { transform: rotate(-135deg); }
.ep-saga h2 { margin: 0; font-size: clamp(1.15rem, 3vw, 1.5rem); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.ep-saga h2 small { font: 700 0.88rem/1.2 var(--text); color: var(--ink-2); }
.ep-saga-hub { margin: 0 16px 10px; font-weight: 700; font-size: 0.95rem; }
.ep-saga .eplist { margin: 0 12px; }
.cat-cover .cover { aspect-ratio: 16 / 5; margin-bottom: 18px; }
.cat-cover .cover img { object-position: center 30%; }
@media (max-width: 859px) { .cat-cover { display: none; } }
.eplist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 6px; }
.eplist a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--card-line); color: var(--ink); text-decoration: none; font-size: 0.95rem; line-height: 1.35; }
.eplist a:hover { border-color: var(--orange); }
.eplist b { flex: none; min-width: 2.2em; color: var(--orange-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.up { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.up a { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 16px; background: var(--card); border: 2px solid var(--card-line); color: var(--ink); text-decoration: none; }
.up a:hover { border-color: var(--orange); }
.up a span { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: var(--ink-2); }
.up a strong { font-size: 1.05rem; line-height: 1.3; }

/* Serie ↔ Episodi */
/* Schede "Guida | Episodi" sotto il titolo della guida e della pagina episodi della serie */
.sx-tabs { display: flex; gap: 4px; width: 100%; max-width: 420px; padding: 4px; border-radius: 16px; background: var(--night-3); }
.dark .sx-tabs a { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 14px; border-radius: 12px; color: var(--on-night-2); text-decoration: none; font-weight: 800; font-size: 1rem; line-height: 1.2; text-align: center; }
.dark .sx-tabs a:hover { color: #fff; background: var(--line-dark); }
.dark .sx-tabs a[aria-current] { background: var(--orange); color: var(--night); }
.sx-tabs b { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; background: var(--night); color: var(--gold); }
/* Riquadro "Episodi di …" nella guida, dopo il paragrafo d'apertura */
.prose .sx-eps { margin-top: 1.6em; padding: 20px 16px; border-radius: 22px; background: var(--night); color: #fff; border-top: 5px solid var(--orange); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.sx-eps .eyebrow { color: var(--gold); }
.prose .sx-eps h2 { margin: 0; color: #fff; font-size: clamp(1.4rem, 3.4vw, 1.8rem); }
.sx-eps p { margin: 0; color: var(--on-night-2); font-size: 1rem; line-height: 1.55; }
.prose .sx-eps .sagas { margin: 2px 0 0; padding: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.prose .sx-eps li + li { margin-top: 0; }
.prose .sx-eps .sagas a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 8px 12px; background: var(--night-3); border-color: var(--line-dark); color: #fff; font-weight: 700; }
.prose .sx-eps .sagas a:hover { border-color: var(--orange); }
.sx-eps .sagas a span { color: var(--gold); font-size: 0.8rem; }
.sx-eps .sagas i { font-style: normal; color: var(--on-night-3); }
.sx-eps .skip-kai a { opacity: 0.72; }
.sx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 4px; }
.sx-cta .btn { flex: 1 1 auto; }
.prose .sx-first { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-weight: 800; text-decoration: none; }
.prose .sx-first:hover { text-decoration: underline; }
@media (min-width: 600px) { .prose .sx-eps { padding: 24px 26px; } .sx-cta .btn { flex: none; } .prose .sx-eps .sagas { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
/* Scheda della guida nella pagina episodi e negli hub delle saghe */
.sx-guide { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 28px; padding: 14px; border-radius: 20px; background: var(--night-2); border: 2px solid var(--line-dark); color: #fff; text-decoration: none; }
.sx-guide:hover { border-color: var(--orange); }
.sx-guide-art { align-self: stretch; min-height: 96px; border-radius: 14px; overflow: hidden; background: var(--night-3); }
.sx-guide-art img { width: 100%; height: 100%; object-fit: cover; }
.sx-guide-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sx-guide .eyebrow { color: var(--gold); }
.sx-guide strong { font-family: var(--display); font-weight: 400; font-size: 1.12rem; line-height: 1.2; }
.sx-guide-txt > span:nth-child(3) { color: var(--on-night-2); font-size: 0.95rem; line-height: 1.45; }
.sx-more { color: var(--gold); font-weight: 800; font-size: 0.95rem; }
@media (max-width: 479px) { .sx-guide-txt > span:nth-child(3) { display: none; } }
@media (min-width: 720px) { .sx-guide { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; padding: 16px; } .sx-guide-art { aspect-ratio: 16 / 10; min-height: 0; } .sx-guide strong { font-size: 1.3rem; } }
/* Episodio: la guida come terza voce del riquadro "Risali" */
.up a.g { background: var(--night-2); border-color: var(--night-2); color: #fff; }
.up a.g:hover { border-color: var(--orange); }
.up a.g span { color: var(--gold); }
/* Sezione Serie: episodi della serie sotto ogni card */
.sx-card { display: flex; flex-direction: column; gap: 12px; }
.sx-card .post { height: auto; flex: 1 1 auto; }
.sx-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--card); border: 2px solid var(--card-line); }
.sx-foot span { font-weight: 700; font-size: 0.9rem; color: var(--ink-2); }
.sx-foot a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 10px; background: var(--night); color: var(--gold); font-weight: 800; font-size: 0.95rem; text-decoration: none; }
.sx-foot a:hover { background: var(--night-3); }
/* Pagina Episodi: nota su Kai nel blocco di Z */
.ser-note { margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--card-line); font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.ser-note a { font-weight: 700; }
/* Personaggi saga per saga */
.charlink { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 16px 18px; border-radius: 20px; background: var(--night); border: 2px solid var(--line-dark); border-left: 6px solid var(--gold); color: #fff; text-decoration: none; }
.charlink:hover { border-color: var(--orange); }
.charlink.sheet { flex-direction: row-reverse; border-left-width: 2px; border-right: 6px solid var(--gold); }
.charlink-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }
.charlink small { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.charlink strong { font-family: var(--display); font-weight: 400; font-size: 1.12rem; line-height: 1.2; }
.charlink-txt > span { color: var(--on-night-2); font-size: 0.95rem; line-height: 1.45; }
.charlink b { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--night); font-size: 1.3rem; }
.charlink:hover b { background: var(--orange); color: #fff; }
@media (min-width: 720px) { .charlink { padding: 18px 22px; } .charlink strong { font-size: 1.3rem; } }
.prose .cast { scroll-margin-top: 90px; }
.prose .cast-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 12px; }
@media (max-width: 479px) { .prose .cast-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; } .prose .cast-list .thumb { border-radius: 10px; } .prose .cast-list strong { font-size: 0.86rem; } }
.prose .cast-list li + li { margin-top: 0; }
.prose .cast-list a { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.prose .cast-list .thumb { aspect-ratio: 16 / 10; border-radius: 14px; }
.prose .cast-list strong { font-size: 1rem; line-height: 1.25; }
.prose .cast-list a:hover strong { color: var(--orange-ink); }
