@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fredoka:wght@500;600;700&display=swap');
:root{--ink:#09295d;--green:#123f8c;--paper:#f4f7fb;--orange:#e33131;--muted:#536883}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans',system-ui,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;font-weight:700;cursor:pointer;border:1px solid #cbd8ed;background:#ffffff;color:var(--ink);border-radius:13px;padding:12px 17px;touch-action:manipulation}button:hover{background:#eaf2ff}button:focus-visible,a:focus-visible{outline:3px solid #d58530;outline-offset:4px}button.primary{background:var(--green);color:white;border:0;padding:16px 28px;box-shadow:0 5px 0 #9b1e29}button.primary:hover{background:#c62631}header{padding:23px max(24px,calc((100% - 1400px)/2));display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #dae4f2;background:#ffffff}.brand{font-weight:900;text-decoration:none;color:var(--ink);letter-spacing:2px;font-size:21px}.brand span{display:block;font-size:9px;letter-spacing:2.4px;margin-top:5px}.prototype{font-size:11px;letter-spacing:1.5px;background:#e8effd;padding:9px 14px;border-radius:50px;font-weight:700}main{max-width:1448px;padding:28px 24px;margin:auto}.intro{display:flex;align-items:center;justify-content:space-between;margin:0 0 25px;gap:20px}.eyebrow{font-size:11px;letter-spacing:1.6px;font-weight:800;margin:0 0 8px}.intro h1{font-family:'Arial Rounded MT Bold',Trebuchet MS,system-ui,sans-serif;font-size:clamp(40px,4.2vw,65px);line-height:1;margin:0;letter-spacing:-1px}.intro h1 span{color:var(--orange)}.intro p:not(.eyebrow){margin:12px 0 0;color:var(--muted);font-size:16px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:26px;align-items:start}.game{background:#ffffff;border:1px solid #cad9ee;border-radius:26px;overflow:hidden;box-shadow:0 12px 40px #365d3b0b}.hud{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 20px;min-height:65px}.hud>span{font-size:11px;letter-spacing:1px;font-weight:800}.hud strong{font-size:14px}.hud button{padding:8px 13px;font-size:13px}.scene{position:relative;background:#bce58c;aspect-ratio:3/2}canvas{display:block;width:100%;height:100%;touch-action:none}.overlay{position:absolute;inset:0;background:#09295d30;backdrop-filter:blur(4px);display:grid;place-items:center;padding:20px}.overlay[hidden]{display:none}.welcome{text-align:center;padding:32px;max-width:435px;background:#ffffff;border:3px solid white;border-radius:28px;box-shadow:0 18px 40px #09295d30;transform:rotate(-1deg)}.welcome h2{font-family:'Arial Rounded MT Bold',Trebuchet MS,system-ui,sans-serif;font-size:35px;line-height:1.05;margin:20px 0 15px}.welcome p{font-size:15px;line-height:1.6;color:#526784}.welcome .hint{font-size:11px;margin-top:20px}.sticker{display:inline-block;background:#ffd45a;border-radius:7px;padding:8px 12px;font-size:10px;font-weight:900;letter-spacing:1.5px;transform:rotate(-4deg)}.controls{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;gap:15px}.controls p{font-size:13px;line-height:1.6;margin:0}.controls p span{font-size:11px;color:var(--muted)}.directions{display:grid;grid-template-columns:repeat(3,40px);grid-template-rows:repeat(2,36px);gap:3px}.directions button{padding:0;font-size:20px;user-select:none;touch-action:none}.directions [data-dir=up]{grid-column:2}.directions [data-dir=left]{grid-column:1;grid-row:2}.directions [data-dir=down]{grid-column:2;grid-row:2}.directions [data-dir=right]{grid-column:3;grid-row:2}#restart{font-size:12px;padding:10px}.mission-copy{padding:8px 0 19px}.mission-copy h2{font:600 28px/1.12 'Arial Rounded MT Bold',Trebuchet MS,system-ui,sans-serif;margin:12px 0}.mission-copy>p:last-child{color:var(--muted);font-size:14px;line-height:1.6}.bag{background:#ffffff;border:1px solid #cfddf0;border-radius:20px;padding:20px}.bag-top{display:flex;align-items:center;justify-content:space-between}.bag-top h3{font-size:16px;margin:0}.bag-top span{font-size:12px}ul{list-style:none;padding:0;margin:18px 0}li{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:13px;color:#536883}li .check{width:23px;height:23px;border:1px solid #c7d5eb;border-radius:50%;display:grid;place-items:center;flex:none}li.found{color:#09295d}li.found .check{background:#123f8c;color:white;border-color:#123f8c}.progress{height:8px;background:#e7eef8;border-radius:10px;overflow:hidden}.progress div{height:100%;width:0;background:#ed8b18;transition:width .3s}.score{padding:20px 4px}.score>span{font-size:12px}.score strong{display:block;font-family:'Arial Rounded MT Bold',Trebuchet MS,sans-serif;font-size:44px;margin-top:4px}.score strong span{font-family:'DM Sans',sans-serif;font-size:14px}.score p,.notice{font-size:12px;line-height:1.6;color:#536883}.notice{padding-top:14px;border-top:1px solid #d7e2f2;margin:0}footer{display:flex;justify-content:space-between;gap:15px;font-size:11px;color:#536883;padding:24px 0}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:1050px){.layout{grid-template-columns:minmax(0,1fr) 240px;gap:18px}.controls p{display:none}}@media(max-width:760px){header{padding:18px}.brand{font-size:17px}.prototype{font-size:9px;padding:7px}main{padding:22px 14px}.intro{align-items:flex-start}.intro .eyebrow{font-size:9px;max-width:230px;line-height:1.5}.intro p:not(.eyebrow){font-size:14px;max-width:280px}.intro button{font-size:11px;padding:10px;white-space:nowrap}.layout{grid-template-columns:1fr}.scene{aspect-ratio:4/5}.controls{padding:12px 16px}.directions{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(2,42px)}.hud{padding:12px}.hud>span{font-size:9px}.welcome{padding:24px;max-width:330px}.welcome h2{font-size:29px}.welcome p{font-size:13px}.welcome .hint{font-size:11px}aside{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mission-copy{grid-column:1/-1;padding-bottom:0}.mission-copy h2{margin:8px 0;font-size:27px}.mission-copy>p:last-child{margin-bottom:0}.bag{padding:15px;grid-row:2/4}.score{padding:10px 0}.notice{grid-column:2}.bag-top{gap:8px;flex-wrap:wrap}.bag-top h3{font-size:14px}li{font-size:12px}footer{flex-direction:column;line-height:1.5}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* Personalizzazione e viaggio */
.player-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 20px;background:#eaf2ff;border-top:1px solid #dbe6f5;font-size:12px}.player-strip span:first-child{font-weight:700}.player-strip span:last-child{color:#536883}.choose{max-width:420px;padding:22px 30px;transform:none}.choose h2{font-size:28px;margin:12px 0}.character-pick{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.character-pick button{padding:4px 12px 10px;background:#f8faff;border:2px solid #d5dfed;box-shadow:none}.character-pick button[aria-pressed=true]{background:#edf3ff;border-color:#123f8c}.character-pick canvas{width:92px;height:100px;max-width:100%;margin:auto;pointer-events:none}.character-pick span{display:block;font-size:12px}.nickname-label{display:block;text-align:left;font-weight:700;font-size:13px;margin-bottom:5px}#nickname{width:100%;padding:11px 13px;border:1px solid #c0d1e9;border-radius:10px;background:#ffffff;color:#09295d;font:16px 'DM Sans',system-ui,sans-serif}#nickname:focus-visible{outline:3px solid #e2ac51;outline-offset:2px}.choose #nickname-note{font-size:11px;text-align:left;margin:6px 0 14px;line-height:1.4}.choose .hint{margin:12px 0 0;font-size:11px}.choose .primary{width:100%;padding:13px}.journey{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:16px}.journey span{font-size:11px;padding:8px 10px;border-radius:20px;background:#e7eefb;color:#536883}.journey .active{background:#123f8c;color:#fff}.journey .done{background:#d7f1e2;color:#126235}.badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:16px 0}.badges span{padding:8px 12px;background:#e8efff;color:#123f8c;border-radius:20px;font-size:12px;font-weight:700}.badges span:last-child{background:#ffe6a8}.welcome.celebration{background:linear-gradient(145deg,#fff1c7,#eaf1ff)}@media(max-width:760px){.player-strip{font-size:11px;padding:9px 12px;flex-wrap:wrap}.scene{aspect-ratio:3/4}.choose{padding:16px 20px;max-width:320px}.choose h2{font-size:24px;margin:9px 0}.character-pick{gap:8px;margin-bottom:10px}.character-pick canvas{width:73px;height:80px}.choose .hint{font-size:10px}.choose #nickname-note{font-size:11px}.journey{grid-column:1/-1;margin:0}.mission-copy{margin-top:0}.bag{grid-row:3/5}.notice{font-size:11px}}@media(max-width:360px){.overlay{padding:10px}.choose{padding:13px 17px}.choose h2{font-size:22px}.character-pick canvas{width:64px;height:70px}.player-strip span:last-child{display:none}}

@media(max-width:760px){.scene:has(#start:not([hidden])){aspect-ratio:auto;height:560px}.journey span{font-size:12px}.choose .hint{font-size:11px}}

/* Palette rilevata da rigadritto.it: blu, rosso, arancione, verde, viola. */
:root{--rd-blue:#123f8c;--rd-dark:#09295d;--rd-red:#e33131;--rd-orange:#ed8b18;--rd-green:#159447;--rd-purple:#7046a8}
body{background:radial-gradient(ellipse at 3% 12%,#e7f0ff 0,transparent 48%),radial-gradient(ellipse at 95% 6%,#fff0cf 0,transparent 40%),#f4f7fb}
header{border-bottom:5px solid transparent;border-image:linear-gradient(90deg,#123f8c 0 23%,#e33131 23% 43%,#ed8b18 43% 63%,#159447 63% 82%,#7046a8 82%) 1}
.brand{color:var(--rd-blue)}.brand span{color:var(--rd-dark)}.prototype{background:#eaf1ff;color:var(--rd-blue)}.intro h1{color:var(--rd-blue)}.intro h1 span{color:var(--rd-red)}.eyebrow{color:var(--rd-blue)}.hud{background:var(--rd-dark);color:#fff}.hud button{color:var(--rd-blue);border-color:#d6e2f5}.player-strip{background:#edf4ff;color:var(--rd-blue)}
button.primary{background:var(--rd-red);box-shadow:0 5px 0 #a61e2c}button.primary:hover{background:#c8272d}button:focus-visible,a:focus-visible{outline-color:var(--rd-orange)}.welcome{border-color:#fff;box-shadow:0 18px 45px #09295d25}.sticker{background:#ffd450;color:#09295d}.character-pick button[aria-pressed=true]{background:#edf3ff;border-color:var(--rd-blue);box-shadow:0 3px 0 #cad8f5}.character-pick button[data-character=girl]{background:#f4eeff}.character-pick button[data-character=boy]{background:#eaf3ff}.journey .active{background:var(--rd-blue);color:#fff}.journey .done{background:#d9f3e1;color:#126338}.bag{border-top:4px solid var(--rd-blue)}li.found .check{background:var(--rd-green);border-color:var(--rd-green)}.progress div{background:linear-gradient(90deg,#ed8b18,#ffce46)}.score strong{color:var(--rd-blue)}.score>span{color:#536883}.badges span{background:#e7effe;color:var(--rd-blue)}.badges span:nth-child(2){background:#e9defa;color:#573482}.badges span:last-child{background:#ffe5aa;color:#75480a}.directions button{background:#edf3ff;border-color:#bfd2ef}.directions button:active{background:var(--rd-blue);color:white}.game{box-shadow:0 12px 40px #123f8c0d}.choose .hint,.choose #nickname-note,.notice,.hint{color:#536883}

/* Rosso leggermente più scuro sui pulsanti per il testo bianco. */
button.primary{background:#d92c2c}button.primary:hover{background:#bd2029}

.intro p:not(.eyebrow){max-width:800px;line-height:1.6}.coming-next{margin-top:28px;padding:28px 30px;display:flex;gap:28px;align-items:center;justify-content:space-between;background:#e9f1ff;border:1px solid #ccdcf2;border-radius:20px}.coming-next h2{font-size:26px;line-height:1.2;margin:7px 0 12px}.coming-next p:not(.eyebrow){font-size:15px;line-height:1.7;color:#536883;max-width:850px;margin:0}.coming-tag{background:#fff0c3;color:#795112;padding:12px 16px;border-radius:14px;font-size:13px;max-width:180px;flex-shrink:0;font-weight:700}.game-info{margin-top:20px;border-top:1px solid #ccd9ec;padding:18px 4px;font-size:14px;line-height:1.7;color:#536883}.game-info summary{cursor:pointer;font-weight:700;color:#123f8c}.game-info p{max-width:1000px}footer nav{display:flex;gap:18px;flex-wrap:wrap}footer a{color:#123f8c}@media(max-width:760px){.coming-next{padding:23px;flex-direction:column;align-items:flex-start}.coming-tag{max-width:none}.coming-next h2{font-size:23px}.prototype{max-width:155px;line-height:1.5;text-align:center}.intro p:not(.eyebrow){max-width:280px}}
