/* NEXT V98 — Firebase login + onboarding profilo */
#nextAuthGate{position:fixed;inset:0;z-index:100000;background:linear-gradient(180deg,#fffaf7 0%,#fbf7ff 100%);display:flex;align-items:center;justify-content:center;padding:24px;font-family:inherit}
#nextAuthGate.hidden{display:none!important}.next-auth-card{width:min(430px,100%);background:#fff;border:1px solid rgba(87,63,130,.12);border-radius:32px;padding:30px 24px;box-shadow:0 22px 70px rgba(72,47,111,.14);text-align:center}.next-auth-logo{font-family:Georgia,serif;font-size:48px;font-weight:800;color:#5f4acb;letter-spacing:-3px}.next-auth-logo i{font-style:normal;color:#e9b7db;font-weight:400}.next-auth-heart{width:78px;height:78px;border-radius:28px;margin:18px auto;background:radial-gradient(circle at 50% 45%,#fff 0 13%,#f5d6ec 15% 34%,#d9c8ff 62%,#c3a9f4 100%);display:grid;place-items:center;font-size:35px;box-shadow:0 10px 30px rgba(111,78,183,.18)}.next-auth-card h1{font-family:Georgia,serif;color:#25203a;font-size:30px;margin:8px 0}.next-auth-card p{color:#6f6980;line-height:1.5;margin:8px auto 22px;max-width:330px}.next-google-btn{width:100%;border:1px solid #ddd7e7;background:#fff;border-radius:16px;padding:14px 18px;font-weight:750;font-size:16px;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer}.next-google-g{font-size:21px;font-weight:800;color:#4285f4}.next-auth-note{display:block;margin-top:15px;color:#9690a2;font-size:12px}.next-onboard{display:none}.next-onboard.active{display:block}.next-login-view.hidden{display:none}.next-choice-grid{display:grid;gap:10px;margin:18px 0}.next-choice{border:1px solid #ded8ea;background:#fff;border-radius:17px;padding:15px;text-align:left;font-weight:700;color:#3d3652;cursor:pointer}.next-choice.active{border:2px solid #7257d9;background:#f7f3ff}.next-continue{width:100%;border:0;background:#6750d6;color:#fff;border-radius:16px;padding:15px;font-weight:800;font-size:16px;cursor:pointer}.next-continue:disabled{opacity:.45}.next-user-mini{position:fixed;right:16px;top:16px;z-index:9999;display:none}.next-user-mini img{width:36px;height:36px;border-radius:50%;border:2px solid #fff;box-shadow:0 4px 16px #0002}.next-auth-error{color:#a33;font-size:13px;margin-top:12px}
body.next-profile-male [data-open="rhythm"],body.next-profile-male #rhythm{display:none!important}
body.next-profile-male .female-only{display:none!important}
@media(max-width:600px){#nextAuthGate{padding:16px}.next-auth-card{border-radius:28px;padding:26px 20px}.next-auth-card h1{font-size:28px}}
/* V99 profile polish */
.profile-big img,#profileImage{object-fit:contain!important;object-position:center!important;background:#fff;border-radius:50%;}
#googleSignIn,#googleSetupNote{display:none!important}
.profile-health-data .next-profile-sex{margin-top:14px;display:block}
.profile-health-data .next-profile-sex select{width:100%;margin-top:7px;padding:11px 12px;border:1px solid #ded8ea;border-radius:12px;background:#fff;color:#30214e;font:inherit}
.profile-health-data .next-profile-note{margin-top:8px}

/* V100 — avatar Google: maschera circolare reale, senza quadrato interno */
.profile-button,#profileButton,.profile-big{overflow:hidden!important;border-radius:50%!important;}
#profileImage,#profileModalImage,.profile-big img,.profile-button img,#profileButton img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:1/1!important;
  border-radius:50%!important;
  object-fit:cover!important;
  object-position:center center!important;
  background:transparent!important;
  clip-path:circle(50% at 50% 50%)!important;
}

/* V101 · CTA registra ricetta */
.v101-register-recipe{display:block;width:min(92%,520px);margin:12px auto 4px;padding:15px 18px;border:0;border-radius:18px;background:#6f5bd3;color:#fff;font-weight:800;font-size:15px;box-shadow:0 8px 24px rgba(74,55,150,.22)}

/* NEXT V102 — avatar Google senza ricomposizione: mostra l'intero bitmap fornito da Google */
#profileButton{padding:0!important;background:transparent!important;border:0!important;overflow:hidden!important}
#profileImage,#profileModalImage{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;object-fit:fill!important;object-position:initial!important;transform:none!important;clip-path:none!important;border-radius:50%!important;background:transparent!important}
.profile-big{padding:0!important;background:transparent!important;border-radius:50%!important;overflow:hidden!important}

/* CTA ricetta: non eredita il posizionamento assoluto del tasto X */
.v91-recipe-modal>.v102-recipe-register-bar{position:static!important;width:min(94vw,520px);margin-top:10px;display:flex;justify-content:center;z-index:3}
.v102-recipe-register-bar .v101-register-recipe{position:static!important;width:100%!important;height:auto!important;margin:0!important;padding:14px 18px!important;border-radius:16px!important;background:#6f5bd3!important;color:#fff!important;font-size:15px!important;line-height:1.2!important}
.v102-portion-sheet{position:fixed;inset:0;z-index:10050;background:rgba(28,22,38,.58);display:grid;place-items:end center;padding:16px}
.v102-portion-sheet.hidden{display:none!important}.v102-portion-card{position:relative;width:min(520px,100%);background:#fff;border-radius:26px;padding:24px 20px calc(22px + env(safe-area-inset-bottom));box-shadow:0 20px 70px #0003}.v102-portion-card h3{margin:7px 0 4px;font-size:22px}.v102-portion-card p{margin:0 0 16px;color:#716b7c}.v102-portion-close{position:absolute;right:14px;top:12px;border:0;background:#f5f1f8;width:36px;height:36px;border-radius:50%;font-size:22px}.v102-portion-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.v102-portion-options button{border:1px solid #ded8ea;background:#fff;border-radius:14px;padding:12px 7px;font-weight:750;color:#45385d}.v102-portion-options button.active{background:#f1ecff;border:2px solid #6f5bd3;color:#5139b1}.v102-portion-kcal{text-align:center;font-weight:800;color:#5139b1;padding:14px 0 10px}.v102-portion-card>.primary{width:100%}
.next-logout-button{width:100%;margin-top:18px;padding:12px 14px;border:1px solid #d9d2e3;border-radius:13px;background:#fff;color:#5d526b;font-weight:800}
@media(max-width:600px){.v91-recipe-modal{justify-content:flex-start!important;padding-top:14px!important;overflow-y:auto!important}.v91-recipe-modal img{max-height:74vh!important}.v91-recipe-modal>.v102-recipe-register-bar{margin-bottom:6px}.v91-modal-actions{padding-bottom:calc(8px + env(safe-area-inset-bottom))}}
