/* v0.9.15 main menu hub (src/ui/hub.js) and the new top bar. Left: the Next card, the road, four tiles. Right: today's events,
   weekend special, season, Weekly Cup, a small board and the privacy note. One .primary.big on the whole screen (the Next card's). */
.screen.hub { background: linear-gradient(90deg, rgba(4,6,11,0.88) 0%, rgba(4,6,11,0.55) 45%, rgba(4,6,11,0.82) 100%); }
.hub-grid { position: absolute; inset: var(--bar-h) 0 0 0; display: grid; grid-template-columns: minmax(0, 1fr) min(27rem, 44vw); gap: clamp(12px, 3vw, 40px); padding: clamp(8px, 2vh, 22px) clamp(14px, 3vw, 40px) clamp(8px, 2vh, 20px); min-height: 0; }
.hub-left { display: flex; flex-direction: column; gap: clamp(6px, 1.6vh, 14px); min-width: 0; min-height: 0; overflow-y: auto; scrollbar-width: none; justify-content: center; }
.hub-left::-webkit-scrollbar { display: none; }
.hub-right { display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 10px); min-width: 0; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; }
.hub-logo { font-size: clamp(30px, 8vh, 84px); flex: none; flex-direction: row; align-items: baseline; gap: 0.12em; }
.hub-logo i { margin: 0 0 0 4px; font-size: 0.36em; }

/* the Next card */
.hub-next { display: grid; gap: clamp(3px, 0.9vh, 8px); padding: clamp(10px, 2vh, 20px) clamp(12px, 2vw, 22px); border-radius: var(--radius); border: 1px solid var(--acc-line); background: linear-gradient(160deg, rgba(255,204,0,0.1), rgba(10,13,19,0.78) 62%); backdrop-filter: blur(8px); max-width: 640px; flex: none; }
.hub-next.high { border-color: #ff7a3c; background: linear-gradient(160deg, rgba(255,122,60,0.16), rgba(10,13,19,0.8) 62%); }
.hn-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hn-rate { margin-left: auto; font: 700 12.5px var(--f-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.hn-rate b { color: var(--acc); font-size: 17px; margin-left: 3px; }
.hb-high { font-style: normal; font: 800 11px var(--f-display); letter-spacing: 0.14em; text-transform: uppercase; color: #111; background: #ff7a3c; border-radius: 999px; padding: 2px 9px; }
.hub-next h2 { font-size: clamp(22px, 4.6vh, 38px); }
.hn-sub { margin: 0; color: var(--txt-2); font-size: clamp(11.5px, 1.7vh, 13.5px); }
.hn-goal { margin: 2px 0 0; font-weight: 700; font-size: clamp(12.5px, 1.9vh, 15px); }
.hb-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: 4px; background: var(--acc); transition: width .5s var(--ease); }
.hb-bar.season i { background: #7fe0d6; } .hb-bar.cup i { background: #38bdf8; }
.hub-go { margin-top: clamp(4px, 1vh, 10px); width: 100%; font-size: clamp(17px, 3vh, 24px); padding: clamp(10px, 1.8vh, 18px) 22px; animation: hub-pulse 1.8s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(255,204,0,0.5), 0 6px 24px rgba(255,204,0,0.28); }
.hub-go svg { width: 1em; height: 1em; }
@keyframes hub-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,204,0,0.45), 0 6px 24px rgba(255,204,0,0.25); transform: scale(1); } 50% { box-shadow: 0 0 0 9px rgba(255,204,0,0), 0 8px 30px rgba(255,204,0,0.45); transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) { .hub-go { animation: none; } }

/* the road: Scout > Club > Camp > Pro/Am > Pro > Championship, and seven league dots */
.hub-path { display: flex; align-items: center; gap: 8px 16px; flex-wrap: nowrap; max-width: 640px; flex: none; container-type: inline-size; }
.hub-path ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.hub-path li { white-space: nowrap; }
.hub-path li { display: flex; align-items: center; gap: 5px; font: 700 12.5px var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.hub-path li + li::before { content: '›'; margin: 0 5px 0 3px; color: var(--dim); font-size: 15px; }
.hub-path li i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--dim); }
.hub-path li.done { color: var(--txt-2); } .hub-path li.done i { background: var(--good); border-color: var(--good); }
.hub-path li.cur { color: #fff; } .hub-path li.cur i { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 8px var(--acc); }
.hb-dots { display: flex; gap: 5px; align-items: center; }
.hb-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.hb-dots i.done { opacity: 0.8; } .hb-dots i.cur { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 10px var(--c); }

/* narrow road (a short window or a narrow left column): one line, the current step only, then the league dots */
@container (max-width: 590px) {
  .hub-path li:not(.cur) { display: none; }
  .hub-path li.cur::before { display: none; }
  .hub-path ol { flex: none; }
  .hub-path li { font-size: 12px; }
}
/* tiles: secondary buttons */
.hub-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(6px, 1vw, 10px); max-width: 640px; flex: none; }
.hub-tile { position: relative; flex-direction: column; gap: 4px; padding: clamp(6px, 1.4vh, 12px) 6px; background: rgba(10,13,19,0.7); backdrop-filter: blur(8px); font: 700 13px var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; min-width: 0; }
.hub-tile svg { width: clamp(20px, 3.4vh, 28px); height: clamp(20px, 3.4vh, 28px); }
.hub-tile:hover { border-color: var(--acc-line); }
.hb-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--acc); color: #111; font: 800 11px/17px var(--f-ui, inherit); font-style: normal; text-align: center; letter-spacing: 0; box-shadow: 0 0 0 2px #0a0d13; pointer-events: none; }
.hb-track { margin-left: 8px; font-size: 11.5px; flex: none; }
.hub-help { align-self: flex-start; font-size: 12px; color: var(--dim); }

