/*
 * TakaraDex shared styles: navigation-responsive.css
 * Generated by the V0.2.0 readability refactor.
 * These rules were previously duplicated in every HTML page.
 * For normal spacing/size changes edit ../takaradex-config.css instead.
 */


/* ===== Inner-page logo visibility ===== */
@media (min-width:921px){
  body:not(.auth-loading) .header > img.poke-icon:first-child{
    display:block!important;visibility:visible!important;opacity:1!important;
    width:58px!important;height:58px!important;min-width:58px!important;
    position:absolute!important;left:32px!important;top:17px!important;
    object-fit:contain!important;z-index:10002!important;
  }
  body:not(.auth-loading) .header > img.poke-icon:last-child{display:none!important;}
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(1){
    display:flex!important;visibility:visible!important;opacity:1!important;
    width:58px!important;height:58px!important;min-width:58px!important;
    position:absolute!important;left:32px!important;top:17px!important;
    align-items:center!important;justify-content:center!important;
    z-index:10002!important;text-decoration:none!important;pointer-events:auto!important;
  }
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(1) img.poke-icon{
    display:block!important;visibility:visible!important;opacity:1!important;
    width:58px!important;height:58px!important;min-width:58px!important;
    position:static!important;left:auto!important;top:auto!important;
    object-fit:contain!important;
  }
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(n+2){display:none!important;}
}


/* ===== Desktop inline logo alignment ===== */
@media (min-width:921px){
  body:not(.auth-loading) .header > a.td-logo-home.td-logo-primary,
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(1){
    position:static!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    margin:0 18px 0 0!important;
    padding:0!important;
    z-index:10002!important;
    pointer-events:auto!important;
    text-decoration:none!important;
    flex:0 0 58px!important;
  }
  body:not(.auth-loading) .header > a.td-logo-home.td-logo-primary img.poke-icon,
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(1) img.poke-icon{
    position:static!important;
    left:auto!important;
    top:auto!important;
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    object-fit:contain!important;
  }
  body:not(.auth-loading) .header > img.poke-icon:first-child{
    position:static!important;
    left:auto!important;
    top:auto!important;
    width:58px!important;
    height:58px!important;
    min-width:58px!important;
    margin:0 18px 0 0!important;
    flex:0 0 58px!important;
  }
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(n+2),
  body:not(.auth-loading) .header > img.poke-icon:last-child{display:none!important;}
  body:not(.auth-loading) .header .pokemon-title,
  body:not(.auth-loading) .header h1{
    margin-left:0!important;
  }
}


