:root{
  --rnp-green:#148b3b;
  --rnp-green-bright:#39c96a;
  --rnp-green-deep:#031108;
  --rnp-panel:#061b0d;
  --rnp-panel-2:#0a2714;
  --rnp-border:#328d4d;
  --rnp-yellow:#f4c542;
  --rnp-white:#fff;
  --rnp-muted:#fff;
}

html{
  background-color:#020805!important;
  background-image:linear-gradient(rgba(0,8,3,.34),rgba(0,8,3,.56)),url("rnp-background.jpeg")!important;
  background-position:center center!important;
  background-size:cover!important;
  background-attachment:fixed!important;
  background-repeat:no-repeat!important;
}
body{color:var(--rnp-white)!important}
body:before{background:rgba(0,10,4,.22)!important}

/* Evita che il vecchio marchio compaia per un istante prima del rebrand DOM. */
img[src="interrazionale-logo.png"]{visibility:hidden!important}
img[src="rnp-logo.jpeg"]{visibility:visible!important}

/* Logo RNP: il ritaglio circolare elimina gli angoli bianchi del JPEG fornito. */
.brandLogo,.logo,.irEditorTitleLogo,#irFieldLogo,.fieldLogo,.irFieldEntryCard>img{
  border-radius:50%!important;
  object-fit:cover!important;
  background:#fff!important;
}

/* Superfici principali: dal blu al verde scuro. */
.hero,.top,.panel,.choice,.card,
.irStreamingPanel,.irStreamingBlock,.irSinglePlayerBox,.irOnlineBox,
.event,.matchCard,.teamPick,.emptyState,.challenge,.targetBox,.stat,.complete,
.irLivePlayInfo,.irSinglePlayerRules,.point,.note,
#irOnlineMaster,.irFinalCard,.irFieldFinal>div,.irFieldEntryCard,
.scoreboard,.coachCard,.irFinalWait,
body>.irSocials,.shell>.irSocials,
.irInstallInfoModal,.irInstallSteps li{
  background:linear-gradient(160deg,rgba(8,38,18,.97),rgba(2,14,7,.97))!important;
  border-color:rgba(65,184,99,.58)!important;
}

.row,select,input,textarea,.irCountryPickerBtn,.irCountryPickerMenu,
.guess input,.irFieldEntryCard select,.irFieldScores,.irFinalScores{
  background-color:#071b0e!important;
  border-color:#2f7545!important;
  color:#fff!important;
}

/* Pulsanti e controlli verdi; i pulsanti semantici rossi restano invariati. */
.action,.home,.back,.backBtn,.topBack,.gameBackBtn,.playBtn,.next,
.irOnlineBtn,.guess button,.completeActions button,#irCampoHomeButton,
.irFinalActions .again,.irFinalActions .share,.irFinalActions .download,
.irFinalActions #irFinalHome,.irFieldFinal .again,.irFieldFinal .share,
.irFieldFinal .download,.irFieldFinal .home,.irFieldEntryCard button,
#irOnlineMaster button,.drawBtn,.irInstallInfoBtn,.irInstallInfoClose{
  background:linear-gradient(180deg,#177f38,#0c5726)!important;
  border-color:#4fcb76!important;
  color:#fff!important;
}
.action:hover,.home:hover,.back:hover,.backBtn:hover,.topBack:hover,
.gameBackBtn:hover,.playBtn:hover,.next:hover,.irOnlineBtn:hover,
.guess button:hover,.completeActions button:hover,#irCampoHomeButton:hover{
  background:linear-gradient(180deg,#21a44a,#126c31)!important;
  border-color:#72e093!important;
}
.cancelBtn{background:#3b1515!important;border-color:#a94a4a!important}

/* Il giallo distingue titoli, intestazioni e accenti dal testo ordinario. */
.eyebrow,h1,h1 span,h1 b,.tag,h2,h3,
.irStreamingVersion,.irOnlineTitle,.eventTitle,.eventPageTitle,
.matchYear,.matchScore,.personalProgress b,.side h2,.targetType,
.stat b,.complete h3,.coachLabel,.scoreTitle,.irFinalKicker,
.irFieldFinal h2,.irFinalWait b,.irChallengeIdentity,.drawResult,
#irOnlineMaster b,.irMasterChallenge strong,.point b,
.top h1 b,.gameIdentityText h2,.goalBox b,.personalProgress b,
.matchWins,.diceResult,.irInstallInfoModal h2,.irInstallDevice h3{
  color:var(--rnp-yellow)!important;
}
.subtitle,.lead,p,li,.eventDesc,.choice p,.matchCard small,.teamPickMain small,
.meta,.hint,.stat small,.irFieldEntryCard p,.irCopyright,.irFieldCopyright,
.copyright,.irFinalWait,.irOnlineStatus,.status{
  color:var(--rnp-muted)!important;
}

/* Bordi e indicatori coerenti con la nuova identità. */
.hero,.panel,.choice,.event,.matchCard,.teamPick,.challenge,.targetBox,
.stat,.complete,.irFinalCard,.irFieldFinal>div,.irFieldEntryCard,
#diceAnimationBox,.irChallengeIdentity,.irTargetLetters{
  border-color:var(--rnp-border)!important;
}
.choice:hover,.event:hover,.matchCard:hover,.teamPick:hover{
  border-color:var(--rnp-green-bright)!important;
}
.irSocial{border-color:rgba(65,184,99,.52)!important}
html body.ir-field-final-open>.irSocials .irSocial{border-color:rgba(65,184,99,.58)!important;background:rgba(3,24,10,.96)!important}
#irOnlineStatus{color:var(--rnp-muted)!important}

