/* =====================================================================
   HOME + NAV POLISH — loads last. Scoped to #home / specific widgets so
   other pages are untouched. Class names avoid "ad-" / "ads" on purpose.
   ===================================================================== */

/* ---------- 1. Hero fits one screen: crest, then the join button, then the story ---------- */
#home.hero.tab-section.tab-active{
  display:flex; flex-direction:column; align-items:center;
  padding:84px 24px 64px;
}
#home .season-banner{order:1; margin-bottom:12px;}
#home .hero-crest{order:2; width:clamp(230px, min(32vw, 40vh), 390px);}
#home .powered-by{order:3; margin-top:10px;}
#home .hero-actions{order:4;}
#home .hero .sub, #home p.sub{order:5; max-width:560px; margin:22px auto 0;}
#home .countdown-card{order:6;}
#home .facts{order:7; margin-top:26px;}
#home .home-cup{order:8;}
#home .home-features{order:9;}
#home .hero-standings-card{order:10;}
#home .ad-slot-home{order:11; width:100%; max-width:880px;}

/* primary actions */
.hero-actions{position:relative; z-index:1; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin-top:22px;}
#home .player-bar{
  display:inline-flex; margin:0; padding:0; background:none; border:0; backdrop-filter:none; -webkit-backdrop-filter:none; gap:12px;
}
#home .player-status:not(:empty){
  padding:9px 14px; border:1px solid var(--line); border-radius:999px; background:rgba(var(--bg-rgb),.85);
}
#home .create-account-btn{
  min-width:0; height:50px; padding:0 34px; border:0; border-radius:0; cursor:pointer;
  font-family:'Teko',sans-serif; font-size:21px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:var(--on-gold); background:linear-gradient(135deg,var(--gold-hover),var(--gold) 55%);
  clip-path:polygon(14px 0,100% 0,calc(100% - 14px) 100%,0 100%);
  filter:drop-shadow(0 0 14px rgba(var(--gold-rgb),.4));
  box-shadow:none; transition:filter .2s, transform .2s;
}
#home .create-account-btn:hover{filter:drop-shadow(0 0 22px rgba(var(--gold-rgb),.75)); transform:translateY(-2px); background:linear-gradient(135deg,var(--gold-hover),var(--gold) 55%);}
#home .create-account-btn:focus-visible,.hero-secondary:focus-visible{outline:2px solid var(--gold); outline-offset:3px;}
#home .create-account-btn:disabled{filter:grayscale(.6) opacity(.7); cursor:not-allowed; transform:none;}
.hero-secondary{
  display:inline-flex; align-items:center; gap:8px; height:50px; padding:0 24px; text-decoration:none;
  font-family:'Teko',sans-serif; font-size:21px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text);
  clip-path:polygon(14px 0,100% 0,calc(100% - 14px) 100%,0 100%);
  background:rgba(255,255,255,.06); box-shadow:inset 0 0 0 1px rgba(var(--gold-rgb),.45);
  transition:background .2s, color .2s;
}
.hero-secondary svg{width:18px; height:18px;}
.hero-secondary:hover{background:rgba(var(--gold-rgb),.14); color:var(--gold);}

