/* Medea Digital — новогодняя игра «Секундомер» 2027. */
@import url("https://fonts.googleapis.com/css2?family=Lobster&family=Rubik:wght@500;700;800&display=swap");

/* Корень с id: стили сайта (.clean-home .m-section) не должны перебивать фон */
#ny-stopwatch.ny-sw  {
  --ny-red: #c8161f;
  --ny-red-2: #e3262c;
  --ny-red-deep: #5b0716;
  --ny-green: #0f5132;
  --ny-green-2: #1d7a4b;
  --ny-gold: #f2c46d;
  --ny-gold-2: #ffe2a3;
  --ny-gold-dark: #a2741f;
  --ny-ink: #182224;
  --ny-paper: #fffdf8;
  --ny-snow: #ffffff;
  --ny-head: "Lobster", "Medea Georgian", Georgia, serif;
  --ny-ui: "Rubik", "Medea Georgian", "Medea Sans", Arial, sans-serif;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0; border: 0;
  color: var(--ny-snow);
  font-family: var(--ny-ui);
  padding: clamp(78px, 8vw, 110px) 0 clamp(64px, 7vw, 96px);
  background-color: #8e0c1f;
  background-image:
    radial-gradient(65% 55% at 50% 0%, rgba(255, 196, 120, .30), transparent 62%),
    radial-gradient(45% 60% at 0% 100%, rgba(16, 92, 62, .60), transparent 70%),
    radial-gradient(45% 60% at 100% 100%, rgba(16, 92, 62, .50), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(255, 80, 110, .25), transparent 70%),
    linear-gradient(160deg, #4a0612 0%, #8e0c1f 30%, #c3172b 52%, #8a0b22 74%, #33050f 100%);
}
#ny-stopwatch *, #ny-stopwatch *::before, #ny-stopwatch *::after  { box-sizing: border-box; }

/* Узор из снежинок по красному фону */
#ny-stopwatch.ny-sw::before  {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M30 14v32M16 22l28 16M16 38l28-16M30 14l-5 5M30 14l5 5M30 46l-5-5M30 46l5-5'/%3E%3Cpath d='M90 70v28M78 77l24 14M78 91l24-14'/%3E%3C/g%3E%3Ccircle cx='86' cy='26' r='2' fill='%23fff'/%3E%3Ccircle cx='24' cy='92' r='2.5' fill='%23fff'/%3E%3C/svg%3E");
}
/* Снежный сугроб снизу */
#ny-stopwatch.ny-sw::after  {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 40V24c60-14 120-18 190-8s130 14 200 2 150-20 230-6 140 16 210 6 150-18 230-8 100 10 140 4V40z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

/* Разноцветная гирлянда */
#ny-stopwatch .ny-sw__lights  {
  position: absolute; inset: 0 0 auto 0; height: 60px; z-index: 2;
  display: flex; justify-content: space-between; padding: 0 1.5%;
  pointer-events: none;
}
#ny-stopwatch .ny-sw__lights::before  {
  content: ""; position: absolute; left: -2%; right: -2%; top: -22px; height: 44px;
  border-bottom: 3px solid #0b2b1d;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
#ny-stopwatch .ny-sw__lights i  {
  --c: #ffd84a;
  position: relative; display: block; width: 14px; height: 22px; margin-top: 14px;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--c) 45%);
  box-shadow: 0 0 14px 4px var(--c), 0 0 30px 6px color-mix(in srgb, var(--c) 45%, transparent);
  transform: rotate(var(--r, 0deg));
  animation: ny-twinkle 1.8s ease-in-out infinite;
}
#ny-stopwatch .ny-sw__lights i::before  { /* цоколь */
  content: ""; position: absolute; left: 3px; top: -6px; width: 8px; height: 7px; border-radius: 2px; background: #2c3b33;
}
#ny-stopwatch .ny-sw__lights i:nth-child(6n+1)  { --c: #ff3b3b; animation-delay: 0s; }
#ny-stopwatch .ny-sw__lights i:nth-child(6n+2)  { --c: #ffd84a; animation-delay: .3s; --r: 8deg; }
#ny-stopwatch .ny-sw__lights i:nth-child(6n+3)  { --c: #38e07b; animation-delay: .6s; --r: -6deg; }
#ny-stopwatch .ny-sw__lights i:nth-child(6n+4)  { --c: #3fa9ff; animation-delay: .9s; --r: 5deg; }
#ny-stopwatch .ny-sw__lights i:nth-child(6n+5)  { --c: #ff5fd2; animation-delay: 1.2s; --r: -8deg; }
#ny-stopwatch .ny-sw__lights i:nth-child(6n)    { --c: #ff9a2e; animation-delay: 1.5s; }
#ny-stopwatch .ny-sw__lights i:nth-child(even)  { margin-top: 20px; }
#ny-stopwatch .ny-sw__lights i:nth-child(4n+3)  { margin-top: 24px; }
@keyframes ny-twinkle { 50% { opacity: .45; filter: saturate(.6); } }

