/* Homepage "Results are out" reveal (Admin → Results → Announce on home page). */
html.ra-lock, html.ra-lock body { overflow: hidden; }
/* Never cover the page while closed, even if the script could not run. */
.ra-overlay[hidden], .ra-pill[hidden] { display: none !important; }
.ra-overlay { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(40,58,160,.92) 0%, rgba(10,14,50,.95) 55%, rgba(5,7,26,.97) 100%);
  opacity: 0; transition: opacity .35s ease; }
.ra-overlay.open { opacity: 1; }
.ra-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* The card always fits the window: the middle scrolls, the search and buttons stay in view at the bottom. */
.ra-card { position: relative; width: min(980px, 100%); max-height: calc(100vh - 36px); max-height: calc(100dvh - 36px); display: flex; flex-direction: column; overflow: hidden; padding: 0; border-radius: 28px; color: #fff; text-align: center;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.2); backdrop-filter: blur(14px);
  transform: translateY(30px) scale(.96); transition: transform .55s cubic-bezier(.2,.9,.25,1.15); }
.ra-overlay.open .ra-card { transform: none; }
.ra-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 34px 34px 16px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.ra-foot { flex: none; padding: 16px 34px 22px; border-top: 1px solid rgba(255,255,255,.12); background: rgba(8,11,40,.55); }
.ra-x { position: absolute; z-index: 2; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  color: #fff; cursor: pointer; font-size: 16px; transition: background .2s, transform .2s; }
.ra-x:hover { background: rgba(255,255,255,.2); transform: rotate(90deg); }

.ra-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(253,230,138,.14); color: #fde68a; border: 1px solid rgba(253,230,138,.35); }
.ra-title { margin: 14px 0 6px; color: #fff; font: 600 clamp(34px, 6vw, 64px)/1.04 var(--font); letter-spacing: -.035em;
  background: linear-gradient(100deg, #fff 0%, #fde68a 30%, #f59e0b 50%, #f0abfc 75%, #fff 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: raShimmer 5s linear infinite; }
@keyframes raShimmer { to { background-position: -220% 0; } }
.ra-text { margin: 0 auto 6px; max-width: 56ch; color: #cfd6ff; }
.ra-stats { display: inline-flex; gap: 12px; margin: 16px 0 6px; }
.ra-stats div { min-width: 120px; padding: 10px 18px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.ra-stats strong { display: block; font: 600 30px/1.1 var(--font); font-variant-numeric: tabular-nums; }
.ra-stats span { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #b9c2ec; }

.ra-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 20px 0 4px; }
.ra-tab { border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #e6eaff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font: 500 14px var(--font); transition: background .2s, color .2s; }
.ra-tab:hover { background: rgba(255,255,255,.14); }
.ra-tab.active { background: #fff; color: #0b1033; border-color: #fff; }
.ra-race { margin-top: 14px; }
.ra-race.active .ra-step { animation: raRise .75s cubic-bezier(.2,.9,.25,1.12) both; }
.ra-race.active .ra-step.place-1 { animation-delay: .25s; } .ra-race.active .ra-step.place-2 { animation-delay: .1s; } .ra-race.active .ra-step.place-3 { animation-delay: .4s; }
@keyframes raRise { from { opacity: 0; transform: translateY(46px); } }
.ra-race-name { margin: 0 0 10px; font-weight: 600; color: #fff; }
.ra-race-name span { color: #b9c2ec; font-weight: 400; }
.ra-podiums { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ra-podium { padding: 16px 14px 0; border-radius: 20px; background: linear-gradient(180deg, rgba(37,99,235,.28), rgba(37,99,235,.06)); border: 1px solid rgba(147,197,253,.22); overflow: hidden; }
.ra-podium + .ra-podium { background: linear-gradient(180deg, rgba(236,72,153,.28), rgba(236,72,153,.06)); border-color: rgba(249,168,212,.22); }
.ra-podium h4 { margin: 0 0 6px; color: #fff; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.ra-steps { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; }
.ra-step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.ra-step.is-empty { visibility: hidden; }
.ra-face { --s: 68px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--h), 75%, 55%), hsl(calc(var(--h) + 50), 75%, 42%)); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 10px 24px rgba(0,0,0,.4); }
.ra-face b { font-size: calc(var(--s) * .36); font-weight: 600; color: #fff; }
.ra-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.place-1 .ra-face { --s: 88px; box-shadow: 0 0 0 3px #fbbf24, 0 0 34px rgba(251,191,36,.6); }
.ra-medal { margin-top: -20px; position: relative; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: 12px; color: #2a1700;
  background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.place-2 .ra-medal { background: linear-gradient(135deg, #f1f5f9, #94a3b8); }
.place-3 .ra-medal { background: linear-gradient(135deg, #fdba74, #b45309); }
.ra-step strong { font-size: 13.5px; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; }
.ra-time { font-size: 12.5px; color: #cfd6ff; font-variant-numeric: tabular-nums; }
.ra-block { width: 100%; border-radius: 10px 10px 0 0; margin-top: 4px; background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.05)); }
.place-1 .ra-block { height: 70px; background: linear-gradient(180deg, rgba(253,230,138,.6), rgba(245,158,11,.12)); }
.place-2 .ra-block { height: 50px; } .place-3 .ra-block { height: 36px; }

.ra-find { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 6px 6px 6px 18px; border-radius: 999px;
  background: #fff; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6); }
.ra-find i { color: var(--muted); }
.ra-find input { flex: 1; min-width: 0; border: 0; outline: 0; font: 15px var(--font); padding: 10px 0; background: transparent; color: var(--ink); }
.ra-find .btn { border-radius: 999px; padding: 10px 20px; }
.ra-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.ra-actions .btn-primary { background: linear-gradient(115deg, #f59e0b, #ec4899); color: #fff; box-shadow: 0 14px 30px -12px #ec4899; }
.ra-skip { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.ra-skip:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* Small reminder after skipping */
.ra-pill { position: fixed; z-index: 120; left: 18px; bottom: 18px; display: flex; align-items: center; border-radius: 999px; background: #0b1033; color: #fff;
  box-shadow: 0 16px 36px -14px rgba(11,16,51,.8); transform: translateY(120%); opacity: 0; transition: transform .4s cubic-bezier(.2,.9,.25,1.15), opacity .3s; }
.ra-pill.show { transform: none; opacity: 1; }
.ra-pill-open { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.ra-pill-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #2a1700; background: linear-gradient(135deg, #fde68a, #f59e0b); animation: raBob 2.4s ease-in-out infinite; }
@keyframes raBob { 50% { transform: translateY(-3px) rotate(-8deg); } }
.ra-pill-open strong { display: block; font-size: 14px; }
.ra-pill-open small { font-size: 12px; color: #b9c2ec; }
.ra-pill-x { width: 34px; height: 34px; margin-right: 6px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.ra-pill-x:hover { background: rgba(255,255,255,.22); }

/* Laptop screens: everything a little more compact so the podiums fit without scrolling. */
@media (max-height: 820px) {
  .ra-scroll { padding-top: 24px; }
  .ra-title { font-size: clamp(30px, 5vw, 46px); margin-top: 10px; }
  .ra-stats { margin-top: 10px; }
  .ra-stats div { padding: 6px 14px; } .ra-stats strong { font-size: 24px; }
  .ra-tabs { margin-top: 12px; }
  .ra-face { --s: 54px; } .place-1 .ra-face { --s: 70px; }
  .place-1 .ra-block { height: 48px; } .place-2 .ra-block { height: 34px; } .place-3 .ra-block { height: 24px; }
  .ra-foot { padding: 12px 24px 16px; }
}
@media (max-width: 760px) {
  .ra-card { border-radius: 22px; }
  .ra-scroll { padding: 60px 16px 12px; }
  .ra-foot { padding: 12px 14px 14px; }
  .ra-x { top: 12px; right: 12px; }
  .ra-podiums { grid-template-columns: 1fr; }
  .ra-face { --s: 56px; } .place-1 .ra-face { --s: 70px; }
  .ra-stats div { min-width: 96px; padding: 8px 12px; }
  .ra-find { padding-left: 14px; }
  .ra-actions .btn { flex: 1 1 0; justify-content: center; padding-left: 10px; padding-right: 10px; font-size: 14px; }
  .ra-pill { left: 12px; right: 12px; bottom: 12px; }
  .ra-pill-open { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .ra-title { animation: none; } }
/* A soft fade at the bottom of the podium area hints that it scrolls. */
.ra-scroll { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
/* Very short windows (small laptops with zoom): keep the headline, go straight to the podiums. */
@media (max-height: 620px) {
  .ra-scroll { padding-top: 16px; }
  .ra-kicker { padding: 4px 12px; font-size: 11px; }
  .ra-title { font-size: 30px; margin: 8px 0 2px; }
  .ra-text, .ra-stats { display: none; }
  .ra-tabs { margin-top: 8px; }
  .ra-race { margin-top: 8px; }
  .ra-race-name { margin-bottom: 6px; font-size: 14px; }
  .ra-face { --s: 46px; } .place-1 .ra-face { --s: 58px; }
  .ra-step strong { font-size: 12.5px; }
  .ra-foot { padding: 10px 20px 12px; }
  .ra-find .btn, .ra-actions .btn { padding-top: 8px; padding-bottom: 8px; }
}
