/* Can & Bottle Race — carried over from the original leaderboard page, namespaced with cr- */
.cr { --cr-gold: #F2C230; --cr-silver: #C3CAD3; --cr-bronze: #D3925E; }
.cr-hero { overflow: hidden; position: relative; }
.cr-hero .wrap.cr-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; padding-block: 2.6rem 3.6rem; }
.cr-hero-text { display: grid; gap: .9rem; justify-items: start; min-width: 0; }
.cr-hero h1 { margin: 0; }
.cr-lead { font-size: 1.15rem; color: rgba(255,255,255,.92); max-width: 34rem; min-height: 1.4em; }
.cr-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.cr-pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .35rem .85rem; font-weight: 600; font-size: .92rem; }
.cr-pill b { font-weight: 800; color: var(--gold); }
.cr-stage { position: relative; width: min(24rem, 100%); max-width: 100%; aspect-ratio: 320 / 250; justify-self: center; }
.cr-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cr-confetti { position: absolute; inset: -10% -20%; pointer-events: none; overflow: hidden; }
.cr-confetti i { position: absolute; width: .5rem; height: .9rem; border-radius: 2px; opacity: .9; }
@media (max-width: 760px) {
  .cr-hero .wrap.cr-hero-grid { grid-template-columns: 1fr; padding-block: 2rem 3.2rem; }
  .cr-stage { width: min(18rem, 90%); }
}

.cr-tabs { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 3.85rem); z-index: 10; }
.cr-tabs .wrap { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding-block: .5rem; }
.cr-tabs .wrap > a:first-child { margin-left: auto; }
.cr-tabs .wrap > a:last-child { margin-right: auto; }
.cr-tabs a { text-decoration: none; font: 700 .92rem var(--f-display); color: var(--navy); padding: .5rem .8rem; border-radius: 8px; white-space: nowrap; }
.cr-tabs a:hover { background: var(--sky); }
.cr-tabs a[aria-current="page"] { background: var(--navy); color: #fff; }
@media (max-width: 860px) { .cr-tabs { top: calc(env(safe-area-inset-top, 0px) + 3.7rem); } }

.cr-main { max-width: 56rem; padding-block: 1.5rem 3rem; }
.cr-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem 1rem; }
.cr-card h2 { font-size: 1.35rem; }
.cr-note { margin: .25rem 0 1rem; color: var(--muted); font-size: .92rem; }
.cr-msg { padding: 1rem; text-align: center; color: var(--muted); }