/* ===== Mobile authentication layout ===== */
@media (max-width:920px){
  body{padding:10px 10px calc(112px + env(safe-area-inset-bottom))!important;overflow-x:hidden!important;}
  body.auth-active{padding:0!important;min-height:100vh!important;}
  body.auth-active .header,
  body.auth-active #tdNativeNav,
  body.auth-active .td-native-nav,
  body.auth-active .bottom-glass,
  body:has(#authScreen[style*="flex"]) .header,
  body:has(#authScreen[style*="flex"]) #tdNativeNav,
  body:has(#authScreen[style*="flex"]) .td-native-nav,
  body:has(#authScreen[style*="flex"]) .bottom-glass{display:none!important;visibility:hidden!important;pointer-events:none!important;}
  .auth-screen{z-index:99999!important;padding:20px!important;}
  .auth-box{margin:auto!important;max-width:420px!important;width:calc(100vw - 40px)!important;}

  .header{width:100%!important;min-height:58px!important;height:auto!important;margin:0 0 12px!important;padding:9px 12px!important;border-radius:20px!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) 42px!important;align-items:center!important;justify-items:center!important;gap:8px!important;overflow:hidden!important;box-sizing:border-box!important;}
  .header .hamburger{position:static!important;grid-column:1!important;transform:none!important;width:40px!important;height:40px!important;min-width:40px!important;border-radius:14px!important;font-size:25px!important;display:flex!important;align-items:center!important;justify-content:center!important;}
  .header .poke-icon:first-of-type{grid-column:1!important;width:34px!important;height:34px!important;min-width:34px!important;position:static!important;margin:0!important;}
  .header .poke-icon:last-child{display:none!important;}
  .header .pokemon-title,.header h1{grid-column:2!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;font-size:clamp(20px,6.4vw,27px)!important;letter-spacing:.035em!important;line-height:1.05!important;}
  .header .pokemon-title::after,.header h1::after{display:none!important;content:none!important;}
  .header:has(.back-arrow){grid-template-columns:minmax(0,1fr)!important;padding:9px 12px!important;}
  .header:has(.back-arrow) .back-arrow{display:none!important;}
  .header:has(.back-arrow) .poke-icon:first-of-type{position:absolute!important;left:14px!important;width:34px!important;height:34px!important;min-width:34px!important;}
  .header:has(.back-arrow) .pokemon-title,.header:has(.back-arrow) h1{grid-column:1!important;padding-left:44px!important;padding-right:4px!important;text-align:center!important;font-size:clamp(19px,6.2vw,26px)!important;}

  main,.page,.container:not(.app-container),.hero,.panel,.form-section,.stats-section{max-width:100%!important;box-sizing:border-box!important;margin-left:auto!important;margin-right:auto!important;}
  .hero,.panel,.form-section,.stats-section{padding:16px!important;border-radius:22px!important;}
  .filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:10px!important;max-width:100%!important;padding:0 2px 8px!important;margin-left:0!important;scroll-snap-type:x proximity!important;-webkit-overflow-scrolling:touch!important;}
  .filters::-webkit-scrollbar{display:none!important;}
  .filter-btn{flex:0 0 auto!important;scroll-snap-align:start!important;}
  body.community-page .page{overflow:hidden!important;}

  #tdNativeNav,.td-native-nav,.td-native-nav.td-native-nav-wide{display:grid!important;position:fixed!important;left:50%!important;right:auto!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:calc(100vw - 18px)!important;max-width:430px!important;height:72px!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:2px!important;padding:7px!important;border-radius:24px!important;box-sizing:border-box!important;overflow:visible!important;z-index:8800!important;}
  #tdNativeNav:before,.td-native-nav:before{display:none!important;content:none!important;}
  #tdNativeNav a,.td-native-nav a,.td-native-nav.td-native-nav-wide a{min-width:0!important;max-width:none!important;width:auto!important;height:56px!important;padding:4px 2px!important;border-radius:16px!important;font-size:10px!important;line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:3px!important;grid-column:auto!important;}
  #tdNativeNav .td-nav-ico,.td-native-nav .td-nav-ico{font-size:18px!important;line-height:1!important;width:auto!important;}
  #tdNativeNav a.add,.td-native-nav a.add{position:relative!important;grid-column:4!important;transform:translateY(-12px)!important;width:62px!important;height:62px!important;justify-self:center!important;border-radius:20px!important;z-index:2!important;}
  #tdNativeNav a.add .td-nav-ico,.td-native-nav a.add .td-nav-ico{font-size:30px!important;line-height:.85!important;}
  #tdNativeNav a:nth-child(1),.td-native-nav a:nth-child(1){grid-column:1!important;}
  #tdNativeNav a:nth-child(2),.td-native-nav a:nth-child(2){grid-column:2!important;}
  #tdNativeNav a:nth-child(3),.td-native-nav a:nth-child(3){grid-column:3!important;}
  #tdNativeNav a:nth-child(4),.td-native-nav a:nth-child(4){grid-column:4!important;}
  #tdNativeNav a:nth-child(5),.td-native-nav a:nth-child(5){grid-column:5!important;}
  #tdNativeNav a:nth-child(6),.td-native-nav a:nth-child(6){grid-column:6!important;}
  #tdNativeNav a:nth-child(7),.td-native-nav a:nth-child(7){grid-column:7!important;}
}


/* ===== Final compact mobile layout ===== */
@media (max-width:920px){
  /* Login pulita */
  body.auth-active .header, body.auth-active #tdNativeNav, body.auth-active .td-native-nav,
  body:has(#authScreen[style*="flex"]) .header, body:has(#authScreen[style*="flex"]) #tdNativeNav, body:has(#authScreen[style*="flex"]) .td-native-nav{display:none!important;}

  /* Header mobile: solo logo a sinistra + titolo centrato */
  body:not(.auth-loading) .header{
    position:relative!important; display:flex!important; align-items:center!important; justify-content:center!important;
    min-height:70px!important; height:70px!important; width:100%!important; margin:0 0 14px!important; padding:8px 64px!important;
    border-radius:24px!important; overflow:hidden!important; box-sizing:border-box!important;
  }
  body:not(.auth-loading) .header .hamburger,
  body:not(.auth-loading) .header .profile-btn,
  body:not(.auth-loading) .header .profile-account,
  body:not(.auth-loading) .header > button,
  body:not(.auth-loading) .header > a:not(.td-logo-home){display:none!important;visibility:hidden!important;pointer-events:none!important;}
  body:not(.auth-loading) .header .poke-icon:first-of-type,
  body:not(.auth-loading) .header > a.td-logo-home:first-of-type{
    display:flex!important; position:absolute!important; left:18px!important; top:50%!important; transform:translateY(-50%)!important;
    width:40px!important; height:40px!important; min-width:40px!important; margin:0!important; z-index:2!important;
  }
  body:not(.auth-loading) .header > a.td-logo-home:first-of-type img{width:40px!important;height:40px!important;display:block!important;}
  body:not(.auth-loading) .header .poke-icon:last-child,
  body:not(.auth-loading) .header > a.td-logo-home:nth-of-type(n+2){display:none!important;}
  body:not(.auth-loading) .header .pokemon-title, body:not(.auth-loading) .header h1{
    width:100%!important; max-width:100%!important; margin:0!important; padding:0!important; text-align:center!important;
    white-space:nowrap!important; overflow:hidden!important; text-overflow:ellipsis!important; line-height:1!important;
    font-size:clamp(22px,7vw,32px)!important; letter-spacing:.045em!important;
  }
  body:not(.auth-loading) .header .pokemon-title::after, body:not(.auth-loading) .header h1::after{display:none!important;}

  /* Tabella: header rosso agganciato al contenitore, senza scalino */
  body:not(.auth-loading) .table-section{
    padding:0!important; border-radius:22px!important; overflow-x:auto!important; overflow-y:hidden!important;
    max-width:100%!important; box-sizing:border-box!important; -webkit-overflow-scrolling:touch!important;
  }
  body:not(.auth-loading) .table-section table{
    margin:0!important; border-collapse:separate!important; border-spacing:0!important; min-width:860px!important; width:max-content!important;
  }
  body:not(.auth-loading) .table-section thead, body:not(.auth-loading) .table-section tr{border-radius:0!important;}
  body:not(.auth-loading) .table-section th{border-radius:0!important;}
  body:not(.auth-loading) .table-section th:first-child{border-top-left-radius:22px!important;}
  body:not(.auth-loading) .table-section th:last-child{border-top-right-radius:22px!important;}

  /* Bottom nav nuova: Home, Stats, Aggiungi, Community, Profilo */
  #tdNativeNav, .td-native-nav, .td-native-nav.td-native-nav-wide{
    display:grid!important; grid-template-columns:1fr 1fr 78px 1fr 1fr!important; align-items:center!important; gap:4px!important;
    position:fixed!important; left:50%!important; bottom:calc(12px + env(safe-area-inset-bottom))!important; transform:translateX(-50%)!important;
    width:calc(100vw - 24px)!important; max-width:500px!important; height:80px!important; padding:8px 10px!important;
    border-radius:30px!important; overflow:visible!important; z-index:8800!important;
    background:rgba(12,11,10,.90)!important; border:1px solid rgba(216,181,90,.28)!important;
    box-shadow:0 -16px 45px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06)!important; backdrop-filter:blur(18px)!important;
  }
  #tdNativeNav a, .td-native-nav a{
    height:62px!important; min-width:0!important; display:flex!important; flex-direction:column!important; align-items:center!important; justify-content:center!important;
    gap:4px!important; padding:4px 2px!important; border-radius:22px!important; font-size:11px!important; font-weight:1000!important; line-height:1!important;
    color:#f4f0e5!important; text-decoration:none!important; letter-spacing:0!important; box-sizing:border-box!important;
  }
  #tdNativeNav a.active:not(.add), .td-native-nav a.active:not(.add){
    background:linear-gradient(135deg,rgba(216,181,90,.30),rgba(216,181,90,.10))!important; color:#ffd21a!important;
  }
  #tdNativeNav .td-nav-ico, .td-native-nav .td-nav-ico{font-size:21px!important; line-height:1!important;}
  #tdNativeNav a.add, .td-native-nav a.add{
    grid-column:3!important; width:78px!important; height:78px!important; justify-self:center!important; transform:translateY(-18px)!important;
    border-radius:999px!important; background:linear-gradient(180deg,#ffd91f,#ffc400)!important; color:#070707!important;
    border:6px solid rgba(5,5,5,.92)!important; box-shadow:0 0 25px rgba(255,204,0,.35),0 12px 28px rgba(0,0,0,.45)!important;
    font-size:11px!important; padding:8px 4px!important; z-index:3!important;
  }
  #tdNativeNav a.add .td-nav-ico, .td-native-nav a.add .td-nav-ico{font-size:33px!important; line-height:.8!important; font-weight:1000!important;}
  #tdNativeNav a:nth-child(1){grid-column:1!important;} #tdNativeNav a:nth-child(2){grid-column:2!important;}
  #tdNativeNav a:nth-child(3){grid-column:3!important;} #tdNativeNav a:nth-child(4){grid-column:4!important;} #tdNativeNav a:nth-child(5){grid-column:5!important;}
  body:not(.auth-loading){padding-bottom:calc(116px + env(safe-area-inset-bottom))!important;}
}


