/* Итоги недели (public/js/weekly.js): окно поверх всего, частицы салюта (.sk-fx, z 95) — над ним */
.wk-over { position: fixed; inset: 0; z-index: 92; display: grid; place-items: center; padding: 12px;
  background: radial-gradient(circle at 50% 30%, rgba(60, 40, 110, .55), rgba(6, 8, 16, .82)); backdrop-filter: blur(4px);
  animation: wk-fade .3s ease-out both; }
.wk-over.wk-out { animation: wk-fade .25s ease-in reverse both; }
.wk-card { position: relative; width: min(540px, 100%); max-height: calc(100dvh - 24px); overflow: hidden auto; overscroll-behavior: contain;
  padding: 22px 18px 18px; border-radius: 20px; color: #f2f4fa; text-align: center;
  background: linear-gradient(165deg, #23194a 0%, #161b33 45%, #0f1424 100%);
  border: 1px solid rgba(255, 212, 59, .35); box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 24px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 212, 59, .15);
  animation: wk-pop .6s cubic-bezier(.2, 1.4, .4, 1) both; scrollbar-width: thin; }
.wk-rays { position: absolute; left: 50%; top: -260px; width: 620px; height: 620px; margin-left: -310px; pointer-events: none; opacity: .22;
  background: repeating-conic-gradient(from 0deg, rgba(255, 212, 59, .55) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0, transparent 65%); mask: radial-gradient(circle, #000 0, transparent 65%);
  animation: wk-spin 40s linear infinite; }
.wk-card > :not(.wk-rays, .wk-x) { position: relative; }
.wk-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #fff; font-size: 1.4rem; line-height: 1; }
.wk-x:hover { background: rgba(255, 255, 255, .18); }

.wk-head { margin-bottom: 14px; }
.wk-cup { font-size: 3rem; line-height: 1; filter: drop-shadow(0 4px 18px rgba(255, 212, 59, .6)); animation: wk-drop .7s .15s cubic-bezier(.3, 1.6, .5, 1) both, wk-bob 3s 1s ease-in-out infinite; }
.wk-kicker { margin-top: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #ffd43b; animation: wk-up .5s .3s both; }
.wk-head h2 { margin: 2px 0 2px; font-size: 1.7rem; font-weight: 800;
  background: linear-gradient(90deg, #fff 0%, #ffe48a 40%, #fff 60%, #fff 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wk-up .5s .4s both, wk-shine 3.5s 1.2s ease-in-out infinite; }
.wk-head p { margin: 0; font-size: .85rem; color: #a7b0c8; animation: wk-up .5s .5s both; }

/* пьедестал */
.wk-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; align-items: end; gap: 6px; margin: 8px 0 14px; }
.wk-col { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.wk-col-top { padding: 0 2px 8px; animation: wk-up .5s calc(var(--d) + 250ms) both; }
.wk-medal { font-size: 2rem; line-height: 1.1; }
.wk-p1 .wk-medal { font-size: 2.6rem; animation: wk-glow 2s calc(var(--d) + 800ms) ease-in-out infinite; }
.wk-gname { font-weight: 800; font-size: .98rem; overflow-wrap: anywhere; }
.wk-gname.me { color: #ffd43b; }
.wk-avg { margin-top: 2px; }
.wk-avg .wk-num { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.wk-p1 .wk-avg .wk-num { font-size: 1.5rem; color: #ffd43b; }
.wk-avg small { display: block; font-size: .68rem; color: #a7b0c8; }
.wk-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 99px; font-size: .68rem; font-weight: 700; background: #ffd43b; color: #251a00; }
.wk-step { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding-top: 8px;
  border-radius: 12px 12px 4px 4px; transform-origin: bottom; animation: wk-rise .7s var(--d) cubic-bezier(.2, 1.3, .4, 1) both; overflow: hidden; }
.wk-step::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%);
  transform: translateX(-120%); animation: wk-sweep 2.6s calc(var(--d) + 900ms) ease-in-out infinite; }
.wk-p1 .wk-step { height: 118px; background: linear-gradient(180deg, #ffe066, #d49b0a); color: #3a2600; box-shadow: 0 0 30px rgba(255, 212, 59, .45); }
.wk-p2 .wk-step { height: 88px; background: linear-gradient(180deg, #e6ecf3, #8e9bb0); color: #1f2633; }
.wk-p3 .wk-step { height: 66px; background: linear-gradient(180deg, #f0b07a, #a5592a); color: #2e1405; }
.wk-empty .wk-step { opacity: .35; }
.wk-step-n { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.wk-p3 .wk-step-n { font-size: 1.5rem; }
.wk-step-c { font-size: .82rem; font-weight: 800; line-height: 1.1; }
.wk-step-c small { display: block; font-size: .66rem; font-weight: 600; opacity: .8; }
.wk-mine-col .wk-step { outline: 2px solid #fff; outline-offset: 2px; }

/* места 4–5 */
.wk-rest { display: grid; gap: 6px; margin-bottom: 14px; }
.wk-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .06); text-align: left; }
.wk-row.me { background: rgba(255, 212, 59, .14); box-shadow: 0 0 0 1px rgba(255, 212, 59, .5) inset; }
.wk-row-p { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); font-weight: 800; font-size: .85rem; }
.wk-row-g { flex: 1; font-weight: 700; }
.wk-row-a { font-weight: 800; font-variant-numeric: tabular-nums; }
.wk-row-a small { font-weight: 500; color: #a7b0c8; }

/* лучшие в группах */
.wk-best { margin-bottom: 14px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .05); text-align: left; }
.wk-best h4 { margin: 0 0 8px; font-size: .95rem; }
.wk-best h4 small { font-weight: 500; color: #a7b0c8; }
.wk-bg + .wk-bg { margin-top: 8px; }
.wk-bg-name { font-size: .78rem; font-weight: 700; color: #a7b0c8; margin-bottom: 4px; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: 99px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .09); animation: wk-chip .45s var(--d) cubic-bezier(.3, 1.6, .5, 1) both; }
.wk-chip small { color: #a7b0c8; font-weight: 500; }
.wk-chip em { font-style: normal; margin-left: 6px; color: #ffd43b; font-weight: 800; }
.wk-chip.me { background: rgba(255, 212, 59, .2); box-shadow: 0 0 0 1px #ffd43b inset; }

/* награда */
.wk-mine { margin-bottom: 14px; padding: 16px 12px 12px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(circle at 50% 0, rgba(180, 92, 255, .45), rgba(180, 92, 255, .08) 70%); box-shadow: 0 0 0 1px rgba(200, 140, 255, .45) inset; }
.wk-mine-t { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #e2c6ff; }
.wk-mine-n { font-size: 2.6rem; font-weight: 900; line-height: 1.1; text-shadow: 0 0 24px rgba(200, 140, 255, .8); }
.wk-mine-n span { font-size: 1.2rem; font-weight: 700; text-shadow: none; }
.wk-cases { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 8px 0 6px; min-height: 64px; }
.wk-case { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5));
  animation: wk-case .7s var(--d) cubic-bezier(.2, 1.5, .4, 1) both, wk-float 2.8s calc(var(--d) + 700ms) ease-in-out infinite; }
.wk-mine ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; color: #dcd2ef; }
.wk-mine li b { color: #ffd43b; }
.wk-none { background: rgba(255, 255, 255, .05); box-shadow: none; }
.wk-none p { margin: 0 0 6px; }
.wk-hint { color: #a7b0c8; font-size: .88rem; }

.wk-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wk-actions .btn.ghost { color: #f2f4fa; border-color: rgba(255, 255, 255, .3); background: transparent; }
.wk-go { background: linear-gradient(90deg, #ffd43b, #ffb020); border-color: #ffb020; color: #2a1c00; font-weight: 800; animation: wk-pulse 1.8s 3.6s ease-in-out infinite; }

.wk-in { animation: wk-up .55s var(--d) cubic-bezier(.2, 1.2, .4, 1) both; }

@keyframes wk-fade { from { opacity: 0; } }
@keyframes wk-pop { from { opacity: 0; transform: scale(.7) translateY(30px); } }
@keyframes wk-spin { to { transform: rotate(360deg); } }
@keyframes wk-drop { from { opacity: 0; transform: translateY(-60px) scale(.4) rotate(-20deg); } }
@keyframes wk-bob { 50% { transform: translateY(-5px) rotate(3deg); } }
@keyframes wk-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes wk-shine { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
@keyframes wk-rise { from { transform: scaleY(0); } }
@keyframes wk-sweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes wk-glow { 50% { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 14px rgba(255, 212, 59, .9)); } }
@keyframes wk-chip { from { opacity: 0; transform: scale(.4); } }
@keyframes wk-case { from { opacity: 0; transform: translateY(120px) scale(.3) rotate(var(--r)); } 70% { transform: translateY(-8px) scale(1.1) rotate(0); } }
@keyframes wk-float { 50% { transform: translateY(-5px) rotate(var(--r)); } }
@keyframes wk-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 212, 59, .25), 0 0 24px rgba(255, 212, 59, .5); } }

@media (prefers-reduced-motion: reduce) {
  .wk-over, .wk-card, .wk-card *, .wk-card *::after { animation: none !important; }
}
@media (max-width: 420px) {
  .wk-card { padding: 18px 12px 14px; }
  .wk-head h2 { font-size: 1.45rem; }
  .wk-gname { font-size: .86rem; }
  .wk-p1 .wk-step { height: 104px; }
  .wk-p2 .wk-step { height: 78px; }
  .wk-p3 .wk-step { height: 70px; }
}

/* кнопка на странице «Топ» */
.lb-weekly { margin-left: auto; align-self: center; padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.lb-weekly:hover { border-color: var(--accent); color: var(--accent); }