/* Падающие снежинки */
#ny-stopwatch .ny-sw__snow  { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#ny-stopwatch .ny-sw__snow i  {
  position: absolute; top: -30px; font-style: normal; color: #fff; opacity: .85;
  font-size: 16px; line-height: 1; text-shadow: 0 0 6px rgba(255, 255, 255, .6);
  animation: ny-fall 13s linear infinite;
}
#ny-stopwatch .ny-sw__snow i:nth-child(1)  { left: 4%; animation-delay: -2s; }
#ny-stopwatch .ny-sw__snow i:nth-child(2)  { left: 11%; animation-delay: -9s; font-size: 11px; }
#ny-stopwatch .ny-sw__snow i:nth-child(3)  { left: 17%; animation-delay: -5s; font-size: 22px; }
#ny-stopwatch .ny-sw__snow i:nth-child(4)  { left: 24%; animation-delay: -12s; font-size: 10px; }
#ny-stopwatch .ny-sw__snow i:nth-child(5)  { left: 31%; animation-delay: -1s; font-size: 13px; }
#ny-stopwatch .ny-sw__snow i:nth-child(6)  { left: 38%; animation-delay: -7s; }
#ny-stopwatch .ny-sw__snow i:nth-child(7)  { left: 45%; animation-delay: -3s; font-size: 10px; }
#ny-stopwatch .ny-sw__snow i:nth-child(8)  { left: 52%; animation-delay: -10s; font-size: 20px; }
#ny-stopwatch .ny-sw__snow i:nth-child(9)  { left: 58%; animation-delay: -6s; font-size: 12px; }
#ny-stopwatch .ny-sw__snow i:nth-child(10)  { left: 64%; animation-delay: -13s; }
#ny-stopwatch .ny-sw__snow i:nth-child(11)  { left: 70%; animation-delay: -4s; font-size: 10px; }
#ny-stopwatch .ny-sw__snow i:nth-child(12)  { left: 76%; animation-delay: -8s; font-size: 24px; }
#ny-stopwatch .ny-sw__snow i:nth-child(13)  { left: 82%; animation-delay: -11s; font-size: 12px; }
#ny-stopwatch .ny-sw__snow i:nth-child(14)  { left: 88%; animation-delay: -2.5s; }
#ny-stopwatch .ny-sw__snow i:nth-child(15)  { left: 93%; animation-delay: -6.5s; font-size: 10px; }
#ny-stopwatch .ny-sw__snow i:nth-child(16)  { left: 97%; animation-delay: -9.5s; font-size: 18px; }
#ny-stopwatch .ny-sw__snow i:nth-child(17)  { left: 21%; animation-delay: -12.5s; font-size: 10px; }
#ny-stopwatch .ny-sw__snow i:nth-child(18)  { left: 67%; animation-delay: -.5s; font-size: 11px; }
@keyframes ny-fall {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate3d(22px, 50vh, 0) rotate(180deg); }
  100% { transform: translate3d(-10px, 1000px, 0) rotate(360deg); opacity: 0; }
}

/* Раскладка: рейтинг слева, игра справа */
#ny-stopwatch .ny-sw__wrap  {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 48px);
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(24px, 4vw, 56px); align-items: start;
}