/* ===== Mobile header and navigation polish ===== */
@media (max-width:720px){
  /* Header mobile pulito: solo logo + titolo, niente menu/profilo */
  body:not(.auth-loading) .topbar,
  body:not(.auth-loading) .app-header,
  body:not(.auth-loading) header,
  body:not(.auth-loading) .header{
    min-height:74px!important;
    height:auto!important;
    padding:10px 16px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
    position:relative!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body:not(.auth-loading) .menu-btn,
  body:not(.auth-loading) .hamburger,
  body:not(.auth-loading) .profile-btn,
  body:not(.auth-loading) .account-btn,
  body:not(.auth-loading) .topbar button[aria-label*="Profilo"],
  body:not(.auth-loading) .topbar button[aria-label*="Menu"]{
    display:none!important;
  }
  body:not(.auth-loading) .topbar img,
  body:not(.auth-loading) .app-header img,
  body:not(.auth-loading) header img,
  body:not(.auth-loading) .header img.poke-icon{
    width:42px!important;
    height:42px!important;
    flex:0 0 auto!important;
    position:static!important;
    margin:0!important;
  }
  body:not(.auth-loading) .topbar img:first-of-type,
  body:not(.auth-loading) .app-header img:first-of-type,
  body:not(.auth-loading) header img:first-of-type,
  body:not(.auth-loading) .header img.poke-icon:first-of-type{
    position:absolute!important;
    left:16px!important;
  }
  body:not(.auth-loading) .topbar img:not(:first-of-type),
  body:not(.auth-loading) .app-header img:not(:first-of-type),
  body:not(.auth-loading) header img:not(:first-of-type),
  body:not(.auth-loading) .header img.poke-icon:not(:first-of-type){display:none!important;}
  body:not(.auth-loading) .pokemon-title,
  body:not(.auth-loading) h1.pokemon-title,
  body:not(.auth-loading) .app-title,
  body:not(.auth-loading) header h1,
  body:not(.auth-loading) .topbar h1{
    max-width:calc(100vw - 120px)!important;
    text-align:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    margin:0 auto!important;
    font-size:clamp(26px,8vw,36px)!important;
    line-height:1.05!important;
  }

  /* Nav mobile rifinita: niente sovrapposizioni */
  #tdNativeNav, .td-native-nav, .td-native-nav.td-native-nav-wide{
    display:grid!important;
    grid-template-columns:minmax(54px,1fr) minmax(54px,1fr) 92px minmax(70px,1fr) minmax(58px,1fr)!important;
    align-items:center!important;
    column-gap:6px!important;
    position:fixed!important;
    left:50%!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:calc(100vw - 20px)!important;
    max-width:540px!important;
    height:84px!important;
    padding:8px 12px!important;
    border-radius:30px!important;
    overflow:visible!important;
    z-index:8800!important;
    background:rgba(12,11,10,.93)!important;
    border:1px solid rgba(216,181,90,.32)!important;
    box-shadow:0 -16px 45px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.06)!important;
    backdrop-filter:blur(18px)!important;
    box-sizing:border-box!important;
  }
  #tdNativeNav a, .td-native-nav a{
    min-width:0!important;
    width:100%!important;
    height:64px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    padding:4px 2px!important;
    border-radius:22px!important;
    color:#f4f0e5!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  #tdNativeNav a span:last-child, .td-native-nav a span:last-child{
    display:block!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    font-size:10.5px!important;
    font-weight:1000!important;
    line-height:1!important;
    letter-spacing:-.35px!important;
  }
  #tdNativeNav .td-nav-ico, .td-native-nav .td-nav-ico{font-size:21px!important; line-height:1!important; flex:0 0 auto!important;}
  #tdNativeNav a.active:not(.add), .td-native-nav a.active:not(.add){
    background:linear-gradient(135deg,rgba(216,181,90,.30),rgba(216,181,90,.10))!important;
    color:#ffd21a!important;
  }
  #tdNativeNav a.add, .td-native-nav a.add{
    grid-column:3!important;
    width:86px!important;
    height:86px!important;
    justify-self:center!important;
    transform:translateY(-20px)!important;
    border-radius:999px!important;
    background:radial-gradient(circle at 35% 25%,#fff06a 0,#ffd51b 36%,#ffc400 72%,#e2aa00 100%)!important;
    color:#070707!important;
    border:7px solid rgba(5,5,5,.94)!important;
    box-shadow:0 0 30px rgba(255,204,0,.42),0 14px 30px rgba(0,0,0,.52)!important;
    padding:8px 4px!important;
    z-index:5!important;
    overflow:visible!important;
  }
  #tdNativeNav a.add .td-nav-ico, .td-native-nav a.add .td-nav-ico{font-size:34px!important; line-height:.78!important; font-weight:1000!important;}
  #tdNativeNav a.add span:last-child, .td-native-nav a.add span:last-child{font-size:10.5px!important; letter-spacing:-.4px!important;}
  #tdNativeNav a:nth-child(1){grid-column:1!important;}
  #tdNativeNav a:nth-child(2){grid-column:2!important;}
  #tdNativeNav a:nth-child(3){grid-column:3!important;}
  #tdNativeNav a:nth-child(4){grid-column:4!important;}
  #tdNativeNav a:nth-child(5){grid-column:5!important;}
  body:not(.auth-loading){padding-bottom:calc(124px + env(safe-area-inset-bottom))!important;}
}
@media (max-width:390px){
  #tdNativeNav, .td-native-nav, .td-native-nav.td-native-nav-wide{
    grid-template-columns:minmax(48px,1fr) minmax(48px,1fr) 82px minmax(62px,1fr) minmax(50px,1fr)!important;
    column-gap:3px!important;
    padding:8px 8px!important;
  }
  #tdNativeNav a.add, .td-native-nav a.add{width:80px!important;height:80px!important;}
  #tdNativeNav a span:last-child, .td-native-nav a span:last-child{font-size:9.6px!important;letter-spacing:-.45px!important;}
}


