/* n70 j «Копилка клуба» (club-jar.js): the card in the shop, the jar in the stage's corner, the coins, the moment it
   fills, a party evening's garland and confetti. Nothing here covers a playing film: the hall's pieces hide (.jar-film). */

/* --- The shop's card ---------------------------------------------------------------------------------------------- */
.jar-shop .jar-open { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.jar-shop .jar-art { flex: 0 0 auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.jar-shop .jar-open-text { flex: 1 1 auto; min-width: 0; }
.jar-shop .jar-goal { font-size: 16px; line-height: 1.3; }
.jar-shop .jar-goal-how { margin: 4px 0 8px; font-size: 13px; opacity: .82; line-height: 1.35; }
.jar-shop .jar-bar, .jar-hall .jar-hall-bar { position: relative; display: block; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.jar-shop .jar-bar i, .jar-hall .jar-hall-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #f3b73a, #ffe27a); transition: width .6s ease; }
.jar-shop .jar-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; margin-top: 6px; font-size: 13px; }
.jar-shop .jar-sum span { opacity: .75; }
.jar-shop .jar-k { margin: 12px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.jar-shop .jar-givers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.jar-shop .jar-givers li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .06); font-size: 14px; }
.jar-shop .jar-g-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jar-shop .jar-today { margin: 6px 0 0; font-size: 12.5px; opacity: .75; }
.jar-shop .jar-none { margin: 0; font-size: 13px; opacity: .7; }
.jar-shop .jar-pts, .jar-shop .jar-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.jar-shop .jar-step, .jar-shop .jar-amt, .jar-shop .jar-opt { min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.jar-shop .jar-step { font-size: 20px; justify-content: center; }
.jar-shop .jar-step:disabled { opacity: .35; cursor: default; }
.jar-shop .jar-amt[aria-pressed="true"], .jar-shop .jar-opt[aria-pressed="true"] { border-color: #f3b73a; background: rgba(243, 183, 58, .18); }
.jar-shop .jar-pts-n { min-width: 56px; text-align: center; font-size: 17px; }
.jar-shop .jar-goal-ico { font-size: 22px; }
.jar-shop .jar-rules { margin: 12px 0 8px; padding-left: 18px; font-size: 12.5px; opacity: .78; line-height: 1.45; }
.jar-shop .jar-cancel { min-height: 44px; margin: 4px 0 8px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255, 120, 120, .45); background: transparent; color: #ffb4b4; font: inherit; cursor: pointer; }
.jar-shop .jar-running { margin: 6px 0; }
.jar-tile { display: inline-flex; align-items: center; justify-content: center; }
.jar-tile .jar-svg { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .3)); }

/* --- The jar in the stage's corner -------------------------------------------------------------------------------- */
.jar-hall { position: absolute; left: 14px; bottom: 14px; z-index: 6; max-width: min(340px, calc(100% - 28px)); pointer-events: none; }
.jar-hall[hidden], .jar-hall.jar-film { display: none; }
.jar-hall-btn { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 14px 6px 8px; border-radius: 16px; border: 1px solid rgba(255, 226, 122, .35); background: rgba(16, 18, 28, .78); color: #fff; font: inherit; text-align: left; cursor: pointer; backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.jar-hall-btn:hover, .jar-hall-btn:focus-visible { border-color: #ffe27a; }
.jar-hall-art { position: relative; flex: 0 0 auto; width: 46px; height: 50px; }
.jar-hall-art.jar-bump { animation: jar-bump .5s ease .9s; }
.jar-hall-text { display: grid; gap: 4px; min-width: 0; }
.jar-hall-goal { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jar-hall .jar-hall-bar { height: 7px; width: 170px; max-width: 100%; }
.jar-hall-sum { font-size: 12px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jar-hall-line { margin-top: 6px; padding: 6px 12px; border-radius: 12px; background: rgba(16, 18, 28, .85); color: #ffe9a8; font-size: 13px; width: max-content; max-width: 100%; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.jar-hall-line.on { opacity: 1; transform: none; }
.jar-coin { position: absolute; top: -34px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4b0, #f1b52c 60%, #b47915); box-shadow: 0 0 6px rgba(255, 215, 90, .8); animation: jar-coin 1s cubic-bezier(.4, 0, .9, .6) both; }
@keyframes jar-coin { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateY(44px) scale(1); opacity: 1; } 100% { transform: translateY(50px) scale(.8); opacity: 0; } }
@keyframes jar-bump { 0%, 100% { transform: none; } 40% { transform: scale(1.12) rotate(-4deg); } 70% { transform: scale(.97) rotate(2deg); } }

/* --- The moment it fills ------------------------------------------------------------------------------------------- */
.jar-moment { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(circle at 50% 45%, rgba(255, 215, 90, .25), rgba(8, 8, 14, .7) 70%); animation: jar-in .35s ease both; }
.jar-moment.out { animation: jar-out .4s ease both; }
.jar-moment-card { display: grid; justify-items: center; gap: 6px; max-width: 460px; padding: 18px 22px 16px; border-radius: 22px; background: rgba(20, 20, 32, .92); border: 1px solid rgba(255, 226, 122, .5); color: #fff; text-align: center; box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }
.jar-moment-art { animation: jar-glow 1.6s ease-in-out infinite alternate; }
.jar-moment h3 { margin: 2px 0 0; font-size: 26px; color: #ffe27a; }
.jar-moment-goal { margin: 0; font-size: 16px; line-height: 1.35; }
.jar-moment-names { margin: 0; font-size: 13px; opacity: .8; }
.jar-moment-ok { margin-top: 8px; min-height: 44px; min-width: 120px; padding: 0 20px; border-radius: 12px; border: 0; background: #f3b73a; color: #1d1300; font: inherit; font-weight: 700; cursor: pointer; }
@keyframes jar-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes jar-out { to { opacity: 0; transform: scale(.98); } }
@keyframes jar-glow { from { transform: translateY(0) rotate(-3deg); filter: drop-shadow(0 0 6px rgba(255, 215, 90, .5)); } to { transform: translateY(-6px) rotate(3deg); filter: drop-shadow(0 0 22px rgba(255, 215, 90, .9)); } }

/* --- Confetti and a party evening's garland ------------------------------------------------------------------------ */
.jar-confetti { position: absolute; inset: 0; z-index: 31; overflow: hidden; pointer-events: none; }
.jar-confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; animation: jar-fall 2.4s linear both; }
@keyframes jar-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--dx, 0), 110vh) rotate(var(--r, 360deg)); opacity: 0; } }
.jar-garland { position: absolute; left: 0; right: 0; top: 0; height: 58px; z-index: 5; pointer-events: none; }
.jar-garland svg { width: 100%; height: 44px; display: block; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.jar-garland.jar-film { display: none; }
.jar-balloon { position: absolute; top: 36px; width: 34px; height: 42px; border-radius: 50% 50% 48% 48%; animation: jar-float 4s ease-in-out infinite alternate; }
.jar-balloon::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 28px; background: rgba(255, 255, 255, .5); }
.jar-balloon.b1 { left: 10px; background: radial-gradient(circle at 35% 30%, #ffb3c0, #ff5d73 60%); }
.jar-balloon.b2 { right: 12px; background: radial-gradient(circle at 35% 30%, #b9cdff, #5b8cff 60%); animation-delay: -2s; }
@keyframes jar-float { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-8px) rotate(4deg); } }

@media (max-width: 760px) {
  .jar-hall { left: auto; right: 8px; bottom: auto; top: 8px; display: flex; flex-direction: column; align-items: flex-end; } /* a phone: over the stage's art, clear of the lobby's buttons */
  .jar-hall-btn { min-height: 48px; padding: 4px 10px 4px 6px; gap: 8px; }
  .jar-hall .jar-hall-bar { width: 120px; }
  .jar-hall-goal { font-size: 12px; }
  .jar-moment h3 { font-size: 22px; }
  .jar-shop .jar-open { gap: 10px; }
  .jar-balloon { width: 26px; height: 32px; top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .jar-coin, .jar-hall-art.jar-bump, .jar-moment-art, .jar-balloon, .jar-moment, .jar-moment.out { animation: none; }
}