/* the right column */
.hub-card { background: rgba(10,13,19,0.78); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(7px, 1.2vh, 12px) 12px; backdrop-filter: blur(8px); flex: none; }
.hc-h { display: flex; align-items: baseline; gap: 8px; }
.hc-h .kick { flex: 1; min-width: 0; font-size: 12px; }
.hb-cd, .hb-left { font: 700 12.5px var(--mono); color: var(--txt-2); white-space: nowrap; }
.hb-cd .t { color: #fff; }
.hb-i { flex: none; align-self: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); background: none; font: 800 12px/1 serif; font-style: italic; color: var(--txt-2); }
.hb-i:hover { border-color: var(--acc); color: var(--acc); }
.hb-evs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.hb-ev { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.hub-wk .hb-ev { margin-top: 6px; }
.he-t { min-width: 0; display: grid; }
.he-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-t small { color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-start { padding: 5px 10px; font-size: 12px; white-space: nowrap; background: rgba(255,255,255,0.06); }
.hb-start svg { width: 12px; height: 12px; }
.hb-medal { font: 800 11px var(--f-display); letter-spacing: 0.1em; text-transform: uppercase; min-width: 44px; text-align: center; padding: 2px 6px; border-radius: 999px; }
.hb-medal.none { color: var(--dim); }
.hb-medal.m1 { background: #b8682c; color: #fff; } .hb-medal.m2 { background: #aab4c0; color: #111; } .hb-medal.m3 { background: #f5c542; color: #111; }
.hb-medals { margin: 6px 0 0; color: var(--dim); font-size: 11.5px; }
.hb-note { margin: 5px 0 0; color: var(--txt-2); font-size: 12px; line-height: 1.35; }
.hub-season .hb-bar, .hub-cup .hb-bar { margin-top: 6px; }
.hub-board .lb { margin: 4px 0 0; }
.hub-board .link { font-size: 11.5px; }
.hb-privacy { margin: 0; color: var(--dim); font-size: 11px; line-height: 1.4; flex: none; }

/* "How points work" and the first-visit dialogs */
.hub-modal .hi-card { width: min(520px, 100%); max-height: 100%; overflow-y: auto; background: #0e1219; border: 1px solid var(--acc-line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; }
.hi-card h2 { font-size: 26px; } .hi-card p { margin: 0; color: var(--txt-2); }
.hi-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hi-card li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.hi-card li b { display: block; } .hi-card li span:not(.hp-ic) { color: var(--txt-2); font-size: 13px; line-height: 1.4; }
.hp-ic svg { width: 26px; height: 26px; color: var(--acc); }
.hi-card .hi-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.hi-rows em { font-style: normal; color: var(--acc); font-weight: 700; text-align: right; }
.hi-total { display: flex; align-items: center; gap: 8px; font-size: 18px; } .hi-total svg { width: 26px; height: 26px; }
.hi-card .primary { justify-self: start; }

/* the top bar: brand, then (right) me, stage, credits, streak, updates, settings */
.tb-me { gap: 8px; max-width: 34vw; min-width: 0; }
.tb-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.tb-who { display: grid; text-align: left; min-width: 0; line-height: 1.1; }
.tb-name { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 8px var(--g, transparent), 0 0 2px var(--g, transparent); }
.tb-name.flicker { animation: tb-flick 1.6s ease-in-out infinite; }
@keyframes tb-flick { 50% { opacity: 0.8; } }
.tb-who small { color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; }
.tb-stage { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 700 13px var(--f-display); letter-spacing: 0.08em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.tb-stage i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.tb-streak { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255,122,60,0.5); background: rgba(255,122,60,0.1); color: #ffb98f; font-weight: 800; }
.tb-streak svg { width: 16px; height: 16px; } .tb-streak b { font-family: var(--mono); font-size: 13px; }
@media (max-width: 1100px) { .tb-me .ttl { display: none; } }
@media (max-width: 900px) { .tb-who small { display: none; } .tb-stage { padding: 0 9px; font-size: 12px; } }
@media (max-width: 760px) { .tb-streak { display: none; } .tb-me { max-width: 22vw; } .tb-stage { max-width: 28vw; overflow: hidden; text-overflow: ellipsis; } }

/* narrow: one column, the page scrolls */
@media (max-width: 700px) {
  .hub-grid { display: block; overflow-y: auto; }
  .hub-left, .hub-right { overflow: visible; }
  .hub-right { margin-top: 14px; }
}
/* the smallest heights: the Next card and the tiles tighten; the right column scrolls */
@media (max-height: 520px) {
  .hub-logo { font-size: 28px; }
  .hn-sub { display: none; }
  .hub-path li { font-size: 11px; }
  .hub-tile { flex-direction: row; justify-content: center; padding: 6px 12px 6px 6px; }
  .hub-help { display: none; }
}

/* v0.9.19 tile icons (src/ui/navIcons.js): still until hovered, then one motion each */
.hub-tile .ni { overflow: visible; transition: transform .25s ease, color .2s; }
.hub-tile:hover .ni, .hub-tile:focus-visible .ni { color: #fff; transform: translateY(-2px); }
.hub-tile .ni-wave { transform-origin: 7px 5px; }
.hub-tile:hover .ni-wave { animation: niWave 1.1s ease-in-out infinite; }
@keyframes niWave { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-4deg) scaleX(.94); } }
.hub-tile .ni-shine path { transition: none; }
.hub-tile:hover .ni-shine path { animation: niShine 1.4s ease-out infinite; }
@keyframes niShine { 0% { opacity: 0; transform: translateX(0); } 20% { opacity: .55; } 70% { opacity: 0; transform: translateX(22px); } 100% { opacity: 0; transform: translateX(22px); } }
.hub-tile:hover .ni-lift { animation: niLift .9s cubic-bezier(.3, 1.6, .5, 1) infinite alternate; }
@keyframes niLift { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }
.hub-tile:hover .ni-wheel { animation: niSpin .7s linear infinite; }
@keyframes niSpin { to { transform: rotate(360deg); } }
.hub-tile .ni-glint { opacity: .25; }
.hub-tile:hover .ni-glint { animation: niGlint 1.6s ease-in-out infinite; }
@keyframes niGlint { 0%, 100% { opacity: .25; transform: translateX(0); } 45% { opacity: 1; transform: translateX(8px); } 60% { opacity: 0; transform: translateX(10px); } }
@media (prefers-reduced-motion: reduce) { .hub-tile .ni, .hub-tile .ni * { animation: none !important; transition: none !important; } }

/* v0.9.27 (764x385 check): in a short window a hub card's own button never hides below the edge: the card scrolls,
   its last row (the button) stays pinned at the bottom of the card */
@media (max-height: 560px) {
  .hub-modal .hi-card { padding: 12px 16px; gap: 8px; }
  .hi-card h2 { font-size: 21px; }
  .hub-modal .hi-card > :last-child:is(.row, .hi-foot) { position: sticky; bottom: -12px; z-index: 2; margin: 0 -16px -12px; padding: 8px 16px 10px; background: linear-gradient(180deg, rgba(14, 18, 25, 0.85), #0e1219 35%); }
  .hub-modal .hi-card > :last-child:is(.primary, button) { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 0 4px #0e1219, 0 6px 0 6px #0e1219; }
  .bn-gift { padding: 8px 12px; } .bn-gift b { font-size: 21px; }
  .bn-ray img { width: 44px; height: 44px; } .bn-ray h2 { font-size: 20px; }
}
.hub-modal .hi-card { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
/* v0.9.27: in the short-window row of tiles the count sits after the label, never on it */
@media (max-height: 520px) { .hub-tile .hb-badge { position: static; margin-left: 2px; } }
/* v0.9.28 free credits for a rewarded ad, under the Next button */
.hub-free { display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; width: 100%; padding: 8px 12px; color: var(--acc); border-color: rgba(255, 204, 0, 0.45); font-weight: 800; }
@media (max-height: 520px) { .hub-free { margin-top: 5px; padding: 5px 10px; font-size: 12.5px; } }