/* ===== Navigation and loading centering ===== */
/* Fabio V0.1.7 - nav mobile centrata + niente flash durante caricamento */
#tdNativeNav,
.td-native-nav{
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
@media (min-width:921px){
  #tdNativeNav,
  .td-native-nav{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
  }
}
@media (max-width:920px){
  body:not(.auth-loading):not(.auth-active) #tdNativeNav.td-nav-ready,
  body:not(.auth-loading):not(.auth-active) .td-native-nav.td-nav-ready{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:calc(10px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:calc(100vw - 22px)!important;
    max-width:500px!important;
    height:76px!important;
    padding:7px 8px!important;
    box-sizing:border-box!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:center!important;
    justify-items:center!important;
    column-gap:0!important;
    row-gap:0!important;
    border-radius:28px!important;
    overflow:hidden!important;
    z-index:8800!important;
    background:rgba(9,8,7,.94)!important;
    border:1px solid rgba(216,181,90,.34)!important;
    box-shadow:0 -12px 34px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.06)!important;
    backdrop-filter:blur(18px)!important;
    -webkit-backdrop-filter:blur(18px)!important;
  }

  body.auth-loading #tdNativeNav,
  body.auth-loading .td-native-nav,
  body.auth-active #tdNativeNav,
  body.auth-active .td-native-nav{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  #tdNativeNav.td-nav-ready a,
  .td-native-nav.td-nav-ready a{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:62px!important;
    margin:0!important;
    padding:4px 1px!important;
    box-sizing:border-box!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    border-radius:20px!important;
    transform:none!important;
    color:#f4f0e5!important;
    text-decoration:none!important;
    text-align:center!important;
    font-size:10px!important;
    line-height:1!important;
    font-weight:900!important;
    letter-spacing:-.25px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }

  #tdNativeNav.td-nav-ready a span,
  .td-native-nav.td-nav-ready a span{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    text-align:center!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
  }

  #tdNativeNav.td-nav-ready .td-nav-ico,
  .td-native-nav.td-nav-ready .td-nav-ico{
    width:100%!important;
    text-align:center!important;
    font-size:22px!important;
    line-height:1!important;
    margin:0!important;
  }

  #tdNativeNav.td-nav-ready a.active:not(.add),
  .td-native-nav.td-nav-ready a.active:not(.add){
    background:linear-gradient(135deg,rgba(216,181,90,.30),rgba(216,181,90,.10))!important;
    color:#ffd21a!important;
  }

  #tdNativeNav.td-nav-ready a.add,
  .td-native-nav.td-nav-ready a.add{
    width:60px!important;
    height:60px!important;
    min-width:60px!important;
    max-width:60px!important;
    justify-self:center!important;
    align-self:center!important;
    margin:0!important;
    padding:6px 3px!important;
    border-radius:999px!important;
    background:linear-gradient(180deg,#ffe45a 0%,#ffd21a 45%,#ffc400 100%)!important;
    color:#050505!important;
    border:3px solid rgba(6,6,6,.92)!important;
    box-shadow:0 0 18px rgba(255,207,25,.30),0 8px 18px rgba(0,0,0,.42)!important;
    font-size:9.5px!important;
    line-height:1!important;
  }

  #tdNativeNav.td-nav-ready a.add .td-nav-ico,
  .td-native-nav.td-nav-ready a.add .td-nav-ico{
    font-size:27px!important;
    line-height:.86!important;
    font-weight:1000!important;
    margin:0!important;
  }

  /* Forza ogni voce nella sua colonna: sempre orizzontale, sempre centrata */
  #tdNativeNav.td-nav-ready a:nth-child(1), .td-native-nav.td-nav-ready a:nth-child(1){grid-column:1!important;}
  #tdNativeNav.td-nav-ready a:nth-child(2), .td-native-nav.td-nav-ready a:nth-child(2){grid-column:2!important;}
  #tdNativeNav.td-nav-ready a:nth-child(3), .td-native-nav.td-nav-ready a:nth-child(3){grid-column:3!important;}
  #tdNativeNav.td-nav-ready a:nth-child(4), .td-native-nav.td-nav-ready a:nth-child(4){grid-column:4!important;}
  #tdNativeNav.td-nav-ready a:nth-child(5), .td-native-nav.td-nav-ready a:nth-child(5){grid-column:5!important;}

  /* Meno spazio perso sotto, ma abbastanza per non coprire il contenuto */
  body:not(.auth-loading):not(.auth-active){
    padding-bottom:calc(98px + env(safe-area-inset-bottom))!important;
  }
}


/* ===== Safe loading and mobile navigation visibility ===== */
/* Durante il controllo auth torna il popup: niente contenuti mezzi visibili, niente navbar rotta */
body.auth-loading .loading-screen,
html.td-fast-auth body.auth-loading .loading-screen,
body.auth-loading #loadingScreen,
html.td-fast-auth body.auth-loading #loadingScreen{
  display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;
}
body.auth-loading .auth-screen,
body.auth-loading .header,
body.auth-loading main,
body.auth-loading .page,
body.auth-loading .container,
body.auth-loading .app-container,
body.auth-loading .hero,
body.auth-loading .panel,
body.auth-loading .form-section,
body.auth-loading .stats-section,
body.auth-loading .table-section,
body.auth-loading table,
body.auth-loading #tdNativeNav,
body.auth-loading .td-native-nav,
html.td-fast-auth body.auth-loading .auth-screen,
html.td-fast-auth body.auth-loading .header,
html.td-fast-auth body.auth-loading main,
html.td-fast-auth body.auth-loading .page,
html.td-fast-auth body.auth-loading .container,
html.td-fast-auth body.auth-loading .app-container,
html.td-fast-auth body.auth-loading .hero,
html.td-fast-auth body.auth-loading .panel,
html.td-fast-auth body.auth-loading .form-section,
html.td-fast-auth body.auth-loading .stats-section,
html.td-fast-auth body.auth-loading .table-section,
html.td-fast-auth body.auth-loading table,
html.td-fast-auth body.auth-loading #tdNativeNav,
html.td-fast-auth body.auth-loading .td-native-nav{
  display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;
}
.loading-screen{z-index:999999!important;background:radial-gradient(circle at 50% 35%,rgba(255,204,0,.10),rgba(0,0,0,.96) 45%,#050505 100%)!important;}
.loading-box{transform:scale(.92)!important;animation:tdLoadingIn .12s ease-out both!important;}
.loading-text{font-size:13px!important;margin-bottom:0!important;}
.spinner{width:34px!important;height:34px!important;border-width:3px!important;animation-duration:.58s!important;}
@keyframes tdLoadingIn{from{opacity:.75;transform:scale(.88)}to{opacity:1;transform:scale(.92)}}

/* Desktop/tablet: MAI mostrare la bottom nav mobile */
@media (min-width:921px){
  #tdNativeNav,.td-native-nav,.td-native-nav.td-nav-ready,.td-native-nav.td-native-nav-wide{display:none!important;visibility:hidden!important;pointer-events:none!important;}
}

@media (max-width:920px){
  body:not(.auth-loading):not(.auth-active){padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;}
  #tdNativeNav.td-nav-ready,
  .td-native-nav.td-nav-ready,
  .td-native-nav.td-nav-ready.td-native-nav-wide{
    display:grid!important;
    grid-template-columns:repeat(5,1fr)!important;
    align-items:center!important;justify-items:center!important;
    position:fixed!important;left:50%!important;right:auto!important;bottom:calc(10px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;width:calc(100vw - 20px)!important;max-width:460px!important;height:74px!important;
    padding:7px 8px!important;gap:0!important;box-sizing:border-box!important;border-radius:28px!important;overflow:visible!important;
    z-index:8800!important;background:rgba(9,8,7,.955)!important;border:1px solid rgba(216,181,90,.36)!important;
    box-shadow:0 -12px 34px rgba(0,0,0,.50), inset 0 1px 0 rgba(255,255,255,.06)!important;
    backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
  }
  #tdNativeNav.td-nav-ready:before,.td-native-nav.td-nav-ready:before{display:none!important;content:none!important;}
  #tdNativeNav.td-nav-ready a,
  .td-native-nav.td-nav-ready a{
    width:100%!important;min-width:0!important;max-width:100%!important;height:60px!important;margin:0!important;padding:4px 1px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;
    text-align:center!important;text-decoration:none!important;border-radius:19px!important;box-sizing:border-box!important;transform:none!important;
    font-size:9.2px!important;font-weight:950!important;line-height:1!important;letter-spacing:-.45px!important;color:#f4f0e5!important;
    white-space:nowrap!important;overflow:hidden!important;
  }
  #tdNativeNav.td-nav-ready a span,.td-native-nav.td-nav-ready a span{display:block!important;width:100%!important;text-align:center!important;overflow:hidden!important;text-overflow:clip!important;white-space:nowrap!important;}
  #tdNativeNav.td-nav-ready .td-nav-ico,.td-native-nav.td-nav-ready .td-nav-ico{font-size:21px!important;line-height:1!important;width:100%!important;text-align:center!important;margin:0!important;}
  #tdNativeNav.td-nav-ready a.add,
  .td-native-nav.td-nav-ready a.add{
    width:58px!important;height:58px!important;min-width:58px!important;max-width:58px!important;aspect-ratio:1/1!important;
    justify-self:center!important;align-self:center!important;padding:5px 2px!important;border-radius:50%!important;overflow:hidden!important;
    background:linear-gradient(180deg,#ffe866 0%,#ffd21a 52%,#ffc400 100%)!important;color:#050505!important;
    border:1.5px solid rgba(4,4,4,.94)!important;box-shadow:0 0 18px rgba(255,207,25,.32),0 6px 16px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.45)!important;
  }
  #tdNativeNav.td-nav-ready a.add .td-nav-ico,.td-native-nav.td-nav-ready a.add .td-nav-ico{font-size:27px!important;line-height:.88!important;font-weight:1000!important;}
  #tdNativeNav.td-nav-ready a.add span:last-child,.td-native-nav.td-nav-ready a.add span:last-child{font-size:8.8px!important;letter-spacing:-.55px!important;}
  #tdNativeNav.td-nav-ready a.active:not(.add),.td-native-nav.td-nav-ready a.active:not(.add){background:linear-gradient(135deg,rgba(216,181,90,.30),rgba(216,181,90,.10))!important;color:#ffd21a!important;}
  #tdNativeNav.td-nav-ready a:nth-child(1),.td-native-nav.td-nav-ready a:nth-child(1){grid-column:1!important;}
  #tdNativeNav.td-nav-ready a:nth-child(2),.td-native-nav.td-nav-ready a:nth-child(2){grid-column:2!important;}
  #tdNativeNav.td-nav-ready a:nth-child(3),.td-native-nav.td-nav-ready a:nth-child(3){grid-column:3!important;}
  #tdNativeNav.td-nav-ready a:nth-child(4),.td-native-nav.td-nav-ready a:nth-child(4){grid-column:4!important;}
  #tdNativeNav.td-nav-ready a:nth-child(5),.td-native-nav.td-nav-ready a:nth-child(5){grid-column:5!important;}
  body.auth-loading #tdNativeNav.td-nav-ready, body.auth-loading .td-native-nav.td-nav-ready,
  body.auth-active #tdNativeNav.td-nav-ready, body.auth-active .td-native-nav.td-nav-ready{display:none!important;visibility:hidden!important;opacity:0!important;pointer-events:none!important;}
}
@media (max-width:370px){
  #tdNativeNav.td-nav-ready,.td-native-nav.td-nav-ready{width:calc(100vw - 10px)!important;padding-left:5px!important;padding-right:5px!important;}
  #tdNativeNav.td-nav-ready a,.td-native-nav.td-nav-ready a{font-size:8.4px!important;letter-spacing:-.6px!important;}
  #tdNativeNav.td-nav-ready a.add,.td-native-nav.td-nav-ready a.add{width:56px!important;height:56px!important;min-width:56px!important;max-width:56px!important;}
}