/* Рейтинг — как открытка */
#ny-stopwatch .ny-sw__board  {
  background: var(--ny-paper); color: var(--ny-ink);
  border-radius: 10px;
  padding: 34px 24px 20px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, .15), 0 26px 60px rgba(60, 0, 6, .45);
  position: relative; margin-top: 18px;
}
#ny-stopwatch .ny-sw__board::before  { /* полосатая лента-леденец */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 10px 10px 0 0;
  background: repeating-linear-gradient(-45deg, var(--ny-red) 0 10px, #fff 10px 20px);
}
#ny-stopwatch .ny-sw__board::after  { /* бантик */
  content: "🎀"; position: absolute; right: 18px; top: -22px; font-size: 38px; line-height: 1;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .25));
}
#ny-stopwatch .ny-sw__board-kicker  { margin: 0 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ny-red); font-weight: 700; }
#ny-stopwatch .ny-sw__board h3  { margin: 0; font-family: var(--ny-head); font-weight: 400; font-size: 38px; line-height: 1.1; color: var(--ny-green); }
#ny-stopwatch .ny-sw__board-sub  { margin: 6px 0 16px; font-size: 14px; color: #59665c; }
#ny-stopwatch .ny-sw__list  { list-style: none; margin: 0; padding: 0; }
#ny-stopwatch .ny-sw__row  {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 0; border-top: 1px dashed rgba(200, 22, 31, .3);
}
#ny-stopwatch .ny-sw__place  {
  width: 40px; height: 40px; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  color: #fff; background: #9aa3a0;
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, .2), 0 3px 8px rgba(0, 0, 0, .15);
}
#ny-stopwatch .ny-sw__place::before  { /* петелька ёлочной игрушки */
  content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 6px; margin-left: -5px;
  border-radius: 2px; background: #c9a24a;
}
#ny-stopwatch .ny-sw__place--1  { background: radial-gradient(circle at 35% 30%, #fff3c4, #e8b440 45%, #a2741f); }
#ny-stopwatch .ny-sw__place--2  { background: radial-gradient(circle at 35% 30%, #ffd0d0, var(--ny-red-2) 45%, var(--ny-red-deep)); }
#ny-stopwatch .ny-sw__place--3  { background: radial-gradient(circle at 35% 30%, #c8f5dc, var(--ny-green-2) 45%, var(--ny-green)); }
#ny-stopwatch .ny-sw__who b  { display: block; font-size: 18px; font-weight: 700; }
#ny-stopwatch .ny-sw__who small, #ny-stopwatch .ny-sw__res small  { display: block; font-size: 12px; color: #646c68; margin-top: 2px; }
#ny-stopwatch .ny-sw__res  { text-align: right; }
#ny-stopwatch .ny-sw__res b  { font-variant-numeric: tabular-nums; font-size: 18px; color: var(--ny-red); }

/* Игра */
#ny-stopwatch .ny-sw__game  { text-align: center; position: relative; }
#ny-stopwatch .ny-sw__year  {
  position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
  font-family: var(--ny-head); font-size: clamp(130px, 19vw, 240px); line-height: 1;
  color: rgba(255, 255, 255, .07);
  pointer-events: none; user-select: none; z-index: -1; white-space: nowrap;
}
#ny-stopwatch .ny-sw__kicker  {
  display: inline-block; margin: 0 0 6px; padding: 6px 16px; border-radius: 999px;
  background: var(--ny-green); color: var(--ny-gold-2);
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(242, 196, 109, .6);
}
#ny-stopwatch .ny-sw__big  {
  margin: 6px 0 0; font-family: var(--ny-head); font-weight: 400;
  font-size: clamp(54px, 7.6vw, 104px); line-height: 1.05; letter-spacing: .035em; word-spacing: .12em;
  font-synthesis: none; text-transform: none;
  color: var(--ny-gold);
}
/* Весь заголовок золотой */
#ny-stopwatch .ny-sw__big span  {
  display: inline-block; white-space: nowrap;
  color: var(--ny-gold);
  background: linear-gradient(180deg, #fff6d8 0%, var(--ny-gold) 45%, #d89a2a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 0 var(--ny-red-deep)) drop-shadow(0 0 18px rgba(255, 210, 120, .45));
  text-shadow: none;
}
#ny-stopwatch .ny-sw__title  { margin: 12px 0 0; font-size: clamp(21px, 2.3vw, 30px); font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(30, 0, 6, .55); }
#ny-stopwatch .ny-sw__prize  { margin: 6px 0 0; font-size: clamp(16px, 1.5vw, 19px); font-weight: 500; color: var(--ny-gold-2); text-shadow: 0 2px 8px rgba(30, 0, 6, .55); }