.cr-podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: .5rem; }
.cr-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; min-width: 0; }
.cr-medal { font-size: 2rem; line-height: 1; }
.cr-who { font-weight: 700; font-size: 1rem; overflow-wrap: anywhere; min-height: 1.3em; }
.cr-den { font-size: .82rem; color: var(--muted); min-height: 1.1em; }
.cr-block { width: 100%; border-radius: 8px 8px 0 0; display: flex; justify-content: center; padding-top: .5rem; font: 800 1.8rem var(--f-display); color: #1d2733; }
.cr-p1 .cr-block { height: 7rem; background: var(--cr-gold); }
.cr-p2 .cr-block { height: 5rem; background: var(--cr-silver); }
.cr-p3 .cr-block { height: 3.5rem; background: var(--cr-bronze); }
.cr-step.open-spot .cr-block { opacity: .45; }
.cr-step.open-spot .cr-who { color: var(--muted); }
.cr-step.open-spot .cr-den { color: var(--navy-2); font-weight: 600; }
.cr-step.open-spot .cr-medal { filter: grayscale(.6); opacity: .7; }

.cr-stand { display: flex; flex-direction: column; gap: .55rem; }
.cr-row { display: grid; grid-template-columns: 2.6rem 1fr; gap: .75rem; align-items: center; padding: .65rem .75rem; border-radius: 12px; background: #F3F6FA; border: 1px solid #E1E8F0; }
.cr-row .pos { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; font: 800 1.05rem var(--f-display); background: #fff; color: var(--navy); border: 2px solid #CFDCEB; }
.cr-row.r1 { background: #FFF7DB; border-color: var(--cr-gold); } .cr-row.r1 .pos { background: var(--cr-gold); border-color: var(--cr-gold); color: #1d2733; }
.cr-row.r2 { background: #F3F5F8; border-color: var(--cr-silver); } .cr-row.r2 .pos { background: var(--cr-silver); border-color: var(--cr-silver); color: #1d2733; }
.cr-row.r3 { background: #FBEFE5; border-color: var(--cr-bronze); } .cr-row.r3 .pos { background: var(--cr-bronze); border-color: var(--cr-bronze); color: #1d2733; }
.cr-row.ru { background: #F1F7EE; border-color: #8FC27A; } .cr-row.ru .pos { background: #E4F2DC; border-color: #8FC27A; font-size: 1.3rem; }
.cr-nm { font-weight: 700; font-size: 1rem; display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; }
.cr-sub { font-weight: 500; font-size: .8rem; color: var(--muted); }
.cr-chip { display: inline-block; margin-top: .3rem; font-size: .84rem; font-weight: 600; color: var(--navy-2); background: #fff; border: 1px solid #CFDCEB; border-radius: 999px; padding: .15rem .6rem; }
.cr-row.r1 .cr-chip, .cr-row.r2 .cr-chip, .cr-row.r3 .cr-chip { color: #1d2733; border-color: rgba(0,0,0,.12); }
.cr-row.ru .cr-chip { color: #2F5E1E; border-color: #B9DBA9; }
.cr-open { background: #EEF3F9; border: 1px dashed #9DB6D3; border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 600; color: var(--navy); text-align: center; }
.cr-empty { border: 2px dashed #C9D6E4; border-radius: 12px; padding: .9rem 1rem; text-align: center; font-weight: 700; color: var(--navy); background: #FAFCFE; }
.cr-pool-box { margin-top: .4rem; border-radius: 16px; padding: 1rem .75rem 1.1rem; text-align: center; background: radial-gradient(circle at 30% 20%, #EAF2FB 0%, #DCE8F6 60%, #D2E2F3 100%); border: 1px solid #C4D6EA; }
.cr-pool-box h3 { font-size: 1.15rem; color: var(--navy); }
.cr-pool-box p { margin: .2rem 0 .8rem; font-size: .9rem; color: var(--muted); }
.cr-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.cr-bubble { background: #fff; border: 2px solid #B8CDE4; border-radius: 999px; padding: .4rem .8rem; font-weight: 700; font-size: .95rem; box-shadow: 0 2px 0 rgba(0,60,113,.08); display: inline-flex; gap: .35rem; align-items: baseline; }
.cr-bubble .cr-sub { font-size: .75rem; }

.cr-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: .75rem; }
.cr-stepcard { border-radius: 12px; padding: 1rem; background: #EEF3F9; border: 1px solid #CFDCEB; }
.cr-stepcard .em { font-size: 1.8rem; line-height: 1; }
.cr-stepcard h3 { margin: .5rem 0 .25rem; font-size: 1rem; }
.cr-stepcard p { font-size: .92rem; color: var(--muted); }
.cr-num { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 800; margin-right: .35rem; }
.cr-flyer { margin-top: 1rem; display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; align-items: center; background: #FFF7DB; border: 2px solid var(--cr-gold); border-radius: 14px; padding: 1rem; }
.cr-flyer img { width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,.15); background: #fff; }
.cr-flyer h3 { font-size: 1.1rem; color: var(--navy); }
.cr-flyer p { margin: .25rem 0 .75rem; font-size: .92rem; color: var(--muted); }
@media (max-width: 420px) { .cr-flyer { grid-template-columns: 1fr; } .cr-flyer img { max-width: 10rem; margin-inline: auto; } }

@media (prefers-reduced-motion: no-preference) {
  .cr-mascot { animation: cr-bounce 1.6s ease-out infinite; transform-origin: 50% 100%; transform-box: fill-box; }
  @keyframes cr-bounce { 0%,100% { transform: translateY(0); } 45% { transform: translateY(-8px) scaleY(1.02); } }
  .cr-confetti i { animation: cr-fall 4s linear infinite; }
  @keyframes cr-fall { from { transform: translateY(-2rem) rotate(0); } to { transform: translateY(19rem) rotate(540deg); } }
  .cr-row.pop, .cr-pool-box.pop { animation: cr-pop 500ms cubic-bezier(.2,.8,.2,1) both; }
  @keyframes cr-pop { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .cr-bubble { animation: cr-bob 3.2s ease-in-out infinite; }
  @keyframes cr-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
}

/* Donate box (shown under every race tab) */
.cr-donate { margin-top: 1rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; background: var(--gold-soft); border: 1px solid #F3D77A; border-radius: 1rem; padding: 1.25rem 1.4rem; }
.cr-donate-icon { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--navy); display: grid; place-items: center; font-size: 1.5rem; }
.cr-donate h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.cr-donate p { color: var(--muted); font-size: .95rem; }
.cr-donate p b { color: var(--fg); }
.cr-donate-btn { white-space: nowrap; }
@media (max-width: 640px) { .cr-donate { grid-template-columns: 1fr; } .cr-donate-btn { justify-self: start; } }