/* Pulsazione del sorteggio: stessa animazione e durata, solo nuova palette. */
@keyframes playerBreathExact{
  0%,100%{transform:scale(1);filter:drop-shadow(0 0 5px rgba(255,255,255,.55))}
  50%{transform:scale(1.08);filter:drop-shadow(0 0 20px rgba(57,201,106,1))}
}
@keyframes coachOutlinePulse{
  0%,100%{transform:scale(1);box-shadow:0 0 9px rgba(255,255,255,.72)}
  50%{transform:scale(1.08);box-shadow:0 0 30px rgba(57,201,106,1)}
}
@keyframes turnGlow{
  0%,100%{box-shadow:0 0 8px rgba(255,255,255,.55);filter:brightness(1)}
  50%{box-shadow:0 0 26px #39c96a,0 0 40px rgba(57,201,106,.55);filter:brightness(1.16)}
}
@keyframes pulse{
  0%,100%{box-shadow:0 0 9px rgba(255,255,255,.68);transform:scale(1)}
  50%{box-shadow:0 0 30px #39c96a;transform:scale(1.08)}
}
@keyframes irMasterTargetPulse{
  0%,100%{transform:scale(1);box-shadow:0 0 0 1px rgba(255,255,255,.46),0 0 9px rgba(57,201,106,.3)}
  50%{transform:scale(1.012);box-shadow:0 0 0 2px rgba(255,255,255,.92),0 0 25px rgba(57,201,106,.72)}
}
#players>.row.irMasterTarget,#coach.irMasterTarget{
  border-color:#4fcb76!important;
  background:linear-gradient(90deg,rgba(57,201,106,.20),rgba(5,26,12,.28))!important;
}
#players>.row.irMasterTarget:before,#coach.irMasterTarget:before{
  background:#fff!important;color:#073216!important;
}