#ny-stopwatch .ny-sw__display  {
  display: inline-flex; align-items: baseline; gap: 6px;
  margin: 24px auto 24px; padding: 14px 32px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0c3a25, #072417);
  border: 3px solid var(--ny-gold);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .18), 0 16px 36px rgba(60, 0, 6, .5), inset 0 2px 12px rgba(0, 0, 0, .5);
  font-variant-numeric: tabular-nums;
  transition: box-shadow .2s;
}
#ny-stopwatch .ny-sw__digits  { font-size: clamp(58px, 8vw, 94px); font-weight: 800; line-height: 1; letter-spacing: -.01em; min-width: 5.2ch; color: #fff; text-shadow: 0 0 18px rgba(120, 255, 180, .35); }
#ny-stopwatch .ny-sw__unit  { font-size: 20px; color: var(--ny-gold); font-weight: 700; }
#ny-stopwatch .ny-sw__display.is-stopped .ny-sw__digits  { color: var(--ny-gold-2); animation: ny-pop .35s ease; }
#ny-stopwatch .ny-sw__display.is-win  { box-shadow: 0 0 0 5px var(--ny-gold-2), 0 0 60px rgba(255, 220, 140, .8); }
@keyframes ny-pop { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* Знак лари: в рукописном шрифте его нет */
#ny-stopwatch .ny-lari  { font-family: "Noto Sans Georgian", "Segoe UI", "Sylfaen", "DejaVu Sans", Arial, sans-serif; font-style: normal; font-weight: 700; font-size: .82em; }

/* Круглая красная кнопка с золотым и белым кольцом */
#ny-stopwatch .ny-sw__btn  {
  display: block; margin: 0 auto;
  width: 156px; height: 156px; border-radius: 50%;
  border: 7px solid var(--ny-gold);
  background: radial-gradient(circle at 35% 28%, #ff8a7a 0%, #ff2a2a 34%, #c50d16 70%, #7d0610 100%);
  color: #fff; font: inherit; font-size: 21px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
  cursor: pointer;
  box-shadow: 0 0 0 7px #fff, 0 10px 0 7px #e4dcd0, 0 22px 44px rgba(50, 0, 5, .6), inset 0 -8px 16px rgba(0, 0, 0, .3);
  transition: transform .08s ease, box-shadow .08s ease, filter .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none;
}
#ny-stopwatch .ny-sw__btn:hover:not(:disabled)  { filter: brightness(1.07); }
#ny-stopwatch .ny-sw__btn:active:not(:disabled)  { transform: translateY(7px); box-shadow: 0 0 0 7px #fff, 0 3px 0 7px #e4dcd0, 0 10px 22px rgba(50, 0, 5, .6), inset 0 -5px 12px rgba(0, 0, 0, .3); }
#ny-stopwatch .ny-sw__btn:focus-visible  { outline: 3px solid var(--ny-gold-2); outline-offset: 12px; }
#ny-stopwatch .ny-sw__btn:disabled  { cursor: default; filter: grayscale(.6) brightness(.85); }
#ny-stopwatch .ny-sw__btn.is-running  { animation: ny-pulse 1s ease-in-out infinite; }
@keyframes ny-pulse { 50% { box-shadow: 0 0 0 7px #fff, 0 10px 0 7px #e4dcd0, 0 0 0 20px rgba(255, 255, 255, .25), 0 22px 44px rgba(50, 0, 5, .6), inset 0 -8px 16px rgba(0, 0, 0, .3); } }

#ny-stopwatch .ny-sw__status  { margin: 30px auto 0; max-width: 470px; font-size: 15px; line-height: 1.5; color: #fff; min-height: 46px; text-shadow: 0 1px 6px rgba(30, 0, 6, .5); }
#ny-stopwatch .ny-sw__left  { color: var(--ny-gold-2); font-weight: 700; }
#ny-stopwatch .ny-sw__until  { font-variant-numeric: tabular-nums; color: var(--ny-gold-2); }
#ny-stopwatch .ny-sw__result  { max-width: 470px; margin: 8px auto 0; }
#ny-stopwatch .ny-sw__card  { border-radius: 10px; padding: 14px 18px; background: rgba(30, 0, 8, .45); border: 1px solid rgba(255, 226, 163, .35); color: #fff; }
#ny-stopwatch .ny-sw__card p  { margin: 4px 0; }
#ny-stopwatch .ny-sw__card b  { color: var(--ny-gold-2); font-variant-numeric: tabular-nums; }
#ny-stopwatch .ny-sw__muted  { color: #ffe9e4; font-size: 14px; }
#ny-stopwatch .ny-sw__card.is-win  { background: var(--ny-paper); color: var(--ny-ink); border: 0; padding: 22px; box-shadow: 0 0 0 6px var(--ny-gold); }
#ny-stopwatch .ny-sw__card.is-win b  { color: var(--ny-red); }
#ny-stopwatch .ny-sw__wintitle  { font-family: var(--ny-head); font-size: 34px; color: var(--ny-red); }
#ny-stopwatch .ny-sw__codeline  { margin-top: 12px !important; font-size: 13px; color: #646c68; }
#ny-stopwatch .ny-sw__code  { font-weight: 800; letter-spacing: .1em; color: var(--ny-ink); user-select: all; }
/* Форма телефона победителя */
#ny-stopwatch .ny-sw__form  { margin: 14px 0 0; text-align: left; }
#ny-stopwatch .ny-sw__form label  { display: block; margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--ny-ink); }
#ny-stopwatch .ny-sw__field  { display: flex; gap: 8px; }
#ny-stopwatch .ny-sw__field input  {
  flex: 1 1 auto; min-width: 0; height: 50px; padding: 0 14px; border-radius: 8px;
  border: 2px solid #d7c29b; background: #fff; color: var(--ny-ink); font: inherit; font-size: 17px; letter-spacing: .02em;
}
#ny-stopwatch .ny-sw__field input:focus  { outline: none; border-color: var(--ny-red); box-shadow: 0 0 0 3px rgba(200, 22, 31, .18); }
#ny-stopwatch .ny-sw__field button  {
  flex: 0 0 auto; height: 50px; padding: 0 18px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--ny-green-2); color: #fff; font: inherit; font-size: 16px; font-weight: 700;
}
#ny-stopwatch .ny-sw__field button:hover:not(:disabled)  { filter: brightness(1.08); }
#ny-stopwatch .ny-sw__field button:disabled  { opacity: .7; cursor: default; }
#ny-stopwatch .ny-sw__err  { margin: 6px 0 0 !important; font-size: 13px; color: var(--ny-red); font-weight: 600; }
#ny-stopwatch .ny-sw__claimed  { margin: 14px 0 0 !important; padding: 12px; border-radius: 8px; background: #e9f6ee; color: #135c37; font-weight: 700; }
@media (max-width: 420px) {
  #ny-stopwatch .ny-sw__field  { flex-direction: column; }
  #ny-stopwatch .ny-sw__field button  { width: 100%; }
}
#ny-stopwatch .ny-sw__wa  {
  display: inline-block; margin-top: 6px; padding: 12px 20px; border-radius: 8px;
  background: var(--ny-green-2); color: #fff; text-decoration: none; font-weight: 700;
}
#ny-stopwatch .ny-sw__rules  { margin: 22px 0 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }

/* Телефон: та же игра, рейтинг под ней */
@media (max-width: 820px) {
#ny-stopwatch .ny-sw__wrap  { grid-template-columns: 1fr; }
#ny-stopwatch .ny-sw__game  { order: 1; }
#ny-stopwatch .ny-sw__board  { order: 2; padding: 32px 18px 14px; margin-top: 28px; }
#ny-stopwatch .ny-sw__btn  { width: 138px; height: 138px; font-size: 19px; }
#ny-stopwatch .ny-sw__display  { padding: 12px 22px 10px; }
#ny-stopwatch .ny-sw__lights i:nth-child(n+16)  { display: none; }
}

@media (prefers-reduced-motion: reduce) {
#ny-stopwatch .ny-sw__lights i  { animation: none !important; }
#ny-stopwatch .ny-sw__snow  { display: none; }
#ny-stopwatch .ny-sw__btn.is-running, #ny-stopwatch .ny-sw__display.is-stopped .ny-sw__digits  { animation: none; }
}
