:root{--bg:#031322;--panel:rgba(6,34,58,.88);--line:#1a79a8;--cyan:#47d7ff;--green:#37e88b;--red:#ff596c;--text:#eef9ff;--muted:#8db3c8;--gold:#ffc857}*{box-sizing:border-box}body{margin:0;color:var(--text);font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at 20% 0,#0c4164 0,transparent 35%),linear-gradient(#031322,#020b14);min-height:100vh}.sea{position:fixed;inset:0;pointer-events:none;opacity:.2;background:repeating-radial-gradient(ellipse at bottom,#2e9cc4 0 1px,transparent 2px 22px);animation:drift 18s linear infinite}@keyframes drift{to{transform:translateX(40px)}}button,input{font:inherit}button{border:1px solid #246b91;background:#0a304d;color:var(--text);border-radius:12px;padding:.75rem 1rem;cursor:pointer;transition:.2s}button:hover{transform:translateY(-1px);border-color:var(--cyan)}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:linear-gradient(135deg,#087fd0,#22a5e8);border:0;font-weight:800}.ghost{background:transparent}.wide{width:100%}.hidden{display:none!important}.shell{width:min(1500px,96%);margin:auto;padding-bottom:3rem;position:relative}header{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;gap:1rem}.brand{display:flex;align-items:center;gap:.7rem;color:inherit;text-decoration:none}.brand>span{font-size:2rem}.brand b{display:block;font-size:1.2rem;text-transform:uppercase}.brand small{color:var(--muted)}nav{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.card{background:var(--panel);backdrop-filter:blur(16px);border:1px solid rgba(71,215,255,.22);box-shadow:0 18px 55px #0007;border-radius:20px;padding:1.25rem}.hero{min-height:75vh;display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:3rem}.hero h1{font-size:clamp(2.6rem,6vw,6rem);line-height:.95;margin:.5rem 0}.hero p{font-size:1.1rem;color:var(--muted);max-width:650px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.72rem;color:var(--cyan);font-weight:800}.chips{display:flex;gap:.6rem;flex-wrap:wrap}.chips span{padding:.55rem .8rem;border:1px solid #245e7c;border-radius:99px}.auth-card{max-width:430px;width:100%;justify-self:end}.tabs{display:flex;margin-bottom:1rem}.tabs button{flex:1;background:transparent}.tabs .active{background:#0d4f77}form{display:grid;gap:.75rem}input{width:100%;padding:.9rem;border-radius:11px;border:1px solid #285e79;background:#041a2b;color:white}.dashboard{display:grid;grid-template-columns:1.3fr .7fr;gap:1rem;margin:1rem 0}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:.8rem}.mode{text-align:left;min-height:100px}.mode b,.mode small{display:block}.mode small{color:var(--muted);margin-top:.35rem}.difficulty{display:flex;gap:.5rem;margin-top:1rem}.difficulty .active{background:#137f52;border-color:var(--green)}.section-head,.gamebar,.board-title{display:flex;justify-content:space-between;align-items:center;gap:1rem}.section-head h2,.gamebar h2,.board-title h3{margin:.2rem 0}.compact-list,.game-list{display:grid;gap:.55rem}.list-row{display:flex;justify-content:space-between;align-items:center;gap:.8rem;padding:.8rem;border:1px solid #174b67;border-radius:12px;background:#061f34}.gamebar{margin:1rem 0}.statusbox{text-align:right}.statusbox span{display:block;color:var(--gold);font-size:1.5rem;font-weight:900}.placement-actions{display:flex;gap:.5rem;flex-wrap:wrap}.ship-picker{display:flex;gap:.6rem;flex-wrap:wrap;margin:1rem 0}.ship-choice{min-width:130px}.ship-choice.active{outline:2px solid var(--green);background:#0e5138}.ship-choice.placed{opacity:.45}.placement-layout{display:grid;grid-template-columns:minmax(300px,650px) 1fr;gap:1.2rem}.tips{color:var(--muted);padding:1rem}.battle{display:grid;grid-template-columns:1fr 1fr 340px;gap:1rem}.board-card{overflow:hidden}.board{display:grid;grid-template-columns:repeat(10,1fr);aspect-ratio:1;max-width:650px;width:100%;border:1px solid var(--line);background:linear-gradient(135deg,#052e4a,#031b2e)}.cell{position:relative;border:1px solid rgba(53,146,193,.45);padding:0;min-width:0;border-radius:0;background:transparent}.cell:hover{background:#2ac4ff22}.cell.ship{background:linear-gradient(135deg,#8ba9b7,#334e5b);box-shadow:inset 0 0 0 2px #cbe8f5}.cell.hit{background:#9d1b2b}.cell.hit:after{content:'💥';position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(.8rem,2vw,1.6rem);animation:boom .45s}.cell.miss:after{content:'●';color:#aeeaff;position:absolute;inset:0;display:grid;place-items:center}.cell.preview{background:#2adf8a88}.cell.invalid{background:#ff3b5688}@keyframes boom{0%{transform:scale(.2)}70%{transform:scale(1.5)}100%{transform:scale(1)}}.touch-hint{text-align:center;color:var(--muted)}.intel{min-height:500px}.log,.chat{max-height:180px;overflow:auto;display:grid;gap:.4rem;margin:.6rem 0 1.2rem}.log div,.chat div{padding:.55rem;background:#061d30;border-radius:8px}.log .hit{border-left:3px solid var(--red)}.log .miss{border-left:3px solid var(--cyan)}.quick-chat{display:flex;flex-wrap:wrap;gap:.35rem}.quick-chat button{font-size:.78rem;padding:.45rem}.chat form,#chatForm{grid-template-columns:1fr auto}.danger{color:var(--red)}#toast{position:fixed;left:50%;bottom:1.5rem;transform:translate(-50%,20px);opacity:0;background:#071b2b;border:1px solid var(--cyan);padding:.9rem 1.2rem;border-radius:12px;transition:.2s;z-index:30}#toast.show{opacity:1;transform:translate(-50%,0)}.modal{position:fixed;inset:0;background:#000a;display:grid;place-items:center;z-index:20;padding:1rem}.modal-card{width:min(560px,100%);max-height:85vh;overflow:auto;position:relative}.close{position:absolute;right:1rem;top:1rem}.rank-row{display:grid;grid-template-columns:45px 1fr auto;gap:.8rem;padding:.7rem;border-bottom:1px solid #16435c}.rank-row:first-child{color:var(--gold)}@media(max-width:1100px){.battle{grid-template-columns:1fr 1fr}.intel{grid-column:1/-1}.placement-layout{grid-template-columns:1fr}.tips{display:none}}@media(max-width:760px){.shell{width:94%}header{align-items:flex-start}.brand small,nav button span{display:none}.hero{grid-template-columns:1fr;gap:1rem;padding:2rem 0}.auth-card{justify-self:stretch}.dashboard,.mode-grid,.battle{grid-template-columns:1fr}.enemy{order:-1}.board-card{padding:.75rem}.gamebar{align-items:flex-start}.gamebar>div:nth-child(2){flex:1}.statusbox span{font-size:1.1rem}.section-head{align-items:flex-start;flex-direction:column}.placement-actions{width:100%}.placement-actions button{flex:1}.board{max-width:none}.cell{touch-action:manipulation}.chips span{font-size:.8rem}}

.type-select{display:flex;gap:.45rem;margin:.8rem 0;flex-wrap:wrap}.type-select button.active{background:linear-gradient(135deg,#8d3cff,#4b7dff);border-color:#bca8ff}.match{margin-top:1rem;background:linear-gradient(135deg,#e85724,#ff9c27);border:0;font-weight:900}.match-state{text-align:center;color:var(--gold);padding:.6rem}.missions{margin:1rem 0}.mission-list{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}.mission{display:flex;justify-content:space-between;gap:.7rem;padding:.9rem;border:1px solid #19516e;border-radius:14px;background:#061f34}.mission small{display:block;color:var(--muted);margin:.25rem 0}.progress{height:7px;background:#082c46;border-radius:10px;overflow:hidden}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--cyan),var(--green))}.ability-bar{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin-top:.8rem}.ability-bar button{font-size:.75rem;padding:.55rem}.ability-bar small{color:var(--gold)}.ability-bar .used{opacity:.35;text-decoration:line-through}.energy{height:18px;background:#061b2a;border:1px solid #1d678b;border-radius:20px;margin-top:.7rem;overflow:hidden;position:relative}.energy span{display:block;height:100%;background:linear-gradient(90deg,#1cd7e8,#7cf564,#ffc857);transition:.35s}.energy b{position:absolute;inset:0;text-align:center;font-size:.72rem;color:#001018}.board.targeting{outline:3px solid var(--gold);box-shadow:0 0 25px #ffc85766}@media(max-width:760px){.mission-list{grid-template-columns:1fr}.ability-bar{grid-template-columns:repeat(2,1fr)}.type-select button{flex:1}.mission{align-items:center}}
.profile-mini{width:44px;height:44px;padding:0;border-radius:50%;overflow:hidden;border:2px solid rgba(56,189,248,.65)}
.profile-mini img,.profile-avatar{width:100%;height:100%;object-fit:cover}.profile-card{text-align:center;max-width:430px}.profile-avatar{width:150px;height:150px;border-radius:50%;border:4px solid #38bdf8;box-shadow:0 0 35px rgba(56,189,248,.35);margin:12px auto 20px;display:block}.profile-card input{margin:12px 0}.hit-celebration{position:fixed;z-index:1000;left:50%;top:24%;transform:translate(-50%,-50%) scale(.7);display:flex;align-items:center;gap:16px;padding:15px 24px;border-radius:22px;background:rgba(3,23,41,.94);border:2px solid #fb7185;box-shadow:0 0 60px rgba(239,68,68,.55);animation:hitPop 1.8s ease both;pointer-events:none}.hit-celebration.hidden{display:none}.hit-celebration img{width:84px;height:84px;border-radius:50%;object-fit:cover;border:4px solid #fb7185}.hit-celebration b{display:block;font-size:clamp(24px,5vw,48px);color:#fff;text-shadow:0 0 18px #ef4444}.hit-celebration span{color:#bae6fd}@keyframes hitPop{0%{opacity:0;transform:translate(-50%,-50%) scale(.4) rotate(-7deg)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.12) rotate(2deg)}72%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-62%) scale(.9)}}
@media(max-width:600px){.hit-celebration{top:20%;width:min(88vw,390px);padding:12px 16px}.hit-celebration img{width:62px;height:62px}.profile-mini{width:38px;height:38px}}


.waiting-room{text-align:center;max-width:760px;margin:1rem auto;padding:2rem}.waiting-room h2{font-size:clamp(1.8rem,5vw,3rem);margin:.5rem 0}.waiting-room>p{color:var(--muted)}.waiting-radar{width:150px;height:150px;border-radius:50%;margin:0 auto 1.2rem;position:relative;overflow:hidden;border:2px solid #32d6ff;background:repeating-radial-gradient(circle,#0d5b7818 0 12px,#42dcff33 13px 14px),linear-gradient(135deg,#062d46,#03121f);box-shadow:0 0 45px #26cfff44}.waiting-radar:before,.waiting-radar:after{content:'';position:absolute;background:#4ce5ff55}.waiting-radar:before{left:50%;top:0;width:1px;height:100%}.waiting-radar:after{top:50%;left:0;height:1px;width:100%}.waiting-radar span{position:absolute;inset:50% 50% 0 50%;transform-origin:0 0;background:conic-gradient(from -30deg,#45e5ff99,transparent 42deg);animation:radarSweep 1.7s linear infinite}.waiting-radar i{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--green);left:67%;top:30%;box-shadow:0 0 18px var(--green);animation:radarPing 1.2s ease-in-out infinite}.waiting-radar b{position:absolute;inset:0;display:grid;place-items:center;font-size:2rem;color:#9df2ff}@keyframes radarSweep{to{transform:rotate(360deg)}}@keyframes radarPing{50%{transform:scale(1.9);opacity:.35}}.room-code-box{display:inline-grid;gap:.25rem;padding:1rem 2rem;margin:1rem 0;border:1px solid #38d8ff;border-radius:18px;background:#051b2c;box-shadow:inset 0 0 25px #1ecfff11}.room-code-box small{color:var(--muted);letter-spacing:.16em}.room-code-box strong{font-size:clamp(2.2rem,8vw,4.6rem);letter-spacing:.18em;color:var(--gold);text-shadow:0 0 22px #ffc85755}.waiting-actions{display:flex;justify-content:center;gap:.6rem;flex-wrap:wrap;margin:1rem 0}.danger-btn{background:#671e2a;border-color:#ff596c}.waiting-meta{display:flex;justify-content:center;gap:1.2rem;flex-wrap:wrap;color:var(--muted);padding-top:.8rem}.waiting-meta b{color:var(--text)}.opponent-found{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;background:#001018cc;animation:foundFade 2.4s ease both;pointer-events:none}.opponent-found>div{text-align:center;padding:2rem 3rem;border-radius:24px;background:#052a3f;border:2px solid var(--green);box-shadow:0 0 80px #37e88b55;animation:foundPop .5s ease}.opponent-found span,.opponent-found b,.opponent-found small{display:block}.opponent-found span{font-size:4rem}.opponent-found b{font-size:clamp(1.8rem,6vw,4rem);color:var(--green)}.opponent-found small{font-size:1rem;color:#c7f9df;margin-top:.5rem}@keyframes foundPop{from{transform:scale(.5);opacity:0}to{transform:scale(1);opacity:1}}@keyframes foundFade{0%,78%{opacity:1}100%{opacity:0}}@media(max-width:600px){.waiting-room{padding:1.25rem}.waiting-radar{width:120px;height:120px}.waiting-actions{display:grid}.waiting-actions button{width:100%}.room-code-box{width:100%;padding:1rem}.waiting-meta{display:grid;gap:.5rem}}

.presence-chip{display:block;margin-top:.25rem;font-size:.76rem;color:#8fa9bd}.presence-chip.online{color:#62e6a7;text-shadow:0 0 12px rgba(98,230,167,.35)}

/* Navigazione coerente: link e pulsanti condividono lo stesso stile */
nav button,.nav-btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:.45rem;border:1px solid #246b91;background:#0a304d;color:var(--text);border-radius:12px;padding:.75rem 1rem;cursor:pointer;transition:transform .2s,border-color .2s,box-shadow .2s,background .2s;text-decoration:none;font-weight:600;line-height:1}
nav button:hover,.nav-btn:hover{transform:translateY(-1px);border-color:var(--cyan);box-shadow:0 8px 22px rgba(71,215,255,.13)}
.admin-nav{background:linear-gradient(135deg,#123f67,#175c84);border-color:#3da8d3;box-shadow:inset 0 0 18px rgba(71,215,255,.08)}
.admin-nav:hover{background:linear-gradient(135deg,#16517f,#1975a3);border-color:#70ddff;box-shadow:0 9px 24px rgba(71,215,255,.22),inset 0 0 18px rgba(71,215,255,.12)}
.admin-nav .nav-icon{font-size:1.05rem;filter:drop-shadow(0 0 5px rgba(71,215,255,.35))}
@media(max-width:760px){.admin-nav{width:44px;height:44px;padding:0;border-radius:12px}.admin-nav .nav-label{display:none}.admin-nav .nav-icon{font-size:1.2rem}}

/* V8: profilo completo e gestione partite */
.profile-wide{width:min(760px,96vw);text-align:left}.profile-head{display:flex;align-items:center;gap:1.2rem}.profile-head .profile-avatar{margin:0;width:120px;height:120px;flex:0 0 auto}.profile-head h2{margin:.25rem 0}.profile-head p{color:var(--muted);margin:0}.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:.65rem;margin:1.2rem 0}.profile-stats>div{text-align:center;padding:.9rem;border:1px solid #1b5978;border-radius:14px;background:#061f34}.profile-stats b,.profile-stats small{display:block}.profile-stats b{font-size:1.6rem;color:var(--cyan)}.profile-stats small{color:var(--muted)}.xp-track{height:22px;border-radius:99px;background:#041827;border:1px solid #23617f;overflow:hidden;position:relative;margin-bottom:1.3rem}.xp-track span{height:100%;display:block;background:linear-gradient(90deg,var(--cyan),var(--green));transition:.4s}.xp-track b{position:absolute;inset:0;text-align:center;font-size:.75rem;line-height:20px;color:#fff;text-shadow:0 1px 2px #000}.profile-history{display:grid;gap:.45rem}.profile-game{display:grid;grid-template-columns:36px 1fr auto;gap:.7rem;align-items:center;padding:.7rem;border:1px solid #174b67;border-radius:12px;background:#061f34}.profile-game b,.profile-game small{display:block}.profile-game small{color:var(--muted)}.profile-game em{font-style:normal;font-weight:800}.profile-game.victory em{color:var(--green)}.profile-game.defeat em{color:var(--red)}.avatar-settings{margin-top:1rem;padding:.8rem;border:1px solid #174b67;border-radius:12px}.avatar-settings summary{cursor:pointer;font-weight:800}.admin-filters{display:grid;grid-template-columns:180px 180px 1fr auto;gap:.5rem;margin:1rem 0}.admin-filters select,.admin-filters input{width:100%;padding:.75rem;border-radius:10px;border:1px solid #285e79;background:#041a2b;color:#fff}.status-pill{display:inline-block;padding:.25rem .55rem;border-radius:99px;background:#16435c}.status-pill.playing{background:#155d3e;color:#8fffc5}.status-pill.finished{background:#3b3f55}.status-pill.cancelled{background:#692334;color:#ffc2cb}.status-pill.placing{background:#72591a;color:#ffe49a}@media(max-width:650px){.profile-head{align-items:flex-start}.profile-head .profile-avatar{width:86px;height:86px}.profile-stats{grid-template-columns:1fr 1fr}.profile-game{grid-template-columns:30px 1fr}.profile-game em{grid-column:2}.admin-filters{grid-template-columns:1fr}}


/* V9: classifica pubblica, nickname mascherati e stagioni */
.leaderboard-modal{width:min(900px,96vw);max-width:900px}.rank-tabs{display:flex;gap:.5rem;margin:1rem 0;flex-wrap:wrap}.rank-tabs button.active{background:linear-gradient(135deg,#8d3cff,#4b7dff);border-color:#bca8ff}.rank-info{color:var(--muted);margin-bottom:.8rem}.rank-podium{display:grid;grid-template-columns:repeat(3,1fr);gap:.8rem;align-items:end;margin:1rem 0 1.3rem}.podium-card{display:grid;justify-items:center;gap:.35rem;padding:1rem;border:1px solid #235c7a;border-radius:18px;background:linear-gradient(180deg,#0a304d,#061b2d);text-align:center}.podium-card.p1{order:2;transform:translateY(-12px);border-color:#ffc857;box-shadow:0 0 30px #ffc85722}.podium-card.p2{order:1}.podium-card.p3{order:3}.podium-card>span{font-size:2rem}.podium-card img,.rank-row img{width:56px;height:56px;border-radius:50%;object-fit:cover;border:2px solid #45dfff}.podium-card strong{color:var(--gold)}.rank-list{display:grid;gap:.45rem}.rank-row{display:grid;grid-template-columns:48px 48px 1fr auto;align-items:center;gap:.7rem;padding:.7rem .85rem;border:1px solid #174b67;border-radius:13px;background:#061f34}.rank-row img{width:42px;height:42px}.rank-row span small{display:block;color:var(--muted);margin-top:.15rem}.rank-row strong{color:var(--cyan)}.rank-row.is-me,.podium-card.is-me{outline:2px solid var(--green);box-shadow:0 0 24px #42ec9b22}.rank-loading,.rank-empty{text-align:center;color:var(--muted);padding:2rem}.leaderboard-privacy{display:flex;gap:.65rem;align-items:center;margin:1rem 0;padding:.8rem;border:1px solid #1b5978;border-radius:12px;background:#061f34}.leaderboard-privacy input{width:20px;height:20px;margin:0}.leaderboard-privacy span{font-weight:700}@media(max-width:650px){.rank-podium{grid-template-columns:1fr}.podium-card.p1,.podium-card.p2,.podium-card.p3{order:initial;transform:none}.rank-row{grid-template-columns:38px 40px 1fr}.rank-row strong{grid-column:3}.rank-tabs button{flex:1}.leaderboard-modal{padding:1rem}}


/* V10 Social & Tornei */
.social-wide,.tournament-wide{width:min(960px,94vw);max-height:90vh;overflow:auto}.social-search,.tournament-form{display:grid;grid-template-columns:1fr auto;gap:10px;margin:16px 0}.social-columns{display:grid;grid-template-columns:1fr 1fr;gap:18px}.social-list{display:grid;gap:9px;margin:10px 0 18px}.social-row{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid rgba(126,202,255,.18);background:rgba(3,25,45,.58);border-radius:14px}.social-row img{width:42px;height:42px;border-radius:50%;object-fit:cover}.social-row>div{flex:1;display:grid}.social-row small{opacity:.72}.social-row select{max-width:110px}.tournament-form{grid-template-columns:2fr 1fr 1fr auto}.tournament-list{display:grid;gap:14px;margin-top:20px}.tournament-card{padding:16px;border-radius:16px;border:1px solid rgba(126,202,255,.18);background:linear-gradient(145deg,rgba(4,33,58,.94),rgba(3,20,37,.94));display:grid;grid-template-columns:1.4fr 1fr auto;gap:14px;align-items:center}.tournament-card h3{margin:6px 0}.tournament-card p{margin:0;opacity:.72}.tournament-players{display:grid;gap:4px;font-size:.9rem}.tournament-actions{display:flex;gap:8px;flex-wrap:wrap}.tournament-state{text-transform:uppercase;font-size:.72rem;padding:4px 8px;border-radius:999px;background:#1d5e85}.tournament-state.ready{background:#886d12}.tournament-state.running{background:#177a52}@media(max-width:720px){header nav{gap:5px}#socialBtn,#tournamentBtn{font-size:0;padding:9px}#socialBtn::first-letter,#tournamentBtn::first-letter{font-size:18px}.social-columns{grid-template-columns:1fr}.social-row{flex-wrap:wrap}.social-row>div{min-width:130px}.tournament-form{grid-template-columns:1fr}.tournament-card{grid-template-columns:1fr}.tournament-actions button{flex:1}}


/* V10.3: evento nave affondata */
.log .sunk{border-left:3px solid var(--gold);background:linear-gradient(90deg,rgba(255,200,87,.16),#061d30)}
.hit-celebration small{display:block;margin-top:.25rem;color:#bfefff;font-weight:700}
.hit-celebration.sunk-celebration{border-color:var(--gold);background:linear-gradient(135deg,rgba(74,26,10,.97),rgba(8,30,47,.97));box-shadow:0 0 65px rgba(255,130,40,.58);animation:sunkCelebration 2.6s ease both}
.hit-celebration.sunk-celebration b{color:var(--gold);font-size:clamp(1.7rem,6vw,3.4rem);text-shadow:0 0 18px rgba(255,122,30,.9)}
.hit-celebration.sunk-celebration img{border-color:var(--gold);box-shadow:0 0 24px rgba(255,200,87,.55)}
@keyframes sunkCelebration{0%{opacity:0;transform:translate(-50%,-50%) scale(.45) rotate(-3deg)}12%{opacity:1;transform:translate(-50%,-50%) scale(1.08) rotate(2deg)}24%,80%{transform:translate(-50%,-50%) scale(1) rotate(0)}100%{opacity:0;transform:translate(-50%,-58%) scale(.9)}}

/* V11 Ultimate */
.torpedo{position:absolute;left:0;top:0;width:34px;height:8px;border-radius:99px;background:linear-gradient(90deg,#fff,#7ee7ff 45%,#168bd8);box-shadow:0 0 16px #67dcff;z-index:8;pointer-events:none;transform:translate(-40px,-20px) rotate(15deg);animation:torpedo-flight .55s ease-in forwards}.board{position:relative}.torpedo:after{content:"";position:absolute;right:100%;top:2px;width:55px;height:4px;background:linear-gradient(90deg,transparent,#b9f4ff)}.torpedo.explode{width:54px;height:54px;border-radius:50%;background:radial-gradient(circle,#fff 0,#ffd84c 18%,#ff6a00 44%,transparent 70%);animation:impact .55s ease-out forwards}.torpedo.splash{width:50px;height:50px;border-radius:50%;background:radial-gradient(circle,transparent 20%,#7de8ff 24%,transparent 55%);animation:impact .55s ease-out forwards}@keyframes torpedo-flight{to{transform:translate(var(--tx),var(--ty)) rotate(15deg)}}@keyframes impact{from{transform:translate(var(--tx),var(--ty)) scale(.3);opacity:1}to{transform:translate(var(--tx),var(--ty)) scale(1.7);opacity:0}}
.result-card{max-width:720px;text-align:center}.result-duel{display:flex;align-items:center;justify-content:center;gap:28px;margin:22px 0}.result-duel div{display:grid;gap:8px}.result-duel img{width:88px;height:88px;border-radius:50%;object-fit:cover;border:3px solid #58d7ff}.result-duel strong{font-size:1.5rem;color:#ffcf55}.result-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.result-stats div{padding:14px;border:1px solid #25516c;border-radius:14px;background:#071f32}.result-stats b{display:block;font-size:1.5rem}.result-stats small{opacity:.7}.result-actions{display:flex;gap:10px;justify-content:center;margin:20px 0;flex-wrap:wrap}.replay-stage{margin-top:16px}.replay-stage .board{max-width:420px;margin:auto}.tutorial-card{max-width:520px;text-align:center}.tutorial-visual{font-size:5rem;margin:20px}.tutorial-progress{height:8px;background:#0a263b;border-radius:99px;overflow:hidden;margin:20px 0}.tutorial-progress span{display:block;height:100%;background:linear-gradient(90deg,#29c5ff,#5eff9b);transition:.3s}@media(max-width:600px){.result-stats{grid-template-columns:repeat(2,1fr)}.result-duel{gap:14px}.result-duel img{width:68px;height:68px}}
/* V13 Mobile & International */
.nav-select{min-height:42px;border-radius:12px;background:#082b45;color:#fff;border:1px solid #1e6385;padding:.55rem}.v13-home{display:flex;justify-content:space-between;align-items:center;gap:2rem;margin-bottom:1rem;overflow:hidden}.v13-home h1{margin:.35rem 0;font-size:clamp(1.8rem,4vw,3.1rem)}.home-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1rem}.home-status{display:grid;grid-template-columns:repeat(3,minmax(80px,1fr));gap:.65rem;min-width:min(380px,100%)}.home-status div{padding:1rem;border:1px solid #1b607f;border-radius:18px;text-align:center;background:rgba(0,25,45,.55)}.home-status b{display:block;font-size:1.7rem}.home-status small{opacity:.75}.site-footer{display:flex;justify-content:center;align-items:center;gap:1rem;flex-wrap:wrap;padding:1.5rem .5rem;color:#9dc8dc}.site-footer a,.site-footer button{background:none;border:0;color:#a9dcf2;text-decoration:none}.account-card{max-width:560px}.account-actions{display:flex;gap:.75rem;flex-wrap:wrap;margin:1rem 0}.settings-row{display:block;padding:.8rem 0;border-top:1px solid rgba(255,255,255,.08)}.legal-page{max-width:850px;margin:5vh auto;padding:clamp(1.2rem,4vw,3rem)}body.light-mode .sea{display:none}body.light-mode{background:#071e2c}body.light-mode .card{box-shadow:none}body.reduced-motion *,body.reduced-motion *:before,body.reduced-motion *:after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}.lite-mode .sea,.lite-mode .torpedo,.lite-mode .hit-celebration{display:none!important}.lite-mode .card{backdrop-filter:none!important}.lite-mode *{box-shadow:none!important}
@media(max-width:780px){.v13-home{display:block}.home-status{margin-top:1rem}.nav-select{max-width:72px}.site-footer{font-size:.85rem}}

/* =========================================================
   V14 GRAPHIC OVERHAUL — premium naval HUD inspired by mockup
   ========================================================= */
:root{--v14-deep:#010916;--v14-panel:rgba(3,20,37,.94);--v14-panel2:rgba(4,31,54,.92);--v14-line:#0a8ccc;--v14-cyan:#58dcff;--v14-green:#34f18b;--v14-red:#ff513f;--v14-orange:#ff8b25;--v14-gold:#ffd35d}
body.v14-theme{background:radial-gradient(circle at 50% -15%,#0d5682 0,transparent 34%),linear-gradient(180deg,#020b18 0,#02121f 50%,#00060e 100%);font-family:"Arial Narrow",Inter,system-ui,sans-serif;letter-spacing:.015em}
body.v14-theme:before{content:"";position:fixed;inset:0;z-index:-3;background:linear-gradient(rgba(0,15,28,.2),rgba(0,8,17,.82)),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='100' viewBox='0 0 220 100'%3E%3Cpath d='M0 55 Q55 20 110 55 T220 55 V100 H0Z' fill='%230d5270' fill-opacity='.22'/%3E%3Cpath d='M0 72 Q55 38 110 72 T220 72' fill='none' stroke='%2333b5d8' stroke-opacity='.16'/%3E%3C/svg%3E");background-size:auto,440px 200px;background-position:center,bottom;animation:v14Ocean 18s linear infinite}
@keyframes v14Ocean{to{background-position:center,440px bottom}}
body.v14-theme .sea{opacity:.14;filter:drop-shadow(0 0 14px #0da9e0)}
body.v14-theme .shell{width:min(1640px,97%)}
body.v14-theme header{margin-top:12px;padding:12px 18px;border:1px solid rgba(64,199,255,.35);border-radius:10px;background:linear-gradient(180deg,rgba(3,25,45,.98),rgba(2,13,26,.96));box-shadow:0 0 0 1px #00101e inset,0 15px 45px #000a,0 0 24px #0b8fc033;position:sticky;top:8px;z-index:15}
body.v14-theme .brand>span{display:grid;place-items:center;width:58px;height:58px;border:2px solid #d8f3ff;clip-path:polygon(50% 0,94% 22%,94% 77%,50% 100%,6% 77%,6% 22%);font-size:2rem;text-shadow:0 0 12px #5bdfff}
body.v14-theme .brand b{font-size:clamp(1.2rem,2vw,2rem);font-weight:900;letter-spacing:.045em;text-shadow:0 2px 0 #001,0 0 10px #34bde055}
body.v14-theme .brand small{color:var(--v14-cyan);font-weight:800;letter-spacing:.18em;text-transform:uppercase}
body.v14-theme nav button,body.v14-theme .nav-btn,body.v14-theme .nav-select{border-radius:5px;border:1px solid #176a92;background:linear-gradient(180deg,#0a3556,#041a2e);box-shadow:inset 0 0 0 1px #ffffff0b,0 5px 14px #0008;text-transform:uppercase;font-weight:800;letter-spacing:.04em}
body.v14-theme nav button:hover,body.v14-theme .nav-btn:hover{border-color:#59ddff;box-shadow:0 0 20px #21b9f044,inset 0 0 14px #1e9dd522}
body.v14-theme #audioBtn{background:linear-gradient(180deg,#153249,#071c2b)}
body.v14-theme #rankBtn{background:linear-gradient(180deg,#214f79,#092840)}
body.v14-theme #socialBtn{background:linear-gradient(180deg,#14884e,#07532f)}
body.v14-theme .admin-nav{background:linear-gradient(180deg,#263f58,#0c1f31)}
body.v14-theme .profile-mini{padding:2px;border-radius:7px;background:#08263c}
body.v14-theme .profile-mini img{width:44px;height:44px;border-radius:50%;border:2px solid var(--v14-cyan);box-shadow:0 0 13px #2dd2ff88}
body.v14-theme .card{border-radius:7px;background:linear-gradient(145deg,var(--v14-panel2),var(--v14-panel));border:1px solid rgba(42,178,233,.42);box-shadow:inset 0 0 0 1px #00131f,0 15px 40px #0009,0 0 24px #0c7fb11c;backdrop-filter:blur(10px)}
body.v14-theme .card:before{content:"";position:absolute;inset:5px;pointer-events:none;border:1px solid rgba(62,195,245,.10);border-radius:4px}
body.v14-theme .card{position:relative}
body.v14-theme h1,body.v14-theme h2,body.v14-theme h3{text-transform:uppercase;letter-spacing:.035em}
body.v14-theme .eyebrow{color:#69ddff;text-shadow:0 0 8px #18aee588}
body.v14-theme .v13-home{background:linear-gradient(110deg,rgba(4,34,58,.98),rgba(2,15,28,.96));border-color:#188cc0}
body.v14-theme .home-status div{border-radius:5px;background:linear-gradient(#062943,#031827);border-color:#166d93}
body.v14-theme .primary{border:1px solid #2ab9fa;background:linear-gradient(180deg,#147ed7,#064fa2);box-shadow:inset 0 0 10px #6de3ff33,0 0 14px #1188d244}
body.v14-theme .match{background:linear-gradient(180deg,#ff9a28,#bd4d10);border:1px solid #ffc058}
body.v14-theme .gamebar{padding:10px 14px;display:grid;grid-template-columns:auto 1fr auto;background:linear-gradient(90deg,#03182a,#062c48 48%,#03182a)}
body.v14-theme .statusbox{min-width:230px;padding:8px 14px;border:1px solid #176d93;background:#031827;text-align:left}
body.v14-theme .statusbox span{color:var(--v14-gold)}
body.v14-theme .statusbox b{color:var(--v14-green);text-transform:uppercase;text-shadow:0 0 12px #2df48d77}
body.v14-theme .v14-battle{grid-template-columns:minmax(360px,1fr) minmax(360px,1fr) minmax(285px,340px);gap:10px;align-items:start}
body.v14-theme .board-card{padding:14px 14px 18px;overflow:visible}
body.v14-theme .board-title{border-bottom:1px solid #176d93;padding:0 4px 10px;margin-bottom:12px;text-align:center}
body.v14-theme .board-title h3{font-size:1.35rem;color:#dff8ff;text-shadow:0 0 10px #49d4ff77}
body.v14-theme .enemy .board-title h3{color:#ff756c;text-shadow:0 0 10px #ff4d4577}
body.v14-theme .board{border:2px solid #1396d0;background-color:#03253d;background-image:linear-gradient(rgba(31,137,181,.15) 1px,transparent 1px),linear-gradient(90deg,rgba(31,137,181,.15) 1px,transparent 1px),radial-gradient(circle at 25% 25%,#0b5575aa,transparent 35%),repeating-radial-gradient(ellipse at 50% 120%,#0d5a7a 0 1px,transparent 2px 20px);box-shadow:inset 0 0 35px #001321,0 0 0 5px #031422,0 0 0 6px #166d93,0 0 24px #0caee04d;overflow:visible}
body.v14-theme .cell{border-color:rgba(42,157,207,.58);transition:background .15s,filter .15s,transform .15s}
body.v14-theme .cell:before{content:attr(data-coord);position:absolute;left:3px;top:2px;font-size:clamp(.34rem,.55vw,.52rem);color:#9edaf1;opacity:.34;pointer-events:none}
body.v14-theme .cell:hover{background:#2ad4ff2b;box-shadow:inset 0 0 14px #43dfff;z-index:2}
body.v14-theme .cell.ship{background:linear-gradient(90deg,#263b47 0,#a9c2cd 25%,#314854 55%,#101d24 100%);box-shadow:inset 0 2px 0 #d7e5eb,inset 0 -2px 0 #0a1115,0 0 7px #aeefff66}
body.v14-theme .cell.ship:after{content:"⚓";position:absolute;inset:0;display:grid;place-items:center;color:#d4e6ed;font-size:clamp(.55rem,1vw,.9rem);opacity:.65;text-shadow:0 1px 2px #000}
body.v14-theme .cell.hit{background:radial-gradient(circle,#fff 0 7%,#ffda39 10%,#ff5a19 26%,#8c1515 46%,#310709 70%);box-shadow:inset 0 0 18px #ff9228,0 0 16px #ff4a22;z-index:3}
body.v14-theme .cell.hit:after{content:"✕";color:#fff1d1;font-weight:900;text-shadow:0 0 8px #ffdb43;font-size:clamp(1rem,2vw,2rem)}
body.v14-theme .cell.miss:after{content:"";width:40%;height:40%;border:3px solid #d9f8ff;border-radius:50%;place-self:center;box-shadow:0 0 8px #63ddff,inset 0 0 6px #63ddff;background:#ffffff08}
body.v14-theme .intel{padding:12px;min-height:620px;background:linear-gradient(180deg,#052b47,#031827)}
body.v14-theme .intel>.eyebrow{display:block;padding:9px 10px;border:1px solid #176d93;background:#041d31;margin:0 0 7px;color:#b8eaff}
body.v14-theme .log,body.v14-theme .chat{max-height:205px}
body.v14-theme .log div,body.v14-theme .chat div{border-radius:3px;border:1px solid #104663;background:#031827;padding:.65rem}
body.v14-theme .log .hit{color:#ff7468;border-left:4px solid var(--v14-red)}
body.v14-theme .log .sunk{color:#ffd15d;border-left:4px solid var(--v14-gold)}
body.v14-theme .ability-bar button{border-radius:3px;background:linear-gradient(#0a3555,#041a2b)}
body.v14-theme .ship-picker .ship-choice{border-radius:4px;background:linear-gradient(#102f44,#061a28)}
body.v14-theme .waiting-room{text-align:center;border-color:#1ab4e8;box-shadow:0 0 40px #0c9ed044}
body.v14-theme .room-code-box{border-radius:4px;background:#02111e;border:1px solid #1786b6}
body.v14-theme .site-footer span:before{content:""}
body.v14-theme .modal-card{border-color:#1fa6dc;box-shadow:0 0 60px #0a7ca855,0 20px 80px #000d}
body.v14-theme .hit-celebration{border-radius:6px}
body.v14-theme .hit-celebration.sunk-celebration:after{content:"⚓ NAVE DISTRUTTA";display:block;color:#ffd35d;font-weight:900;letter-spacing:.15em;margin-top:8px}

/* Mobile dashboard styled like the mockup phone */
@media(max-width:1100px){body.v14-theme .v14-battle{grid-template-columns:1fr 1fr}body.v14-theme .intel{grid-column:1/-1;min-height:auto;display:grid;grid-template-columns:1fr 1fr;gap:10px}body.v14-theme .intel>.eyebrow,body.v14-theme .intel form,body.v14-theme .quick-chat,body.v14-theme #rematchBtn{grid-column:1/-1}}
@media(max-width:760px){body.v14-theme .shell{width:100%;padding:0 8px 70px}body.v14-theme header{top:0;margin:0 -8px;border-radius:0;padding:8px;display:grid;grid-template-columns:1fr auto}body.v14-theme .brand>span{width:39px;height:39px;font-size:1.3rem}body.v14-theme .brand b{font-size:1rem}body.v14-theme .brand small{font-size:.55rem}body.v14-theme nav{justify-content:flex-end}body.v14-theme nav button,body.v14-theme .nav-btn,body.v14-theme .nav-select{padding:.55rem;font-size:0;min-width:40px}body.v14-theme nav button::first-letter,body.v14-theme .nav-btn .nav-icon{font-size:1rem}body.v14-theme #userBox{display:none}body.v14-theme .profile-mini img{width:34px;height:34px}body.v14-theme .v14-battle{display:flex;flex-direction:column}body.v14-theme .enemy{order:-3;width:100%}body.v14-theme .own{order:-1;width:100%}body.v14-theme .intel{order:-2;width:100%;display:block;min-height:auto}body.v14-theme .own{display:none}body.v14-theme .intel .chat,body.v14-theme .intel #chatForm,body.v14-theme .intel .quick-chat{display:none}body.v14-theme .gamebar{position:sticky;top:56px;z-index:12;grid-template-columns:auto 1fr;padding:7px}body.v14-theme .gamebar .statusbox{grid-column:1/-1;min-width:0;margin-top:6px;display:flex;justify-content:space-between;align-items:center}body.v14-theme .board-card{padding:10px}body.v14-theme .board-title h3{font-size:1.2rem}body.v14-theme .cell:before{display:none}body.v14-theme .touch-hint{padding:13px;border:1px solid #176d93;background:#031827;color:#a8e8ff;font-size:1rem;font-weight:800;text-transform:uppercase}body.v14-theme .ability-bar{grid-template-columns:repeat(3,1fr)}body.v14-theme .intel{max-height:230px;overflow:auto}body.v14-theme .site-footer{position:fixed;bottom:0;left:0;right:0;z-index:14;background:#031624;border-top:1px solid #176d93;padding:.7rem}body.v14-theme .site-footer span{display:none}}


/* ==========================================================
   V14.5 PREMIUM UI — cinematic polish, themes and mobile HUD
   ========================================================== */
:root{--premium-cyan:#42dcff;--premium-blue:#087fb4;--premium-deep:#010b15;--premium-glass:rgba(3,25,43,.86);--premium-line:rgba(71,212,255,.32)}
body.v145-premium{background:#010a13;color:#e9f8ff;min-height:100dvh}
body.v145-premium:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:-3;background:radial-gradient(circle at 50% -10%,rgba(20,126,181,.28),transparent 42%),linear-gradient(180deg,#020914 0,#031b2b 48%,#01070d 100%)}
body.v145-premium .sea{position:fixed;inset:0;z-index:-2;opacity:.78;background-image:linear-gradient(180deg,transparent 42%,rgba(2,60,88,.3)),repeating-radial-gradient(ellipse at 50% 105%,transparent 0 24px,rgba(31,167,211,.12) 25px 27px,transparent 28px 50px);animation:premiumSea 16s linear infinite}
body.v145-premium .sea:after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,rgba(80,209,255,.06) 50%,transparent 65%);animation:premiumSweep 9s ease-in-out infinite}
@keyframes premiumSea{50%{transform:translateY(-9px) scale(1.015)}}
@keyframes premiumSweep{0%,100%{transform:translateX(-30%)}50%{transform:translateX(30%)}}
body.v145-premium header{border:1px solid var(--premium-line);background:linear-gradient(180deg,rgba(5,35,57,.97),rgba(2,17,30,.94));box-shadow:0 12px 40px #0009,inset 0 1px 0 #77dfff22;backdrop-filter:blur(14px)}
body.v145-premium header:after{content:"";position:absolute;left:1.25rem;right:1.25rem;bottom:-1px;height:1px;background:linear-gradient(90deg,transparent,#47d8ff,transparent);filter:drop-shadow(0 0 7px #36d2ff)}
body.v145-premium .brand>span{background:linear-gradient(145deg,#123e59,#03131f);border-color:#8ee8ff;box-shadow:inset 0 0 18px #37cfff33,0 0 20px #2dcfff25}
body.v145-premium .brand b{letter-spacing:.055em;text-shadow:0 0 18px #57dbff55}
body.v145-premium nav button,body.v145-premium .nav-btn,body.v145-premium .nav-select{position:relative;overflow:hidden;border:1px solid #1d7194;background:linear-gradient(180deg,#0c3b5d,#041c30);box-shadow:inset 0 1px 0 #8ee9ff22,0 5px 15px #0005}
body.v145-premium nav button:before,body.v145-premium .nav-btn:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 25%,#fff2 48%,transparent 70%);transform:translateX(-120%);transition:.55s}
body.v145-premium nav button:hover:before,body.v145-premium .nav-btn:hover:before{transform:translateX(120%)}
body.v145-premium .card{background:linear-gradient(155deg,rgba(6,40,64,.93),rgba(2,17,29,.95));border:1px solid var(--premium-line);box-shadow:0 18px 45px #0008,inset 0 1px 0 #b9f2ff12;backdrop-filter:blur(10px)}
body.v145-premium .card:after{content:"";position:absolute;inset:7px;pointer-events:none;border:1px solid rgba(51,169,211,.08)}
body.v145-premium .v14-battle{gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(245px,.55fr)}
body.v145-premium .board-card{padding:13px;background:linear-gradient(180deg,rgba(4,40,65,.96),rgba(1,15,26,.97))}
body.v145-premium .board-card:before{content:"";position:absolute;inset:4px;pointer-events:none;background:linear-gradient(90deg,var(--premium-cyan),transparent 20%) top left/45px 2px no-repeat,linear-gradient(180deg,var(--premium-cyan),transparent 20%) top left/2px 45px no-repeat,linear-gradient(270deg,var(--premium-cyan),transparent 20%) bottom right/45px 2px no-repeat,linear-gradient(0deg,var(--premium-cyan),transparent 20%) bottom right/2px 45px no-repeat;opacity:.68}
body.v145-premium .board{position:relative;background-image:linear-gradient(rgba(42,151,197,.22) 1px,transparent 1px),linear-gradient(90deg,rgba(42,151,197,.22) 1px,transparent 1px),radial-gradient(ellipse at 50% 120%,#13688b55,transparent 62%),url("ui/ocean-grid.svg");background-size:10% 10%,10% 10%,auto,cover;box-shadow:inset 0 0 48px #000b,0 0 0 1px #59dfff66,0 0 26px #00a9e833}
body.v145-premium .board:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent,rgba(44,187,231,.05) 48%,transparent);animation:radarScan 4.5s linear infinite}
@keyframes radarScan{from{transform:translateY(-100%)}to{transform:translateY(100%)}}
body.v145-premium .cell{isolation:isolate}
body.v145-premium .cell.ship{background:linear-gradient(180deg,#a8bdc7 0,#405762 22%,#162932 58%,#071219 100%);border-color:#8fc5d5;box-shadow:inset 0 2px 0 #edfaff88,inset 0 -2px 0 #000,0 0 8px #91dfff44}
body.v145-premium .cell.ship:after{content:"";inset:12%;position:absolute;background:url("ships/ship-segment.svg") center/contain no-repeat;filter:drop-shadow(0 2px 1px #000);opacity:.95}
body.v145-premium .cell.hit{animation:premiumHit .65s ease-out both}
body.v145-premium .cell.hit:before{content:"";position:absolute;inset:-45%;z-index:-1;background:url("ui/explosion.svg") center/contain no-repeat;animation:explosionPulse 1.1s ease-out both;opacity:.95}
body.v145-premium .cell.miss:before{content:"";position:absolute;inset:-32%;background:url("ui/splash.svg") center/contain no-repeat;animation:splashRise .9s ease-out both;z-index:2;pointer-events:none}
@keyframes premiumHit{0%{transform:scale(.82);filter:brightness(3)}55%{transform:scale(1.13)}100%{transform:scale(1)}}
@keyframes explosionPulse{0%{transform:scale(.2) rotate(-25deg);opacity:0}35%{opacity:1}100%{transform:scale(1.25) rotate(8deg);opacity:.35}}
@keyframes splashRise{0%{transform:scale(.2) translateY(20%);opacity:0}45%{opacity:1}100%{transform:scale(1.05) translateY(-7%);opacity:.45}}
body.v145-premium .intel{border-left-color:#38cfff;box-shadow:inset 8px 0 24px #0aa1d014,0 18px 45px #0008}
body.v145-premium .intel>.eyebrow{background:linear-gradient(90deg,#0d3c5d,#031a2b);box-shadow:inset 3px 0 0 var(--premium-cyan)}
body.v145-premium .statusbox b{color:#61ff9b;text-shadow:0 0 12px #38ff7b77}
body.v145-premium .energy{border:1px solid #20779b;background:#020f1a;box-shadow:inset 0 0 15px #000}
body.v145-premium .energy span{background:linear-gradient(90deg,#18a4e4,#4be5ff,#6cff9c);box-shadow:0 0 13px #49e4ff}
body.v145-premium .hit-celebration{background:radial-gradient(circle at 20% 50%,#134667,#041522 58%);border:1px solid #5ce4ff;box-shadow:0 0 55px #25d0ff66,0 25px 70px #000c}
body.v145-premium .hit-celebration.sunk-celebration{border-color:#ffc850;box-shadow:0 0 75px #ff8a2f88,0 25px 80px #000d}
body.v145-premium .modal{backdrop-filter:blur(10px);background:rgba(0,6,13,.78)}
body.v145-premium .modal-card{background:linear-gradient(145deg,#073251,#020f1a 68%);border:1px solid #48cfff;box-shadow:0 0 0 1px #09263a,0 0 70px #099ed955,0 30px 100px #000d}
body.v145-premium .rank-podium .podium-card{background:linear-gradient(165deg,#0b3b5b,#031421);border:1px solid #247da1}
body.v145-premium .primary{background:linear-gradient(180deg,#148bd2,#07548e);border-color:#62d9ff;box-shadow:inset 0 1px 0 #b8efff66,0 0 18px #0ea9df44}
body.v145-premium .danger-btn{background:linear-gradient(180deg,#c64038,#6f1718);box-shadow:0 0 15px #ff4a3c33}

/* Scenari: notte, tempesta, sonar */
body.theme-night:before{background:radial-gradient(circle at 76% 8%,rgba(126,189,255,.16),transparent 18%),linear-gradient(180deg,#01040b,#03182a 52%,#01060c)}
body.theme-storm .sea{filter:contrast(1.25) saturate(.8);animation-duration:5s}
body.theme-storm:before{background:linear-gradient(135deg,transparent 47%,rgba(213,241,255,.18) 49%,transparent 51%) 0 0/460px 460px,linear-gradient(180deg,#030811,#0a2635 45%,#01060b)}
body.theme-sonar:before{background:repeating-radial-gradient(circle at 50% 52%,rgba(45,255,178,.07) 0 2px,transparent 3px 90px),linear-gradient(180deg,#010d13,#03292a 55%,#010808)}
body.theme-sonar{--premium-cyan:#4dffbd;--premium-blue:#159b75;--premium-line:rgba(77,255,189,.3)}
body.lite-mode.v145-premium .sea:after,body.lite-mode.v145-premium .board:after,body.reduced-motion.v145-premium .sea,body.reduced-motion.v145-premium .board:after{animation:none!important}

/* Mobile: true game dock and tighter cinematic board */
@media(max-width:760px){
 body.v145-premium{padding-bottom:74px}
 body.v145-premium header{box-shadow:0 8px 30px #000b}
 body.v145-premium .v14-battle{gap:8px}
 body.v145-premium .enemy{border-color:#288db4}
 body.v145-premium .board{border-width:1px;box-shadow:inset 0 0 25px #000b,0 0 0 1px #4ed7ff66}
 body.v145-premium .intel{max-height:210px}
 body.v145-premium .site-footer{height:64px;display:grid;grid-template-columns:repeat(3,1fr);align-items:center;padding:4px 8px;background:linear-gradient(180deg,#05243a,#020e18);box-shadow:0 -10px 30px #000b}
 body.v145-premium .site-footer a,body.v145-premium .site-footer button{min-height:48px;border:0;background:transparent;color:#b9edff;font-size:.72rem;display:flex;align-items:center;justify-content:center;text-align:center}
 body.v145-premium .site-footer a:first-child:before{content:"☰ ";font-size:1.1rem}
 body.v145-premium .site-footer a:nth-child(2):before{content:"⚓ ";font-size:1.1rem}
 body.v145-premium .site-footer button:before{content:"⚙ ";font-size:1.1rem}
 body.v145-premium #themeBtn{display:inline-flex}
}

/* V15 Live Seasons and language visibility fix */
.language-control{display:flex;align-items:center;gap:6px;min-height:42px;padding:0 8px;border:1px solid rgba(63,224,255,.38);border-radius:12px;background:linear-gradient(180deg,rgba(11,52,85,.98),rgba(3,24,43,.98));box-shadow:inset 0 0 18px rgba(33,190,255,.08),0 0 14px rgba(0,175,255,.08)}
.language-control>span{font-size:16px;filter:drop-shadow(0 0 5px #3fe0ff)}
.nav-select{appearance:auto!important;min-width:108px;max-width:130px;height:38px;padding:0 6px!important;border:0!important;background:#071d32!important;color:#fff!important;font-weight:800!important;letter-spacing:.02em;opacity:1!important}
.nav-select option{background:#071d32;color:#fff}
.v15-overview{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:18px 0}
.v15-feature{width:100%;display:grid;grid-template-columns:auto 1fr;gap:18px;text-align:left;align-items:center;padding:22px;cursor:pointer;border-color:rgba(57,213,255,.28)}
.v15-feature:hover{transform:translateY(-2px);border-color:#39d5ff;box-shadow:0 14px 36px rgba(0,128,210,.22),inset 0 0 28px rgba(42,202,255,.05)}
.feature-icon{display:grid;place-items:center;width:72px;height:72px;border-radius:50%;font-size:34px;background:radial-gradient(circle,rgba(51,224,255,.22),rgba(5,32,55,.9) 68%);border:1px solid rgba(67,224,255,.45);box-shadow:0 0 30px rgba(0,192,255,.18)}
.v15-feature h2{margin:4px 0 7px}.v15-feature p{margin:0 0 12px;color:var(--muted)}
.feature-progress{height:8px;border-radius:99px;background:#031523;overflow:hidden;border:1px solid rgba(77,201,255,.2)}.feature-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#20d7ff,#30ed92);box-shadow:0 0 16px #20d7ff;transition:width .5s}
.league-badge{display:inline-flex;padding:5px 12px;border:1px solid #ffc95c;border-radius:999px;color:#ffe2a3;background:rgba(255,170,30,.1);font-weight:900;margin:5px 0}
.v15-modal{width:min(920px,94vw);max-height:88vh;overflow:auto}.season-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.season-summary>div{padding:16px;border:1px solid rgba(59,211,255,.22);border-radius:14px;background:rgba(4,28,49,.75)}.season-summary b,.season-summary small{display:block}.season-summary b{font-size:1.35rem;color:#6fffe0}.season-summary small{color:var(--muted);margin-top:4px}
.season-leaderboard{display:grid;gap:8px}.season-row{display:grid;grid-template-columns:50px 42px 1fr auto 90px;gap:10px;align-items:center;padding:10px 12px;border:1px solid rgba(72,194,240,.18);border-radius:12px;background:rgba(3,24,42,.72)}.season-row.mine{border-color:#4fffb0;background:rgba(20,119,89,.15)}.season-row img{width:36px;height:36px;border-radius:50%;object-fit:cover}.season-row strong{color:#63f1c1}.season-row small{color:var(--muted);text-align:right}
.campaign-map{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:18px}.campaign-node{display:grid;grid-template-columns:52px 1fr auto;gap:12px;align-items:center;padding:14px;border:1px solid rgba(61,204,255,.22);border-radius:15px;background:linear-gradient(145deg,rgba(6,36,60,.94),rgba(2,18,34,.94))}.campaign-node.complete{border-color:rgba(67,255,164,.45)}.campaign-node.locked{opacity:.48;filter:saturate(.45)}.mission-number{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;font-weight:1000;background:#082d4b;border:1px solid #2ccdf6;color:#dffaff;box-shadow:inset 0 0 14px rgba(36,203,255,.12)}.campaign-node.complete .mission-number{background:#0c5c48;border-color:#50ffb1}.campaign-node h3{margin:2px 0}.campaign-node small{color:var(--muted)}
@media(max-width:900px){.language-control{order:-3}.nav-select{min-width:94px}.v15-overview{grid-template-columns:1fr}.campaign-map{grid-template-columns:1fr}.season-row{grid-template-columns:42px 36px 1fr auto}.season-row small{display:none}}
@media(max-width:560px){.language-control{width:100%;justify-content:center}.nav-select{flex:1;max-width:none}.v15-feature{padding:16px;gap:12px}.feature-icon{width:56px;height:56px;font-size:27px}.season-summary{grid-template-columns:1fr 1fr}.campaign-node{grid-template-columns:44px 1fr}.campaign-node button{grid-column:1/-1;width:100%}}

/* V15.1 — icone SVG reali e navigazione mobile leggibile */
.nav-svg{width:22px;height:22px;display:block;flex:0 0 auto;object-fit:contain}
.language-control .globe-svg{width:24px;height:24px}
.nav-image-btn{gap:.45rem!important}
.profile-nav-label{font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.home-image-btn img{width:30px;height:30px;display:block;flex:0 0 auto}
.feature-icon img{width:36px;height:36px;display:block}
.site-footer a,.site-footer button{display:inline-flex;align-items:center;justify-content:center;gap:.45rem}
.site-footer img{width:24px;height:24px}

@media(max-width:760px){
  body.v14-theme header{display:block!important;padding:10px 10px 12px!important}
  body.v14-theme .brand{display:flex;min-height:54px;margin-bottom:10px}
  body.v14-theme .brand>span{width:46px!important;height:46px!important;font-size:1.5rem!important}
  body.v14-theme .brand b{font-size:1.12rem!important;line-height:1.1}
  body.v14-theme .brand small{font-size:.62rem!important}
  body.v14-theme nav{
    width:100%;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));
    gap:7px!important;align-items:stretch;justify-content:stretch!important
  }
  body.v14-theme .language-control{
    grid-column:1/-1;order:-20;width:100%;min-height:52px;padding:6px 12px;
    border:1px solid #1784b5;border-radius:14px;background:linear-gradient(180deg,#083b60,#031b30);
    display:flex;align-items:center;gap:10px
  }
  body.v14-theme .nav-select{
    min-width:0!important;max-width:none!important;width:100%!important;height:42px!important;
    font-size:1rem!important;padding:0 8px!important
  }
  body.v14-theme nav .nav-main{
    grid-column:span 2;min-width:0!important;height:82px!important;padding:8px 4px!important;
    display:flex!important;flex-direction:column;gap:6px!important;font-size:.68rem!important;
    line-height:1.05!important;white-space:normal;text-align:center;border-radius:12px!important
  }
  body.v14-theme nav .nav-main .nav-svg{width:29px;height:29px}
  body.v14-theme nav .nav-main span{display:block!important;font-size:.68rem!important}
  body.v14-theme nav .nav-utility{
    grid-column:span 1;min-width:0!important;height:48px!important;padding:5px!important;
    display:flex!important;flex-direction:column;gap:2px!important;font-size:.52rem!important
  }
  body.v14-theme nav .nav-utility .nav-svg{width:20px;height:20px}
  body.v14-theme nav .nav-utility span{display:block!important;font-size:.5rem!important}
  body.v14-theme #installBtn.hidden,body.v14-theme #adminBtn.hidden{display:none!important}
  body.v14-theme .admin-nav{width:auto!important}
  body.v14-theme .admin-nav .nav-label{display:block!important}
  body.v14-theme .profile-mini{border-color:#27d96f!important;background:linear-gradient(180deg,#086a38,#04351f)!important}
  body.v14-theme .profile-mini img{width:34px!important;height:34px!important;border-radius:50%}
  body.v14-theme .profile-nav-label{display:block!important;font-size:.68rem!important}
  body.v14-theme #userBox{display:none!important}
  .home-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important}
  .home-actions .home-image-btn{min-height:68px;padding:10px!important;display:flex;align-items:center;justify-content:center;gap:10px;font-size:1rem}
  .home-actions .home-image-btn[data-home-action="match"]{grid-column:1/-1}
  .home-image-btn img{width:32px;height:32px}
  .v15-feature .feature-icon{min-width:64px;width:64px;height:64px}
  .feature-icon img{width:38px;height:38px}
  body.v14-theme .site-footer{display:grid!important;grid-template-columns:repeat(3,1fr);gap:0!important;padding:0!important}
  body.v14-theme .site-footer a,body.v14-theme .site-footer button{
    min-height:64px;padding:7px 4px!important;display:flex!important;flex-direction:column;gap:4px!important;
    font-size:.65rem!important;border-right:1px solid #176d93!important
  }
  body.v14-theme .site-footer img{width:25px;height:25px}
}

@media(max-width:380px){
  body.v14-theme nav .nav-main{height:76px!important;font-size:.61rem!important}
  body.v14-theme nav .nav-main span{font-size:.61rem!important}
  body.v14-theme nav .nav-main .nav-svg{width:25px;height:25px}
}

/* V15.2 Mobile Compact — header ridotto e menu richiudibile */
.mobile-menu-toggle{display:none}
@media(max-width:760px){
  body.v14-theme{padding-bottom:68px}
  body.v14-theme header{
    display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:7px 10px;
    padding:7px 9px 8px!important;position:relative
  }
  body.v14-theme .brand{
    grid-column:1;grid-row:1;min-height:40px!important;margin:0!important;gap:7px!important
  }
  body.v14-theme .brand>span{width:36px!important;height:36px!important;font-size:1.15rem!important}
  body.v14-theme .brand b{font-size:1rem!important;white-space:nowrap}
  body.v14-theme .brand small{display:none!important}
  body.v14-theme nav{
    grid-column:1/-1;grid-row:2;width:100%;display:grid!important;
    grid-template-columns:minmax(0,1fr) 46px 46px 46px;gap:6px!important
  }
  body.v14-theme .language-control{
    grid-column:1;grid-row:1;order:0;width:auto!important;min-height:42px!important;
    padding:3px 8px!important;border-radius:11px!important
  }
  body.v14-theme .language-control .globe-svg{width:20px;height:20px}
  body.v14-theme .nav-select{height:34px!important;font-size:.88rem!important;padding:0 3px!important}
  body.v14-theme #audioBtn{
    display:flex!important;grid-column:2;grid-row:1;height:42px!important;min-height:42px!important;
    padding:4px!important;border-radius:11px!important
  }
  body.v14-theme #audioBtn .nav-svg{width:21px!important;height:21px!important}
  body.v14-theme #audioBtn span{display:none!important}
  body.v14-theme #profileBtn{
    display:flex!important;grid-column:3;grid-row:1;width:46px!important;height:42px!important;min-height:42px!important;
    padding:3px!important;border-radius:11px!important
  }
  body.v14-theme #profileBtn img{width:31px!important;height:31px!important}
  body.v14-theme #profileBtn .profile-nav-label{display:none!important}
  body.v14-theme .mobile-menu-toggle{
    display:flex!important;grid-column:4;grid-row:1;width:46px;height:42px;min-height:42px;
    padding:4px!important;border-radius:11px!important;align-items:center;justify-content:center
  }
  body.v14-theme .mobile-menu-toggle .nav-svg{width:23px;height:23px}
  body.v14-theme .mobile-menu-toggle span{display:none!important}
  body.v14-theme nav .nav-collapsible{display:none!important}
  body.v14-theme nav.mobile-expanded{
    grid-template-columns:repeat(3,minmax(0,1fr));padding-top:2px
  }
  body.v14-theme nav.mobile-expanded .language-control{grid-column:1/-1;grid-row:1}
  body.v14-theme nav.mobile-expanded #audioBtn{grid-column:auto;grid-row:2}
  body.v14-theme nav.mobile-expanded #profileBtn{grid-column:auto;grid-row:2;width:auto!important}
  body.v14-theme nav.mobile-expanded .mobile-menu-toggle{grid-column:auto;grid-row:2;width:auto}
  body.v14-theme nav.mobile-expanded .nav-collapsible:not(.hidden){
    display:flex!important;grid-column:span 1;height:58px!important;min-height:58px!important;
    padding:6px 3px!important;flex-direction:column;gap:3px!important;border-radius:11px!important;
    font-size:.59rem!important;line-height:1!important;text-align:center
  }
  body.v14-theme nav.mobile-expanded .nav-collapsible .nav-svg{width:23px!important;height:23px!important}
  body.v14-theme nav.mobile-expanded .nav-collapsible span{display:block!important;font-size:.58rem!important}
  body.v14-theme nav.mobile-expanded #themeBtn,
  body.v14-theme nav.mobile-expanded #lightModeBtn,
  body.v14-theme nav.mobile-expanded #installBtn{height:58px!important}
  body.v14-theme #userBox{display:none!important}
  body.v14-theme main{padding-top:0}
  body.v14-theme #gameHeader{margin-top:5px!important;padding:8px 10px!important}
  body.v14-theme #gameHeader h2{font-size:1rem!important;margin:.15rem 0!important}
  body.v14-theme #gameHeader .game-meta{gap:4px!important}
  body.v14-theme .v14-battle{margin-top:6px!important}
  body.v14-theme .board-card{padding:8px!important}
  body.v14-theme .board-title{margin-bottom:5px!important}
  body.v14-theme .board-title h3{font-size:.94rem!important}
  body.v14-theme .touch-hint{margin:6px 0 0!important;font-size:.75rem}
  body.v14-theme .site-footer{height:58px!important}
  body.v14-theme .site-footer a,body.v14-theme .site-footer button{min-height:56px!important}
}
@media(max-width:390px){
  body.v14-theme header{padding-inline:6px!important}
  body.v14-theme .brand b{font-size:.9rem!important}
  body.v14-theme nav{grid-template-columns:minmax(0,1fr) 42px 42px 42px}
  body.v14-theme #profileBtn,body.v14-theme .mobile-menu-toggle{width:42px!important}
}
/* V16 Cinematic & Progression */
body.v16-cinematic .sea{animation:v16Sea 12s ease-in-out infinite alternate}
@keyframes v16Sea{from{filter:hue-rotate(0deg) brightness(.85)}to{filter:hue-rotate(12deg) brightness(1.08)}}
.v16-progression{width:min(980px,94vw);max-height:90vh;overflow:auto}
.progression-loadout{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}
.progression-loadout>div,.progression-card{border:1px solid rgba(84,214,255,.28);background:linear-gradient(145deg,rgba(4,35,61,.94),rgba(3,19,36,.98));border-radius:16px;padding:14px}
.progression-loadout small,.progression-card small{display:block;color:#8db3c8;margin-top:4px}
.progression-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.progression-card{position:relative;min-height:150px;display:flex;flex-direction:column;gap:7px}
.progression-card.locked{filter:grayscale(.8);opacity:.58}
.progression-card.equipped{box-shadow:0 0 0 2px #48e6a7 inset,0 0 24px rgba(72,230,167,.18)}
.progression-card .reward-icon{font-size:30px}.progression-card button{margin-top:auto}
.campaign-chapter{grid-column:1/-1;padding:10px 12px;border-left:3px solid #42d6ff;color:#9beeff;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.tournament-bracket{display:grid;gap:8px;margin-top:12px}.bracket-match{display:grid;grid-template-columns:70px 1fr auto;gap:10px;align-items:center;padding:10px;border:1px solid rgba(94,214,255,.2);border-radius:12px;background:rgba(2,25,45,.7)}
.cinematic-flash{position:fixed;inset:0;pointer-events:none;z-index:9998;background:radial-gradient(circle at center,rgba(255,191,70,.55),transparent 38%);animation:v16Flash .55s ease-out forwards}@keyframes v16Flash{to{opacity:0;transform:scale(1.1)}}
@media(max-width:760px){.progression-loadout{grid-template-columns:repeat(2,1fr)}.progression-grid{grid-template-columns:1fr}.v16-progression{padding:18px}.bracket-match{grid-template-columns:58px 1fr}.bracket-match button{grid-column:1/-1}}
body.board-storm .board{background-image:radial-gradient(circle at 35% 25%,rgba(181,231,255,.18),transparent 16%),linear-gradient(145deg,#092b46,#061728)}
body.board-arctic .board{background-image:linear-gradient(150deg,rgba(207,246,255,.25),transparent 35%),linear-gradient(145deg,#0b4159,#08243c)}
body.torpedo-plasma .torpedo{filter:drop-shadow(0 0 10px #a657ff) hue-rotate(65deg)}
body.torpedo-gold .torpedo{filter:drop-shadow(0 0 11px #ffd84c) sepia(1) saturate(4)}

/* V16.1 Desktop Slim — ottimizzato per notebook 13/14 pollici */
@media (min-width:761px) and (max-width:1550px), (min-width:761px) and (max-height:900px){
  body.v14-theme .shell{width:min(1480px,98vw);padding-top:6px}
  body.v14-theme header{
    min-height:58px!important;padding:6px 10px!important;gap:10px!important;
    position:sticky;top:0;z-index:80;overflow:visible
  }
  body.v14-theme .brand{gap:7px!important;min-width:205px}
  body.v14-theme .brand>span{width:38px!important;height:38px!important;font-size:1.2rem!important}
  body.v14-theme .brand b{font-size:1rem!important;line-height:1!important}
  body.v14-theme .brand small{font-size:.54rem!important;line-height:1!important;margin-top:2px}
  body.v14-theme header nav{gap:6px!important;flex-wrap:nowrap!important;position:static}
  body.v14-theme .language-control{height:38px!important;min-height:38px!important;padding:3px 7px!important;border-radius:10px!important}
  body.v14-theme .language-control .globe-svg{width:18px;height:18px}
  body.v14-theme .nav-select{height:31px!important;min-width:82px!important;font-size:.78rem!important;padding:0 3px!important}
  body.v14-theme #audioBtn,body.v14-theme #profileBtn,body.v14-theme .mobile-menu-toggle{
    display:flex!important;height:38px!important;min-height:38px!important;border-radius:10px!important;padding:4px 8px!important
  }
  body.v14-theme #audioBtn span,body.v14-theme #profileBtn .profile-nav-label{display:none!important}
  body.v14-theme #audioBtn .nav-svg{width:20px!important;height:20px!important}
  body.v14-theme #profileBtn{width:42px!important;padding:2px!important}
  body.v14-theme #profileBtn img{width:30px!important;height:30px!important}
  body.v14-theme .mobile-menu-toggle{width:42px!important;align-items:center;justify-content:center}
  body.v14-theme .mobile-menu-toggle .nav-svg{width:21px!important;height:21px!important}
  body.v14-theme .mobile-menu-toggle span{display:none!important}
  body.v14-theme header nav .nav-collapsible{display:none!important}
  body.v14-theme header nav.mobile-expanded{
    position:absolute;right:8px;top:calc(100% + 5px);width:min(760px,calc(100vw - 28px));
    display:grid!important;grid-template-columns:repeat(4,minmax(120px,1fr));gap:7px!important;
    padding:10px!important;border:1px solid #1b769c;border-radius:14px;
    background:linear-gradient(155deg,rgba(3,29,49,.99),rgba(2,15,28,.99));
    box-shadow:0 18px 45px rgba(0,0,0,.55),0 0 24px rgba(42,202,255,.13)
  }
  body.v14-theme header nav.mobile-expanded .language-control,
  body.v14-theme header nav.mobile-expanded #audioBtn,
  body.v14-theme header nav.mobile-expanded #profileBtn,
  body.v14-theme header nav.mobile-expanded .mobile-menu-toggle{display:none!important}
  body.v14-theme header nav.mobile-expanded .nav-collapsible:not(.hidden){
    display:flex!important;min-width:0!important;height:52px!important;padding:6px 9px!important;
    align-items:center!important;justify-content:flex-start!important;gap:8px!important;
    font-size:.72rem!important;border-radius:10px!important
  }
  body.v14-theme header nav.mobile-expanded .nav-collapsible .nav-svg{width:22px!important;height:22px!important}
  body.v14-theme header nav.mobile-expanded .nav-collapsible span{display:block!important;font-size:.7rem!important;white-space:nowrap}
  body.v14-theme #userBox{display:none!important}
  body.v14-theme .gamebar{padding:7px 9px!important;min-height:48px!important;margin-top:6px!important}
  body.v14-theme .gamebar h2{font-size:1rem!important;margin:.08rem 0!important}
  body.v14-theme .gamebar .eyebrow{font-size:.58rem!important}
  body.v14-theme .statusbox{padding:4px 8px!important;min-height:36px!important}
  body.v14-theme .v14-battle{margin-top:7px!important;gap:8px!important}
  body.v14-theme .board-card{padding:8px!important}
  body.v14-theme .board-title{margin-bottom:5px!important}
  body.v14-theme .board-title h3{font-size:.95rem!important}
  body.v14-theme .intel{padding:9px!important}
}

/* Durante una partita il ponte di comando diventa ancora più discreto. */
@media (min-width:761px) and (max-width:1550px), (min-width:761px) and (max-height:900px){
  body.battle-active.v14-theme header{min-height:48px!important;padding-top:4px!important;padding-bottom:4px!important}
  body.battle-active.v14-theme .brand>span{width:32px!important;height:32px!important;font-size:1rem!important}
  body.battle-active.v14-theme .brand b{font-size:.9rem!important}
  body.battle-active.v14-theme .brand small{display:none!important}
  body.battle-active.v14-theme .language-control{display:none!important}
  body.battle-active.v14-theme #audioBtn,body.battle-active.v14-theme #profileBtn,body.battle-active.v14-theme .mobile-menu-toggle{height:34px!important;min-height:34px!important}
  body.battle-active.v14-theme main{padding-top:0!important}
}

/* V16.1.1 refresh feedback */
#refreshBtn.is-refreshing{opacity:.75;pointer-events:none}
#refreshBtn.is-refreshing::first-letter{animation:bn-refresh-spin .7s linear infinite}
@keyframes bn-refresh-spin{to{transform:rotate(360deg)}}


/* V16.2 — Campo di gioco compatto per notebook e migliore visibilità */
@media (min-width:1101px) and (max-width:1550px), (min-width:1101px) and (max-height:900px){
  body.v14-theme .v14-battle{
    grid-template-columns:minmax(360px,500px) minmax(360px,500px) minmax(230px,280px)!important;
    justify-content:center!important;align-items:start!important;gap:8px!important
  }
  body.v14-theme .board-card{display:flex;flex-direction:column;align-items:center;min-width:0}
  body.v14-theme .board-title{width:100%}
  body.v14-theme .board{width:min(100%,500px)!important;max-width:500px!important}
  body.v14-theme .intel{min-width:0;max-height:calc(100vh - 145px);overflow:auto}
}
@media (min-width:1101px) and (max-height:780px){
  body.v14-theme .board{width:min(100%,440px)!important;max-width:440px!important}
  body.v14-theme .v14-battle{grid-template-columns:minmax(340px,440px) minmax(340px,440px) minmax(220px,270px)!important}
  body.v14-theme .gamebar{margin-bottom:4px!important}
}
@media (min-width:761px) and (max-width:1100px){
  body.v14-theme .board{max-width:520px!important;margin-inline:auto}
}

/* V16.3 Top Bar Ultra Slim — più spazio al gioco su notebook */
@media (min-width:761px) and (max-width:1700px), (min-width:761px) and (max-height:1000px){
  body.v14-theme .shell{padding-top:2px!important}
  body.v14-theme header{
    min-height:44px!important;height:44px!important;padding:3px 7px!important;gap:7px!important;
    border-radius:0 0 11px 11px!important
  }
  body.v14-theme .brand{min-width:172px!important;gap:5px!important;height:36px!important}
  body.v14-theme .brand>span{width:29px!important;height:29px!important;font-size:.92rem!important;border-radius:8px!important}
  body.v14-theme .brand b{font-size:.84rem!important;line-height:1!important;letter-spacing:.035em!important}
  body.v14-theme .brand small{display:none!important}
  body.v14-theme header nav{gap:4px!important;height:36px!important;margin-left:auto!important}
  body.v14-theme .language-control{
    height:32px!important;min-height:32px!important;max-width:112px!important;padding:1px 5px!important;
    border-radius:8px!important;gap:4px!important
  }
  body.v14-theme .language-control .globe-svg{width:15px!important;height:15px!important}
  body.v14-theme .nav-select{height:27px!important;min-width:65px!important;max-width:82px!important;font-size:.68rem!important;padding:0 1px!important}
  body.v14-theme #audioBtn,body.v14-theme #profileBtn,body.v14-theme .mobile-menu-toggle{
    width:34px!important;height:32px!important;min-width:34px!important;min-height:32px!important;
    padding:2px!important;border-radius:8px!important
  }
  body.v14-theme #audioBtn .nav-svg,body.v14-theme .mobile-menu-toggle .nav-svg{width:17px!important;height:17px!important}
  body.v14-theme #profileBtn img{width:25px!important;height:25px!important}
  body.v14-theme header nav.mobile-expanded{
    top:47px!important;right:5px!important;width:min(690px,calc(100vw - 20px))!important;
    grid-template-columns:repeat(4,minmax(105px,1fr))!important;padding:7px!important;gap:5px!important
  }
  body.v14-theme header nav.mobile-expanded .nav-collapsible:not(.hidden){
    height:43px!important;min-height:43px!important;padding:4px 7px!important;font-size:.65rem!important
  }
  body.v14-theme header nav.mobile-expanded .nav-collapsible .nav-svg{width:18px!important;height:18px!important}
  body.v14-theme header nav.mobile-expanded .nav-collapsible span{font-size:.63rem!important}
  body.v14-theme .gamebar{margin-top:4px!important;padding:5px 8px!important;min-height:41px!important}
}

/* Durante la battaglia: una sottile barra strumenti, senza sottrarre altezza alle griglie. */
@media (min-width:761px){
  body.battle-active.v14-theme header{
    min-height:36px!important;height:36px!important;padding:2px 6px!important
  }
  body.battle-active.v14-theme .brand{min-width:145px!important;height:30px!important}
  body.battle-active.v14-theme .brand>span{width:24px!important;height:24px!important;font-size:.78rem!important}
  body.battle-active.v14-theme .brand b{font-size:.75rem!important}
  body.battle-active.v14-theme .language-control{display:none!important}
  body.battle-active.v14-theme header nav{height:30px!important}
  body.battle-active.v14-theme #audioBtn,body.battle-active.v14-theme #profileBtn,body.battle-active.v14-theme .mobile-menu-toggle{
    width:30px!important;height:28px!important;min-width:30px!important;min-height:28px!important
  }
  body.battle-active.v14-theme #profileBtn img{width:22px!important;height:22px!important}
  body.battle-active.v14-theme header nav.mobile-expanded{top:38px!important}
}


/* V17 Ranked & Daily Rewards */
.v17-overview{display:grid;grid-template-columns:1.25fr 1fr;gap:14px;margin:14px 0}.v17-overview>article{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:150px}.v17-overview h2{margin:4px 0 6px}.ranked-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}.ranked-summary strong{padding:6px 12px;border:1px solid #efc75e66;border-radius:999px;background:#efc75e18;color:#ffe291}.ranked-summary span,.ranked-summary small{color:var(--muted)}.v17-ranked-card{background:radial-gradient(circle at 85% 20%,#efc75e1d,transparent 38%),var(--card)}.v17-daily-card{background:radial-gradient(circle at 85% 20%,#25e6ae20,transparent 38%),var(--card)}.daily-reward-track{display:flex;gap:6px;margin-top:12px}.daily-reward-track span{display:grid;place-items:center;width:29px;height:29px;border-radius:8px;border:1px solid #39ccea38;background:#061c31;color:#82a8bd;font-size:12px;font-weight:800}.daily-reward-track span.done{background:#1d9e7550;border-color:#37e1a4;color:#eafff8}.daily-reward-track span.next{box-shadow:0 0 18px #37e1a488;border-color:#37e1a4}.weekly-missions{margin-top:14px}.reset-label{font-size:12px;color:var(--muted)}.notification-button{position:relative}.notification-badge{position:absolute;right:2px;top:1px;min-width:16px;height:16px;padding:0 4px;border-radius:10px;background:#ff495f;color:#fff;font-size:10px;line-height:16px}.notification-center{width:min(720px,94vw)}.notification-list{display:grid;gap:8px;max-height:65vh;overflow:auto}.notification-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px;border:1px solid #31bad126;border-radius:13px;background:#061b2d}.notification-item.unread{border-color:#36d8e56b;background:#08283d}.notification-item>span{font-size:22px}.notification-item b{display:block}.notification-item small{display:block;color:var(--muted);margin-top:3px}
@media(max-width:900px){.v17-overview{grid-template-columns:1fr}.v17-overview>article{min-height:auto}.v17-overview button.primary{white-space:nowrap}}
@media(max-width:600px){.v17-overview>article{align-items:flex-start;flex-direction:column}.v17-overview button.primary{width:100%}.daily-reward-track{width:100%;justify-content:space-between}.daily-reward-track span{width:12%;height:32px}.notification-button span:last-child{display:none}}


/* ==========================================================
   V17.1 — Notebook top bar fix + SEO public content
   ========================================================== */
.seo-public{margin:24px 0;line-height:1.65}.seo-public h2{margin:.25rem 0 .5rem;font-size:clamp(1.45rem,2.3vw,2.2rem)}.seo-public h3{margin:.15rem 0 .35rem;font-size:1.05rem}.seo-public p{color:var(--muted);margin:.3rem 0}.seo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:18px 0}.seo-grid article{padding:14px;border:1px solid #1a6688;border-radius:12px;background:#041a2c}.seo-public details{border-top:1px solid #19536d;padding-top:12px}.seo-public summary{cursor:pointer;font-weight:800;color:#b8edff}

/* Su notebook e desktop normali il menu completo non occupa più una riga. */
@media (min-width:761px) and (max-width:2300px), (min-width:761px) and (max-height:1150px){
  body.v14-theme header{position:sticky!important;top:0!important;z-index:50!important;overflow:visible!important}
  body.v14-theme header nav{flex-wrap:nowrap!important;min-width:0!important}
  body.v14-theme header nav .nav-collapsible{display:none!important}
  body.v14-theme header nav .nav-always,
  body.v14-theme header nav .mobile-menu-toggle,
  body.v14-theme header nav #profileBtn,
  body.v14-theme header nav .language-control{display:flex!important}
  body.v14-theme #userBox{display:none!important}
  body.v14-theme header nav.mobile-expanded{
    position:absolute!important;top:47px!important;right:4px!important;left:auto!important;
    width:min(720px,calc(100vw - 18px))!important;max-height:min(72vh,520px)!important;overflow:auto!important;
    display:grid!important;grid-template-columns:repeat(3,minmax(150px,1fr))!important;
    gap:7px!important;padding:10px!important;border:1px solid #2485aa!important;border-radius:13px!important;
    background:linear-gradient(155deg,rgba(3,31,52,.99),rgba(1,13,24,.99))!important;
    box-shadow:0 22px 65px #000c,0 0 30px #1bc6ff22!important
  }
  body.v14-theme header nav.mobile-expanded .language-control,
  body.v14-theme header nav.mobile-expanded .nav-always,
  body.v14-theme header nav.mobile-expanded .mobile-menu-toggle,
  body.v14-theme header nav.mobile-expanded #profileBtn{display:none!important}
  body.v14-theme header nav.mobile-expanded .nav-collapsible:not(.hidden){
    display:flex!important;width:100%!important;min-width:0!important;height:46px!important;
    align-items:center!important;justify-content:flex-start!important;gap:9px!important;padding:6px 10px!important;
    font-size:.72rem!important;border-radius:9px!important
  }
  body.v14-theme header nav.mobile-expanded .nav-collapsible .nav-svg{width:20px!important;height:20px!important}
  body.v14-theme header nav.mobile-expanded .nav-collapsible span{display:block!important;font-size:.7rem!important;white-space:nowrap!important}
  body.v14-theme .notification-button{width:34px!important;height:32px!important;min-width:34px!important;padding:3px!important}
  body.v14-theme .notification-button>span:last-child{display:none!important}
  body.v14-theme .notification-bell{font-size:15px!important}
}
@media (min-width:761px) and (max-width:1250px){
  body.v14-theme .brand{min-width:135px!important}.brand b{font-size:.72rem!important}
  body.v14-theme .language-control{max-width:92px!important}.nav-select{max-width:64px!important}
  body.v14-theme header nav.mobile-expanded{grid-template-columns:repeat(2,minmax(145px,1fr))!important;width:min(470px,calc(100vw - 16px))!important}
}
@media (max-width:760px){.seo-grid{grid-template-columns:1fr}.seo-public{margin:12px 0;padding:15px}.seo-public h2{font-size:1.45rem}}

/* ==========================================================
   V17.2 — TOP BAR STABILE
   Una sola riga; menu secondario in drawer indipendente.
   ========================================================== */
body.v14-theme header{
  position:sticky!important;top:0!important;z-index:120!important;
  display:flex!important;align-items:center!important;gap:10px!important;
  min-height:44px!important;height:44px!important;padding:4px 10px!important;
  overflow:visible!important;background:rgba(1,18,31,.97)!important;
  border-bottom:1px solid rgba(52,197,239,.35)!important;
}
body.v14-theme header .brand{
  flex:0 0 auto!important;min-width:0!important;max-width:210px!important;
  height:34px!important;gap:7px!important;padding:0 4px!important;
}
body.v14-theme header .brand>span{font-size:20px!important;line-height:1!important}
body.v14-theme header .brand b{font-size:.78rem!important;line-height:1!important;white-space:nowrap!important}
body.v14-theme header .brand small{display:none!important}
body.v14-theme header nav{
  flex:1 1 auto!important;min-width:0!important;height:36px!important;
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:5px!important;flex-wrap:nowrap!important;margin:0!important;position:static!important;
}
body.v14-theme header nav>.nav-collapsible{display:none!important}
body.v14-theme header .language-control{height:32px!important;max-width:104px!important;min-width:76px!important;padding:0 5px!important}
body.v14-theme header .language-control .nav-svg{width:17px!important;height:17px!important}
body.v14-theme header .nav-select{height:30px!important;min-width:54px!important;max-width:72px!important;font-size:.7rem!important;padding:0!important}
body.v14-theme header #audioBtn,
body.v14-theme header #notificationBtn,
body.v14-theme header #profileBtn,
body.v14-theme header #mobileMenuBtn{
  width:36px!important;min-width:36px!important;max-width:36px!important;height:32px!important;min-height:32px!important;
  padding:4px!important;border-radius:8px!important;display:flex!important;align-items:center!important;justify-content:center!important
}
body.v14-theme header #audioBtn span,
body.v14-theme header #notificationBtn>span:last-child,
body.v14-theme header #profileBtn .profile-nav-label,
body.v14-theme header #mobileMenuBtn span{display:none!important}
body.v14-theme header #audioBtn .nav-svg,
body.v14-theme header #mobileMenuBtn .nav-svg{width:18px!important;height:18px!important}
body.v14-theme header #profileBtn img{width:25px!important;height:25px!important}
body.v14-theme header #userBox{display:none!important}

#desktopNavDrawer{
  position:fixed;z-index:160;top:49px;right:10px;width:min(560px,calc(100vw - 20px));
  max-height:calc(100vh - 62px);overflow:auto;display:none;
  grid-template-columns:repeat(3,minmax(135px,1fr));gap:7px;padding:10px;
  border:1px solid #278db5;border-radius:13px;
  background:linear-gradient(155deg,rgba(4,35,58,.995),rgba(1,14,25,.995));
  box-shadow:0 24px 70px #000d,0 0 30px #1dcfff25;
}
#desktopNavDrawer.open{display:grid!important}
#desktopNavDrawer .nav-collapsible:not(.hidden){
  display:flex!important;width:100%!important;height:44px!important;min-width:0!important;
  align-items:center!important;justify-content:flex-start!important;gap:9px!important;
  padding:6px 10px!important;border-radius:9px!important;font-size:.7rem!important
}
#desktopNavDrawer .nav-collapsible .nav-svg{width:20px!important;height:20px!important;flex:0 0 20px!important}
#desktopNavDrawer .nav-collapsible span{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.nav-drawer-open::after{content:"";position:fixed;inset:44px 0 0;z-index:150;background:rgba(0,8,15,.28);backdrop-filter:blur(1px)}
#desktopNavDrawer{z-index:170}

body.battle-active.v14-theme header{height:38px!important;min-height:38px!important;padding-block:3px!important}
body.battle-active.v14-theme header .brand{height:30px!important;max-width:175px!important}
body.battle-active.v14-theme header .brand b{font-size:.7rem!important}
body.battle-active.v14-theme header .language-control{display:none!important}
body.battle-active.v14-theme header nav{height:31px!important}
body.battle-active.v14-theme header #audioBtn,
body.battle-active.v14-theme header #notificationBtn,
body.battle-active.v14-theme header #profileBtn,
body.battle-active.v14-theme header #mobileMenuBtn{height:29px!important;min-height:29px!important;width:33px!important;min-width:33px!important}
body.battle-active #desktopNavDrawer{top:42px}

@media (max-width:900px){
  #desktopNavDrawer{grid-template-columns:repeat(2,minmax(125px,1fr));right:6px;width:calc(100vw - 12px)}
  body.v14-theme header .brand{max-width:155px!important}
}
@media (max-width:520px){
  body.v14-theme header{height:42px!important;min-height:42px!important;padding-inline:6px!important;gap:4px!important}
  body.v14-theme header .brand{max-width:142px!important}
  body.v14-theme header .brand b{font-size:.68rem!important}
  body.v14-theme header .language-control{max-width:76px!important;min-width:65px!important}
  #desktopNavDrawer{top:46px;grid-template-columns:repeat(2,minmax(0,1fr));padding:8px;gap:6px}
}
