/* «Снеговик зала» (0.55 winter events, public/winter-snowman.js): the window with the club's snowman, the picker, a part's
   bubble, the goodbye on the season's last evening (the lobby's entry is a button in the season's banner). A winter
   evening: indigo dusk, frost, warm lights. Nothing squashes or skews: he shrinks evenly into the snow as he melts. */

.wsm-modal.stats-modal { padding: 20px; }
.wsm-page {
  position: relative; display: flex; flex-direction: column; width: min(1040px, 100%); max-height: calc(100dvh - 40px); overflow: hidden;
  border-radius: 18px; border: 1px solid rgba(205, 220, 255, .24); color: #eef3fc; box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  background: radial-gradient(120% 80% at 50% 0%, #2a3270 0%, #171d45 48%, #0d1130 100%);
}
.wsm-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 16px 6px 22px; }
.wsm-head { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wsm-title { font: 700 24px/1.15 Georgia, 'Times New Roman', serif; letter-spacing: .02em; color: #dff1ff; text-shadow: 0 1px 0 rgba(0, 0, 0, .8); }
.wsm-sub { margin-top: 3px; font-size: 13px; color: #aab7e0; }
.wsm-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(0, 0, 0, .35);
  color: #eef3fc; font-size: 24px; line-height: 1; cursor: pointer;
}
.wsm-close:hover { border-color: rgba(190, 230, 255, .7); }
.wsm-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 8px 18px; padding: 4px 22px 22px; min-height: 0; overflow: auto; }
.wsm-note { grid-column: 1 / -1; padding: 60px 10px; text-align: center; color: #aab7e0; }
.wsm-stage { position: relative; aspect-ratio: 1 / 1; width: 100%; max-height: calc(100dvh - 150px); margin: 0 auto; touch-action: manipulation; }
.wsm-svg { display: block; width: 100%; height: 100%; border-radius: 14px; }
.wsm-stage [data-wsm] { cursor: pointer; }
.wsm-photo { padding: 10px 10px 34px; box-sizing: border-box; background: #f4efe6; border-radius: 6px; rotate: -1.2deg; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); } /* the album: him as he stood, a photo */
.wsm-photo .wsm-svg { border-radius: 2px; }
.wsm-bulb { animation: wsmTwinkle 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--wb, 0s) * -1); }
.wsm-bulb .wsm-halo { animation: wsmHalo 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--wb, 0s) * -1); }
@keyframes wsmTwinkle { from { opacity: .8; } to { opacity: 1; } }
@keyframes wsmHalo { from { opacity: .12; } to { opacity: .42; } }
.wsm-new { animation: wsmDrop .9s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes wsmDrop { from { translate: 0 -70px; opacity: 0; } 60% { opacity: 1; } to { translate: 0 0; } }
.wsm-still .wsm-bulb, .wsm-still .wsm-halo, .wsm-still .wsm-new { animation: none; }

.wsm-tip {
  position: absolute; z-index: 3; transform: translate(-50%, calc(-100% - 12px)); max-width: min(280px, 84%); padding: 9px 12px; border-radius: 12px;
  background: #f6f9ff; color: #1d2433; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: 13px; line-height: 1.35; pointer-events: none;
}
.wsm-tip.below { transform: translate(-50%, 24px); }
.wsm-tip[hidden] { display: none; }

.wsm-side { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; min-width: 0; }
.wsm-how, .wsm-done { margin: 0; font-size: 14px; line-height: 1.45; color: #d6def5; }
.wsm-done { padding: 10px 12px; border-radius: 12px; background: rgba(190, 230, 255, .1); border: 1px solid rgba(190, 230, 255, .3); color: #dff1ff; }
.wsm-flag { margin: 0; padding: 8px 11px; border-radius: 10px; background: rgba(120, 170, 255, .14); border: 1px dashed rgba(160, 200, 255, .5); color: #cfe0ff; font-size: 13px; }
.wsm-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #93a6dc; margin-top: 4px; }
.wsm-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wsm-pick {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 6px 4px 7px; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(205, 220, 255, .18); background: rgba(255, 255, 255, .05); color: #eef3fc; font: inherit; text-align: center;
}
.wsm-pick .wsm-icon { width: 40px; height: 40px; flex: none; }
.wsm-pick-n { font-size: 11.5px; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.wsm-pick-w { font-size: 10.5px; line-height: 1.15; color: #9fb0de; overflow-wrap: anywhere; }
.wsm-pick.on { border-color: #bfe6ff; background: rgba(190, 230, 255, .16); box-shadow: inset 0 0 0 1px #bfe6ff; }
.wsm-pick.wsm-wait { opacity: .5; cursor: default; }
.wsm-pick.wsm-wait .wsm-icon { filter: grayscale(.7); }
.wsm-cols { display: flex; flex-wrap: wrap; gap: 8px; }
.wsm-col {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(0, 0, 0, .35); background: var(--wc);
  box-shadow: inset -5px -6px 0 rgba(0, 0, 0, .18), inset 4px 4px 0 rgba(255, 255, 255, .25);
}
.wsm-col::after { content: ''; display: block; margin: -6px; width: 44px; height: 44px; } /* a 44-px target round a 36-px swatch */
.wsm-col.on { outline: 3px solid #bfe6ff; outline-offset: 2px; }
.wsm-acts { display: flex; gap: 8px; margin-top: 4px; }
.wsm-add, .wsm-bye, .wsm-cer-ok { min-height: 44px; padding: 0 16px; border-radius: 12px; cursor: pointer; font: 600 15px/1 inherit; }
.wsm-add { flex: 1; border: 0; background: var(--accent, #e5a00d); color: #1b1406; font-size: 16px; }
.wsm-add[disabled] { opacity: .45; cursor: default; }
.wsm-bye { align-self: flex-start; border: 1px solid rgba(205, 220, 255, .3); background: rgba(255, 255, 255, .06); color: #eef3fc; }
.wsm-meltline { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); color: #cfe6ff; font-size: 13px; line-height: 1.4; display: flex; flex-direction: column; gap: 8px; }
.wsm-gone { background: rgba(159, 198, 234, .14); }
.wsm-who b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #93a6dc; margin: 6px 0 2px; }
.wsm-who p { margin: 0; font-size: 13px; line-height: 1.5; color: #d6def5; }
.wsm-card-acts { display: flex; gap: 8px; }

/* The goodbye: over the page (never over a playing film — the server and this page hold it) */
.wsm-cer { position: fixed; inset: 0; z-index: 2800; display: grid; place-items: center; padding: 16px; background: rgba(6, 9, 26, .8); animation: dpwFade .3s ease both; }
.wsm-cer-out { opacity: 0; transition: opacity .35s ease; }
.wsm-cer-card {
  position: relative; display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 360px); align-items: center; gap: 10px 22px; max-width: 800px; width: 100%;
  padding: 18px 22px; border-radius: 20px; background: radial-gradient(120% 90% at 30% 0%, #2a3270, #11163a); border: 1px solid rgba(190, 230, 255, .35);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7); color: #eef3fc;
}
.wsm-cer-pic { aspect-ratio: 1 / 1; }
.wsm-cer-x { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wsm-cer-t { font: 700 34px/1.1 Georgia, 'Times New Roman', serif; color: #dff1ff; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.wsm-cer-s { font-size: 16px; color: #d6def5; }
.wsm-cer-n { font-size: 14px; color: #aab7e0; }
.wsm-cer-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; padding: 0; list-style: none; max-height: 132px; overflow: auto; }
.wsm-cer-who li { padding: 4px 10px; border-radius: 999px; background: rgba(190, 230, 255, .14); color: #e3f3ff; font-size: 13px; }
.wsm-cer-who .wsm-cer-more { background: transparent; color: #aab7e0; }
.wsm-cer-ok { align-self: flex-start; border: 0; background: var(--accent, #e5a00d); color: #1b1406; font-size: 16px; padding: 0 26px; }
.wsm-cer-x > * { animation: wsmIn .5s ease both; animation-delay: calc(3.6s + var(--wi, 0) * .15s); }
.wsm-cer-x > :nth-child(2) { --wi: 1; } .wsm-cer-x > :nth-child(3) { --wi: 2; } .wsm-cer-x > :nth-child(4) { --wi: 3; } .wsm-cer-x > :nth-child(5) { --wi: 4; }
.wsm-cer-x > :nth-child(-n+2) { animation-delay: calc(.3s + var(--wi, 0) * .3s); } /* the goodbye's words at once, the names once he is gone */
@keyframes wsmIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
/* The melting: he shrinks evenly into the snow (scale from his feet, never a squash), drips fall, his things drop into the
   puddle that spreads under him. */
.wsm-cer-svg .wsm-stand { transform-box: view-box; transform-origin: 500px 905px; animation: wsmMelt 3.4s cubic-bezier(.5, 0, .7, .4) .6s both; }
@keyframes wsmMelt { 0% { scale: 1; opacity: 1; } 70% { opacity: 1; } 100% { scale: .04; opacity: 0; } }
.wsm-cer-svg .wsm-left .wsm-puddle { transform-box: view-box; transform-origin: 500px 907px; animation: wsmPuddle 3s ease-out .9s both; }
@keyframes wsmPuddle { from { scale: .25; opacity: 0; } to { scale: 1; opacity: 1; } }
.wsm-cer-svg .wsm-left .wsm-fall { animation: wsmFall .9s cubic-bezier(.4, 0, .9, .6) both; animation-delay: calc(2.6s + var(--fd, 0s)); }
@keyframes wsmFall { from { translate: var(--fx, 0) var(--fy, -300px); rotate: var(--fr, 0deg); opacity: 0; } 15% { opacity: 1; } to { translate: 0 0; rotate: 0deg; opacity: 1; } }
.wsm-cer-svg .wsm-left .wsm-fall { transform-box: fill-box; transform-origin: center; }
.wsm-cer-svg .wsm-left > path { animation: wsmIn 1s ease both 3.4s; }
.wsm-drip { opacity: 0; animation: wsmDrip 1.1s ease-in infinite; animation-delay: calc(.8s + var(--dd, 0s)); animation-iteration-count: 3; }
@keyframes wsmDrip { 0% { opacity: 0; translate: 0 0; } 20% { opacity: 1; } 100% { opacity: 0; translate: 0 120px; } }
.wsm-cer.wsm-still .wsm-cer-x > * { animation: none; }

@media (max-width: 760px) {
  .wsm-modal.stats-modal { padding: 0; align-items: stretch; }
  .wsm-page { width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0; border: 0; }
  .wsm-top { padding: 10px 10px 4px 16px; }
  .wsm-title { font-size: 21px; }
  .wsm-body { grid-template-columns: 1fr; padding: 0 12px 16px; }
  .wsm-stage { max-height: none; width: min(100%, 58dvh); }
  .wsm-cer-card { grid-template-columns: 1fr; text-align: center; padding: 16px; }
  .wsm-cer-pic { width: min(240px, 62vw); margin: 0 auto; }
  .wsm-cer-t { font-size: 28px; }
  .wsm-cer-who { justify-content: center; }
  .wsm-cer-ok { align-self: center; }
}
@media (max-width: 360px) { .wsm-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } .wsm-cer-x > * { animation-delay: 3s; } }
@media (prefers-reduced-motion: reduce) {
  .wsm-bulb, .wsm-halo, .wsm-new, .wsm-drip, .wsm-stand, .wsm-puddle, .wsm-fall { animation: none !important; }
  .wsm-cer, .wsm-cer-x > * { animation: none !important; transition: none; }
}