/* ---------- 2. "What you can do here" cards ---------- */
.home-features{
  position:relative; z-index:1; width:100%; max-width:980px; margin-top:44px;
  display:grid; grid-template-columns:repeat(4,1fr); gap:12px; text-align:left;
}
.hf-card{
  display:flex; flex-direction:column; gap:10px; padding:16px; border-radius:16px; text-decoration:none; color:var(--text);
  font-family:'Manrope',sans-serif;
  background:linear-gradient(180deg, rgba(var(--gold-rgb),.07), rgba(var(--gold-rgb),.015));
  border:1px solid rgba(var(--gold-rgb),.16);
  transition:transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.hf-card:hover{transform:translateY(-3px); border-color:rgba(var(--gold-rgb),.55); background:rgba(var(--gold-rgb),.09); box-shadow:0 18px 34px -20px rgba(var(--gold-rgb),.8);}
.hf-card:focus-visible{outline:2px solid var(--gold); outline-offset:3px;}
.hf-ico{width:40px; height:40px; display:grid; place-items:center; border-radius:11px; color:var(--gold); background:rgba(var(--gold-rgb),.1); border:1px solid rgba(var(--gold-rgb),.25);}
.hf-ico svg{width:21px; height:21px;}
.hf-title{font-size:14.5px; font-weight:800; line-height:1.25;}
.hf-text{font-size:12.5px; font-weight:500; line-height:1.5; color:var(--muted);}
.hf-more{margin-top:auto; font-size:12px; font-weight:800; color:var(--gold); display:inline-flex; align-items:center; gap:4px;}
.hf-more svg{width:14px; height:14px; transition:transform .2s;}
.hf-card:hover .hf-more svg{transform:translateX(3px);}
@media (max-width:900px){ .home-features{grid-template-columns:1fr 1fr;} }
@media (max-width:520px){ .home-features{grid-template-columns:1fr;} .hero-actions{flex-direction:column;} #home .create-account-btn,.hero-secondary{width:100%; justify-content:center;} }

/* ---------- 3. Standings card: fits its box instead of scrolling sideways ---------- */
.hs-panel table{min-width:0; width:100%;}
.hs-panel thead th,.hs-panel tbody td{padding:8px 4px;}
.hs-panel thead th:nth-child(2),.hs-panel tbody td:nth-child(2){text-align:left; max-width:108px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.hs-panel .standings-wrap{overflow-x:auto;}
/* small labels: readable, not tiny + super-spaced */
.hs-panel .hs-title{font-size:19px; letter-spacing:.1em;}
.hs-panel .hs-legend{font-size:11.5px;}
.countdown-label{letter-spacing:.2em;}

/* ---------- 4. Snow sits BEHIND cards and text ---------- */
#seasonFx{z-index:0;}
html[data-season="winter"] .snowflake{opacity:.8;}

/* ---------- 5. Cookie notice: small corner card instead of a full-width bar ---------- */
@media (min-width:700px){
  #cookieConsentBar{
    left:auto; right:20px; bottom:20px; width:min(400px, calc(100vw - 40px)); padding:16px 18px;
    border:1px solid rgba(var(--gold-rgb),.28); border-radius:16px;
    background:linear-gradient(180deg, var(--panel-2), var(--panel));
    box-shadow:0 24px 60px -16px rgba(0,0,0,.8);
  }
  #cookieConsentBar .cookie-consent-inner{flex-direction:column; align-items:stretch; gap:12px; text-align:left;}
  #cookieConsentBar .cookie-consent-text{flex:none; font-size:12.5px;}
  #cookieConsentBar .cookie-consent-actions{justify-content:flex-end;}
}
.cookie-consent-btn{border-radius:10px;}
.cookie-consent-btn.accept{background:linear-gradient(135deg,var(--gold-hover),var(--gold)); border-color:transparent;}

/* ---------- 6. Navbar: Patch Notes is an icon (tooltip says what it is) at every width ---------- */
.nav-patch-btn{font-size:0 !important; gap:0 !important; padding:0 9px !important;}
.nav-patch-btn .nav-patch-icon{margin:0;}

@media (prefers-reduced-motion:reduce){ .hf-card,.hf-more svg,#home .create-account-btn{transition:none;} }

/* side widgets stay level with the crest instead of drifting down as the hero grows */
@media (min-width:981px){ #home .countdown-card{top:clamp(150px, 22vh, 250px); transform:none;} }
@media (min-width:1181px){ #home .hero-standings-card{top:clamp(150px, 22vh, 250px); transform:none;} }

/* phones: the notice was ~400px tall (flex-basis applied to height in a column) and its buttons hid behind the bottom nav */
@media (max-width:699px){
  #cookieConsentBar{
    left:10px; right:10px; bottom:calc(86px + env(safe-area-inset-bottom, 0px)); padding:14px 16px;
    border:1px solid rgba(var(--gold-rgb),.28); border-radius:16px; z-index:1001;
    background:linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow:0 20px 50px -14px rgba(0,0,0,.85);
  }
  #cookieConsentBar .cookie-consent-inner{flex-direction:column; align-items:stretch; gap:10px; text-align:left;}
  #cookieConsentBar .cookie-consent-text{flex:none; font-size:12.5px;}
  #cookieConsentBar .cookie-consent-actions{justify-content:flex-end;}
}

/* generic <section> rules elsewhere must not add padding/height to the feature row */
#home .home-features{padding:0; min-height:0; border:0; background:none; align-items:stretch; box-sizing:border-box;}
@media (max-width:520px){ #home .create-account-btn{font-size:19px; letter-spacing:.05em; padding:0 14px;} }

/* More menu: line icons (set with CSS so translations can't wipe them) */
.nav-more-menu .nav-link[data-tab="chess"]::before,.nav-more-menu .nav-link[data-tab="predictions"]::before,.nav-more-menu .nav-link[data-tab="leaderboard"]::before,.nav-more-menu .nav-link[data-tab="lounge"]::before,.nav-more-menu .nav-link[data-tab="team"]::before{
  content:""; display:inline-block; width:16px; height:16px; margin-right:0; vertical-align:-3px; flex:none; background:currentColor; color:var(--gold);
  -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat;
}
.nav-more-menu .nav-link[data-tab="chess"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M7 20h10M8 20l1-9H7V7h2V5h2v2h2V5h2v2h2v4h-2l1 9M9 11h6%22/%3E%3C/svg%3E");}
.nav-more-menu .nav-link[data-tab="predictions"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%228.5%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%224.5%22/%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%221%22/%3E%3C/svg%3E");}
.nav-more-menu .nav-link[data-tab="leaderboard"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 20V13h4v7M10 20V5h4v15M16 20v-9h4v9M3 20h18%22/%3E%3C/svg%3E");}
.nav-more-menu .nav-link[data-tab="lounge"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Crect x=%229%22 y=%223.500%22 width=%226%22 height=%2211%22 rx=%223%22/%3E%3Cpath d=%22M5.500 11.500a6.500 6.500 0 0 0 13 0M12 18v3M9 21h6%22/%3E%3C/svg%3E");}
.nav-more-menu .nav-link[data-tab="team"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Ccircle cx=%229%22 cy=%228%22 r=%223.200%22/%3E%3Cpath d=%22M3.500 19c.4-3 2.700-5 5.500-5s5.100 2 5.500 5M16 5.200a3.100 3.100 0 0 1 0 5.600M17.500 14.300c1.800.6 3 2.300 3.300 4.700%22/%3E%3C/svg%3E");}

/* Captains' Cup in the More menu */
.nav-more-menu .nav-link[data-tab="captainscup"]{--ico:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%23000%22 stroke-width=%221.8%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M4 8l4 4 4-6 4 6 4-4-1.5 10h-13L4 8Z%22/%3E%3C/svg%3E");}
.nav-more-menu .nav-link[data-tab="captainscup"]::before{content:""; display:inline-block; width:16px; height:16px; margin-right:0; vertical-align:-3px; flex:none; background:currentColor; color:var(--gold);
  -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat;}
