/* Stile del portale giochi (sopra a kit.css) */
:root { --brand: #C1121F; --teal: #2A9D8F; --ink: #1b1b1b; }
html, body { margin: 0; padding: 0; }
body { background: linear-gradient(180deg, #FFF3C4 0%, #FFE0B2 40%, #FFD6E0 100%) fixed; font-family: 'Baloo 2', 'Trebuchet MS', Arial, sans-serif; color: var(--ink); min-height: 100vh; }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 3px solid var(--ink); position: sticky; top: 0; z-index: 20; }
.top .ttl { flex: 1; font-family: 'Lilita One', sans-serif; font-size: 16px; text-align: center; color: var(--brand); }
.top a { color: var(--ink); font-weight: 800; text-decoration: none; border: 2px solid var(--ink); border-radius: 99px; padding: 3px 12px; background: #FFE08A; font-size: 14px; }
.wrap { max-width: 860px; margin: 0 auto; padding: 14px 8px 60px; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 12px 8px 18px; margin: 14px auto; max-width: 830px; box-shadow: 6px 6px 0 rgba(0,0,0,.18); }
.center { text-align: center; }
.stage { margin: 0 auto 10px; overflow: hidden; border-radius: 10px; border: 2px solid #ddd; }
.stage .page { margin: 0 !important; box-shadow: none; }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.btn { font-family: inherit; font-weight: 800; font-size: 18px; padding: 10px 20px; border-radius: 99px; border: 3px solid var(--ink); background: #fff; cursor: pointer; color: var(--ink); }
.btn.primary { background: #22c55e; box-shadow: 0 4px 0 #14803c; }
.btn.ghost { background: #eee; }
.btn:disabled { opacity: .5; cursor: default; }
.actions.small .btn { font-size: 15px; padding: 6px 14px; }
.small { font-size: 14px; color: #555; }
.answerbox { margin: 8px auto 0; padding: 12px; max-width: 560px; background: #FFF8E1; border: 3px dashed var(--brand); border-radius: 18px; text-align: left; }
.answerbox label { font-weight: 800; font-size: 17px; display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
.row.center { justify-content: center; margin: 10px 0; }
input[type=text] { flex: 1; font-family: inherit; font-size: 22px; font-weight: 800; padding: 8px 12px; border: 3px solid var(--ink); border-radius: 14px; text-transform: uppercase; min-width: 0; }
input.code { max-width: 170px; text-align: center; letter-spacing: 8px; font-size: 28px; }
.msg { min-height: 24px; margin-top: 8px; font-weight: 800; font-size: 17px; }
.msg.good { color: #14803c; } .msg.bad { color: var(--brand); }
.hints .hint { background: #E3F4FF; border: 2px solid #8ECAE6; border-radius: 12px; padding: 8px 10px; margin-top: 8px; font-size: 15px; }
.hints .hint.sol { background: #FFF3C4; border-color: #FFB703; font-weight: 800; text-transform: uppercase; }
.tracker { display: flex; gap: 8px; justify-content: center; margin: 4px 0 10px; flex-wrap: wrap; }
.dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: #fff; }
.dot.on { background: #FFD23F; } .dot.cur { outline: 4px solid var(--teal); }
.wheelbox { margin: 10px auto; max-width: 420px; }
.wheelhold { position: relative; width: min(360px, 90vw); margin: 0 auto; }
.wheelhold .wbig { width: 100%; display: block; }
.wheelhold .wsmall { position: absolute; left: 13.5%; top: 13.5%; width: 73%; transition: transform .35s; }
.mirror.flip { transform: scaleX(-1); transition: transform .5s; }
.jigwrap { position: relative; max-width: 700px; margin: 6px auto; border: 4px solid var(--ink); border-radius: 12px; overflow: hidden; }
.jigsvg { width: 100%; display: block; }
.tile { position: absolute; width: 33.3334%; height: 50%; background: #1D3557; color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Lilita One', sans-serif; font-size: 48px; border: 2px dashed #fff; box-sizing: border-box; }
.tile.off { display: none; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetti span { position: absolute; top: -40px; animation: fall 2.6s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
.certwrap { margin-top: 10px; }
/* home */
.hero { text-align: center; padding: 24px 12px 6px; }
.hero h1 { font-family: 'Lilita One', sans-serif; font-size: 40px; color: var(--brand); margin: 0; text-shadow: 2px 2px 0 #fff; }
.hero p { font-size: 18px; max-width: 560px; margin: 8px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 10px 12px; max-width: 920px; margin: 0 auto; }
.game { background: #fff; border: 3px solid var(--ink); border-radius: 22px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: 6px 6px 0 rgba(0,0,0,.18); display: flex; flex-direction: column; }
.game img { width: 100%; height: 170px; object-fit: cover; display: block; background: #FFE08A; }
.game .body { padding: 12px 14px 16px; }
.game h3 { margin: 0 0 4px; font-family: 'Lilita One', sans-serif; font-weight: 400; font-size: 22px; color: var(--brand); }
.game .meta { font-size: 13px; font-weight: 800; color: var(--teal); }
.foot-note { text-align: center; font-size: 13px; color: #555; margin: 26px 12px; }
.langbar { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.langbar a { text-decoration: none; color: var(--ink); font-weight: 800; border: 2px solid var(--ink); border-radius: 99px; padding: 3px 14px; background: #fff; }
.langbar a.on { background: #FFD23F; }
@media print { body.print-cert .top, body.print-cert .card > *:not(.certwrap) { display: none !important; } body.print-cert .card { border: 0; box-shadow: none; } body.print-cert { background: #fff; } }
/* piccoli schermi */
.top { flex-wrap: wrap; }
@media (max-width: 560px) { .top .ttl { order: 3; flex-basis: 100%; font-size: 14px; } .top a { font-size: 13px; padding: 2px 10px; } .card { margin: 10px 4px; } }
/* caselle scrivibili sulle pagine */
input.bxin { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 15pt; text-align: center; text-transform: uppercase; padding: 0; color: #1D3557; vertical-align: middle; box-sizing: border-box; outline: none; }
input.bxin:focus { background: #FFF3C4; border-color: #C1121F; box-shadow: 0 0 0 2px #C1121F; }
input.bxin.big { font-size: 18pt; }
input.bxin:disabled { background: #D8F5DC; color: #14803c; }
.hintline { font-weight: 500; font-size: 13px; color: #666; }