.teamVisual.clubFlagFallback{
  background:repeating-linear-gradient(90deg,#17833a 0 14px,#07130b 14px 28px)!important;
}
.irInstallSteps li::before{background:#177f38!important;color:#fff!important}
.irInstallInfoLead,.irInstallNote{color:var(--rnp-muted)!important}

/* Pulizia finale dei residui azzurri/blu presenti nei fogli storici. */
.irSinglePlayerCopy,.point span,.visualKind,.goalBox span,
.personalProgress span,.challenge small,.emptyState,
#irOnlineMaster small,.irReadyPlayer,.onlineHint,
.irStreamingRole,.irRoleButton>small,.irVersion{
  color:#fff!important;
}
.irReadyPlayer{
  background:#071b0e!important;
  border-color:#328d4d!important;
}
.irReadyPlayer.ready{
  background:#102b1d!important;
  border-color:#4fcb76!important;
  color:#76e49b!important;
}
#irReadyPlayers{border-top-color:#328d4d!important}
#turnStatus{color:#fff!important}

/* Intestazioni: testo giallo direttamente sullo sfondo, senza riquadro pieno. */
html body .tag{
  background:transparent!important;
  border-color:transparent!important;
  color:var(--rnp-yellow)!important;
}
html body .irSinglePlayerRules .tag{
  background:transparent!important;
  border-color:transparent!important;
  color:var(--rnp-yellow)!important;
}

/* Single Player: i tre riepiloghi usano la palette verde del sito. */
html body.irSinglePlayerPage .personalProgress>div{
  background:#071b0e!important;
  border-color:#328d4d!important;
}

/* Eccezioni richieste per Home e Come si gioca. */
html body .irSinglePlayerCopy{color:#fff!important}
html body .irLivePlayInfo h2{color:var(--rnp-yellow)!important}
html body>.page .top .eyebrow{color:#fff!important}
html body .shell>.hero .irHomePayoffTitle{color:var(--rnp-yellow)!important}
html body .shell>.hero .irMasterChallenge{color:#fff!important}
html body .irCopyright,html body .irFieldCopyright{color:#fff!important}
html body:not(.game-active)>.irFieldCopyright,
html body.game-active>.irFieldCopyright,
html body.event-detail-active:not(.game-active)>.irFieldCopyright{
  color:#fff!important;
}
html body #irCampoHomeButton{color:#fff!important}

/* V6.65 — intestazioni richieste in bianco nella sola modalità Single Player. */
html body.irSinglePlayerPage .wrap>.top .eyebrow{color:#fff!important}
html body.irSinglePlayerPage .wrap>.top h1{color:#fff!important}
html body.irSinglePlayerPage:not(.game-active) #library>.eyebrow{color:#fff!important}

/* V6.65 — intestazione bianca nella pagina Prepara la sfida. */
html body.irOnlineChallengePage .wrap>.top .eyebrow{color:#fff!important}
html body.irOnlineChallengePage .wrap>.top h1{color:#fff!important}
html body.irOnlineChallengePage #library>.eyebrow{color:#fff!important}

/* Le intestazioni principali mostrano direttamente lo sfondo del sito. */
html body .wrap>.top,
html body .page>.top{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}

/* Testi secondari: nessuna tonalità azzurra residua. */
html body .subtitle,html body .lead,html body .meta,html body .hint,
html body .eventDesc,html body .choice p,html body .matchCard small,
html body .teamPickMain small,html body .stat small,html body .point span,
html body .note,html body .irSpFlow,html body .irFinalWait,
html body .irFieldEntryCard p,html body .irFinalScores,
html body .irFieldScores,html body .emptyState,
html body .personalProgress span,html body .goalBox span,
html body .challenge small,html body .visualKind,
html body .status,html body #irOnlineStatus,html body #irSyncStatus,
html body .irInstallInfoLead,html body .irInstallNote,
html body .irInstallSteps li{
  color:#fff!important;
}

/* Campo e modali finali. */
#diceAnimationBox{background:rgba(3,18,8,.96)!important}
.diceAnimationName{color:#fff!important}
.irFinalKicker,.irFieldWinner,.irFieldScores,.irFinalScores{color:#fff!important}
.irFinalWait,.irFieldScores,.irFinalScores{background:#031108!important}
html body .irFinalSocials .irSocial,html body>.irSocials .irSocial{
  border:1px solid rgba(65,184,99,.58)!important;
  border-radius:9px!important;
  background:rgba(3,24,10,.96)!important;
  box-shadow:0 8px 20px #0008,inset 0 1px 0 #ffffff0d!important;
}
html body>.irSocials .irSocial:hover{
  background:rgba(8,55,23,.98)!important;
  border-color:#4fcb76!important;
}

/* Single Player: stessa cornice verde dei social presenti nelle altre pagine. */
html body:not(.game-active)>.irSocials .irSocial,
html body.event-detail-active:not(.game-active)>.irSocials .irSocial,
html body.game-active>.irSocials .irSocial,
html body .irFinalSocials .irSocial{
  background:rgba(3,24,10,.96)!important;
  border-color:rgba(65,184,99,.58)!important;
}
html body:not(.game-active)>.irSocials .irSocial:hover,
html body.event-detail-active:not(.game-active)>.irSocials .irSocial:hover,
html body.game-active>.irSocials .irSocial:hover{
  background:rgba(8,55,23,.98)!important;
  border-color:#4fcb76!important;
}
#irOnlineBadge{
  border-color:#328d4d!important;background:#061b0ded!important;color:#fff!important;
}

@media(max-width:700px){
  html{background-attachment:scroll!important}
}
