/* Новогодняя ярмарка — «Окошко дня» (адвент 7–20 декабря), 5 вариантов оформления.
   Подключать после game.css. Корень: section.nyf-adv.nyf-adv--N внутри #nyFairGame. Палитра страницы: изумруд, золото, крем, клюква. */

/* =====================================================================
   Общее: изумрудная панель, лента-заголовок, подписи, календарь
   ===================================================================== */
#nyFairGame .nyf-adv { --snow: radial-gradient(closest-side, #fff 93%, rgba(255, 255, 255, 0)) 0 0 / 36% 200% no-repeat, radial-gradient(closest-side, #f3f8fc 93%, rgba(255, 255, 255, 0)) 28% 0 / 30% 160% no-repeat, radial-gradient(closest-side, #fff 93%, rgba(255, 255, 255, 0)) 58% 0 / 40% 190% no-repeat, radial-gradient(closest-side, #f6fafd 93%, rgba(255, 255, 255, 0)) 100% 0 / 34% 170% no-repeat;
  --em: #0f2f25; --em2: #174536; --em3: #1f5a46; --g1: #e2b866; --g2: #f8e2a8; --g3: #b98a3a; --cr: #fff6e6; --cran: #b3262d;
  padding: 30px 30px 26px; overflow: hidden;
  background: radial-gradient(70% 55% at 50% 0%, rgba(226, 184, 102, .17), transparent 70%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .045) 0 1px, transparent 1.5px) 0 0 / 30px 30px,
    linear-gradient(180deg, #174536, #12392c 55%, #0f2f25);
  border: 1px solid rgba(226, 184, 102, .55);
  box-shadow: inset 0 0 0 5px #0f2f25, inset 0 0 0 6px rgba(226, 184, 102, .28), inset 0 1px 30px rgba(0, 0, 0, .25), 0 24px 50px rgba(3, 18, 12, .45); }
#nyFairGame .nyf-adv .nyf-garland { display: none; }
#nyFairGame .nyf-adv-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
#nyFairGame .nyf-adv-title { position: relative; display: inline-block; padding: 9px 46px 11px; font: 600 italic 28px/1.15 var(--script); color: #fff3d6;
  background: linear-gradient(180deg, #c8363d 0%, #a5262d 55%, #8a1c23 100%); text-shadow: 0 1px 0 rgba(90, 10, 14, .6);
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 50%, 100% 100%, 0 100%, 18px 50%); }
#nyFairGame .nyf-adv-title span { position: relative; display: block; padding: 0 4px; }
#nyFairGame .nyf-adv-title span::before { content: ''; position: absolute; left: -22px; right: -22px; top: -5px; bottom: -6px; border-top: 1px dashed rgba(248, 226, 168, .6); border-bottom: 1px dashed rgba(248, 226, 168, .6); }
#nyFairGame .nyf-adv-date { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--g1); }
#nyFairGame .nyf-adv .nyf-sub { max-width: 560px; color: #e6efe9; font-size: 15px; }
#nyFairGame .nyf-adv-body { margin-top: 18px; }
#nyFairGame .nyf-adv .nyf-doors { display: block; margin: 0; perspective: none; gap: 0; }
#nyFairGame .nyf-adv .nyf-day-acts { margin-top: 10px; }
#nyFairGame .nyf-adv .nyf-nextday { display: block; text-align: center; color: #d9e6df; }
#nyFairGame .nyf-adv .nyf-nextday svg { display: inline-block; margin-right: 6px; vertical-align: -3px; }

/* ряд из трёх вариантов выбора */
#nyFairGame .nyf-ac-row { display: flex; justify-content: center; align-items: flex-start; gap: clamp(14px, 4.5vw, 60px); }
#nyFairGame .nyf-ac { position: relative; width: clamp(100px, 26vw, 196px); display: flex; flex-direction: column; align-items: center; transition: opacity .5s, transform .5s; }
#nyFairGame .nyf-ac-btn { position: relative; display: block; width: 100%; text-align: center; border-radius: 14px; }
#nyFairGame .nyf-ac-btn:focus-visible { outline-offset: 6px; }
#nyFairGame .nyf-adv .nyf-dcap { margin-top: 14px; min-height: 74px; }
#nyFairGame .nyf-adv .nyf-other { opacity: 1; transform: none; }
#nyFairGame .nyf-picked .nyf-ac:not(.nyf-chosen):not(.nyf-open) { opacity: .6; }
#nyFairGame .nyf-ac-toy { position: absolute; left: 50%; top: 50%; width: 74%; height: auto; aspect-ratio: 1; object-fit: contain; opacity: 0;
  transform: translate(-50%, -50%) scale(.3); transition: transform .8s cubic-bezier(.2, 1.4, .4, 1), opacity .4s, filter .6s; filter: drop-shadow(0 8px 12px rgba(40, 10, 0, .45)); }
#nyFairGame .nyf-open .nyf-ac-toy[src] { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#nyFairGame .nyf-other .nyf-ac-toy[src] { transform: translate(-50%, -50%) scale(.84); filter: drop-shadow(0 6px 8px rgba(40, 10, 0, .4)) saturate(.7) brightness(.92); }
#nyFairGame .nyf-mine .nyf-ac-toy[src] { animation: nyfAdvBob 3.4s 1.2s ease-in-out infinite; }
@keyframes nyfAdvBob { 50% { margin-top: -5px; } }
#nyFairGame .nyf-ac-glow { position: absolute; left: 50%; top: 50%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.4); border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 236, 170, .95) 0%, rgba(255, 196, 92, .55) 30%, transparent 64%); transition: opacity .6s, transform .9s; }
#nyFairGame .nyf-open .nyf-ac-glow { opacity: .75; transform: translate(-50%, -50%) scale(1); }
#nyFairGame .nyf-other .nyf-ac-glow { opacity: .3; }
#nyFairGame .nyf-mine.nyf-r-u .nyf-ac-glow { opacity: 1; background: radial-gradient(circle, #fff6c8 0%, rgba(255, 200, 61, .8) 32%, transparent 66%); }

/* календарь: общая шапка и легенда (форма, а не только цвет) */
#nyFairGame .nyf-adv .nyf-days-head { margin: 24px 0 14px; border-top: 1px solid rgba(226, 184, 102, .22); color: var(--g2); }
#nyFairGame .nyf-adv .nyf-legend { color: #cfdcd5; }
#nyFairGame .nyf-adv .nyf-legend i { width: 12px; height: 12px; margin-right: -5px; border-radius: 50%; }
#nyFairGame .nyf-adv .nyf-lg-o { background: radial-gradient(circle, #fff3c4 0 30%, #e2b866 34%); border: 0; }
#nyFairGame .nyf-adv .nyf-lg-b { background: linear-gradient(135deg, transparent 44%, #e7a08f 44% 56%, transparent 56%), #3b2a24; border: 1px solid #6a4a3e; }
#nyFairGame .nyf-adv .nyf-lg-l { background: transparent; border: 1.5px solid rgba(248, 226, 168, .6); }
#nyFairGame .nyf-adv .nyf-days { display: block; }
#nyFairGame .nyf-cal { margin: 0; padding: 0; list-style: none; }
#nyFairGame .nyf-cd { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
#nyFairGame .nyf-cd img { display: block; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
@keyframes nyfAdvPulse { 50% { box-shadow: 0 0 0 2px rgba(255, 241, 199, .9), 0 0 6px rgba(255, 210, 120, .3); } }

/* =====================================================================
   1 · Домик-календарь: окна домика = дни, большое окно со ставнями и тремя конвертами
   ===================================================================== */
#nyFairGame .nyf-adv--1 .nyf-adv-body { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); grid-template-areas: "cal stage" "cal acts"; gap: 6px 40px; align-items: start; }
#nyFairGame .nyf-adv--1 .nyf-doors { grid-area: stage; }
#nyFairGame .nyf-adv--1 .nyf-day-acts { grid-area: acts; }
#nyFairGame .nyf-adv--1 .nyf-adv-cal { grid-area: cal; }
#nyFairGame .nyf-adv--1 .nyf-days-head { margin: 0 0 12px; padding-top: 0; border: 0; justify-content: center; text-align: center; }

/* большое окно */
#nyFairGame .nyf-win { position: relative; margin: 26px auto 0; max-width: 640px; padding: 16px; border-radius: 50% 50% 14px 14px / 70px 70px 14px 14px;
  background: linear-gradient(90deg, #5b3018, #8a5530 18%, #6e4022 50%, #8a5530 82%, #5b3018);
  box-shadow: inset 0 0 0 2px rgba(248, 226, 168, .55), inset 0 0 0 6px #4a2510, 0 26px 40px rgba(0, 0, 0, .45); }
#nyFairGame .nyf-win-snow { position: absolute; z-index: 4; left: 22%; right: 22%; top: -13px; height: 22px; pointer-events: none; background: var(--snow); filter: drop-shadow(0 2px 2px rgba(0, 20, 40, .3)); }
#nyFairGame .nyf-win-glass { position: relative; z-index: 1; padding: 54px 18px 12px; border-radius: 50% 50% 8px 8px / 56px 56px 8px 8px; overflow: hidden;
  background: radial-gradient(70% 55% at 50% 35%, #ffd98e 0%, #e49a48 32%, #8c4a20 66%, #3b1a0b 100%);
  box-shadow: inset 0 0 0 3px #f3e1b8, inset 0 0 0 5px rgba(90, 50, 20, .6), inset 0 10px 30px rgba(60, 20, 0, .45); }
#nyFairGame .nyf-win-glass::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(42% 30% at 0 100%, rgba(255, 255, 255, .55), transparent 70%), radial-gradient(42% 30% at 100% 100%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(30% 22% at 0 0, rgba(255, 255, 255, .4), transparent 70%), radial-gradient(30% 22% at 100% 0, rgba(255, 255, 255, .4), transparent 70%); }
#nyFairGame .nyf-win .nyf-ac-row { position: relative; gap: clamp(8px, 3vw, 34px); }
#nyFairGame .nyf-win .nyf-ac { width: 30%; max-width: 168px; }
#nyFairGame .nyf-win .nyf-dcap { color: #fff6e6; text-shadow: 0 1px 3px rgba(40, 10, 0, .8); min-height: 70px; margin-top: 10px; }
#nyFairGame .nyf-win .nyf-could, #nyFairGame .nyf-win .nyf-other .nyf-dname { color: #fbe6c6; }
#nyFairGame .nyf-win .nyf-yours { color: #fff3c4; }
#nyFairGame .nyf-win .nyf-dcap .nyf-tapme { color: #4a1a06; background: rgba(255, 240, 200, .85); border-color: #fff3d6; text-shadow: none; }
#nyFairGame .nyf-win-sill { position: absolute; left: -26px; right: -26px; bottom: -16px; height: 20px; border-radius: 6px; background: linear-gradient(180deg, #8a5530, #5b3018); box-shadow: 0 10px 18px rgba(0, 0, 0, .4); }
#nyFairGame .nyf-win-sill::before { content: ''; position: absolute; left: 2%; right: 2%; top: -8px; height: 12px; background: var(--snow); }
#nyFairGame .nyf-win-open { margin-bottom: 0; }
/* ставни */
#nyFairGame .nyf-shut { position: absolute; inset: 16px; z-index: 3; display: block; perspective: 1100px; border-radius: 50% 50% 8px 8px / 56px 56px 8px 8px; }
#nyFairGame .nyf-shut-l, #nyFairGame .nyf-shut-r { position: absolute; top: 0; bottom: 0; width: 50%; transition: transform 1s cubic-bezier(.5, 0, .2, 1), opacity .5s .6s;
  background: linear-gradient(90deg, rgba(248, 226, 168, .5) 0 2px, transparent 2px calc(100% - 2px), rgba(0, 0, 0, .35) calc(100% - 2px)),
    repeating-linear-gradient(180deg, #1f5a46 0 13px, #174536 13px 15px, #24654f 15px 16px);
  box-shadow: inset 0 0 0 6px #123d2f, inset 0 0 0 7px rgba(226, 184, 102, .7); }
#nyFairGame .nyf-shut-l { left: 0; width: calc(50% - 2px); transform-origin: 0 50%; border-radius: 100% 0 0 8px / 56px 0 0 8px; }
#nyFairGame .nyf-shut-r { right: 0; width: calc(50% - 2px); transform-origin: 100% 50%; border-radius: 0 100% 8px 0 / 0 56px 8px 0; }
#nyFairGame .nyf-shut::before { content: ''; position: absolute; left: 50%; top: 8%; bottom: 0; width: 4px; margin-left: -2px; background: linear-gradient(180deg, transparent, #fff1c2 20%, #ffc861); box-shadow: 0 0 14px 4px rgba(255, 200, 100, .7); animation: nyfAdvSlit 2.6s ease-in-out infinite; }
#nyFairGame .nyf-win-open .nyf-shut::before { opacity: 0; }
#nyFairGame .nyf-shut-l::before, #nyFairGame .nyf-shut-r::before { content: ''; position: absolute; left: 13%; right: 13%; top: 56%; bottom: 9%; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgba(226, 184, 102, .55), inset 0 0 12px rgba(0, 0, 0, .25); }
#nyFairGame .nyf-shut-l::after, #nyFairGame .nyf-shut-r::after { content: ''; position: absolute; top: 24%; left: 50%; width: 40px; height: 40px; margin: 0 0 0 -20px;
  background: radial-gradient(circle, #fff6d0, #ffc861 70%); filter: drop-shadow(0 0 6px rgba(255, 200, 100, .9));
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
#nyFairGame .nyf-shut-tag { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); padding: 9px 20px; border-radius: 999px; white-space: nowrap; font-weight: 800; font-size: 15px;
  color: #4a1a06; background: linear-gradient(180deg, #ffe7a6, #e2b866 60%, #c99545); box-shadow: 0 6px 18px rgba(0, 0, 0, .4), 0 0 0 3px rgba(15, 47, 37, .6), inset 0 1px 0 rgba(255, 255, 255, .6); transition: opacity .3s, transform .2s; }
#nyFairGame .nyf-shut:hover .nyf-shut-tag { transform: translateX(-50%) translateY(-2px); }
#nyFairGame .nyf-shut:hover .nyf-shut-l { transform: rotateY(-10deg); } #nyFairGame .nyf-shut:hover .nyf-shut-r { transform: rotateY(10deg); }
#nyFairGame .nyf-shut:focus-visible { outline: 3px solid var(--g2); outline-offset: 4px; }
#nyFairGame .nyf-win-open .nyf-shut { pointer-events: none; }
#nyFairGame .nyf-win-open .nyf-shut-l { transform: rotateY(-108deg); opacity: 0; }
#nyFairGame .nyf-win-open .nyf-shut-r { transform: rotateY(108deg); opacity: 0; }
#nyFairGame .nyf-win-open .nyf-shut-tag { opacity: 0; }

/* конверт */
#nyFairGame .nyf-env { position: relative; display: block; width: 100%; aspect-ratio: 1.42; margin-top: 42%; }
#nyFairGame .nyf-env > span { position: absolute; display: block; }
#nyFairGame .nyf-env-back { inset: 0; z-index: 1; border-radius: 6px; background: linear-gradient(180deg, #d9bd88, #c9a66c); }
#nyFairGame .nyf-env-card { z-index: 2; left: 7%; right: 7%; top: 5%; height: 118%; border-radius: 6px; background: linear-gradient(180deg, #fffaf0, #f6e8cc);
  box-shadow: 0 2px 6px rgba(60, 30, 0, .3), inset 0 0 0 2px rgba(185, 138, 58, .35); transition: transform .9s .35s cubic-bezier(.25, 1.3, .45, 1); overflow: hidden; }
#nyFairGame .nyf-env-card .nyf-ac-toy { top: 36%; width: 70%; }
#nyFairGame .nyf-env-card .nyf-ac-glow { top: 36%; }
#nyFairGame .nyf-env-front { inset: 0; z-index: 3; border-radius: 6px; background: linear-gradient(180deg, #f6e4bf, #ead09c);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); box-shadow: inset 0 -3px 0 rgba(150, 100, 40, .25); }
#nyFairGame .nyf-env-front::before { content: ''; position: absolute; inset: 0; background: linear-gradient(28deg, transparent 49.4%, rgba(150, 100, 40, .3) 50%, transparent 50.6%), linear-gradient(-28deg, transparent 49.4%, rgba(150, 100, 40, .3) 50%, transparent 50.6%); }
#nyFairGame .nyf-env-flap { left: 0; right: 0; top: 0; height: 62%; z-index: 4; transform-origin: 50% 0; background: linear-gradient(180deg, #f1dcb0, #dfc085);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transition: transform .5s ease-in, z-index 0s .25s; }
#nyFairGame .nyf-env-seal { left: 50%; top: 58%; z-index: 5; width: 26%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #e0545a, #b3262d 45%, #7a1218); box-shadow: 0 2px 4px rgba(60, 0, 0, .45), inset 0 0 0 3px rgba(122, 18, 24, .6); transition: transform .4s, opacity .3s; }
#nyFairGame .nyf-env-seal i { position: absolute; inset: 26%; border-radius: 50%; border: 1.5px solid rgba(248, 226, 168, .75);
  background: radial-gradient(circle, #f8e2a8 0 2px, transparent 2.5px); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-env-flap { transform: rotateX(28deg); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-env { transform: translateY(-4px); }
#nyFairGame .nyf-env { transition: transform .3s; }
#nyFairGame .nyf-chosen .nyf-env-seal, #nyFairGame .nyf-open .nyf-env-seal { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
#nyFairGame .nyf-chosen .nyf-env-flap, #nyFairGame .nyf-open .nyf-env-flap { transform: rotateX(180deg); z-index: 0; }
#nyFairGame .nyf-open .nyf-env-card { transform: translateY(-62%); }
#nyFairGame .nyf-other .nyf-env-card { transform: translateY(-48%); }
#nyFairGame .nyf-mine .nyf-env-card { box-shadow: 0 0 0 3px #fff3c4, 0 0 26px rgba(255, 220, 130, .9), inset 0 0 0 2px rgba(185, 138, 58, .35); }

/* домик (календарь) */
#nyFairGame .nyf-house { position: relative; max-width: 400px; margin: 0 auto; padding-top: 6px; }
#nyFairGame .nyf-house-roof { position: relative; z-index: 1; display: block; height: 104px; margin: 0 -16px -1px; }
#nyFairGame .nyf-house-roof::before { content: ''; position: absolute; inset: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: radial-gradient(circle at 50% 0, #a8323a 0 9px, #7d1a20 10px 11px, transparent 11.5px) 0 0 / 22px 14px, linear-gradient(180deg, #a5262d, #6d151b); }
#nyFairGame .nyf-house-roof::after { content: ''; position: absolute; inset: -4px -4px 0; clip-path: polygon(50% 0, 100% 100%, 93% 100%, 50% 16%, 7% 100%, 0 100%);
  background: linear-gradient(180deg, #ffffff, #e8f1f8); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
#nyFairGame .nyf-house-chim { position: absolute; z-index: -1; left: 68%; top: 10px; width: 28px; height: 52px; background: repeating-linear-gradient(180deg, #8d4a32 0 9px, #6c3523 9px 11px); box-shadow: 0 -6px 0 -1px #fff; border-radius: 3px 3px 0 0; }
#nyFairGame .nyf-house-gable { position: absolute; z-index: 2; left: 50%; bottom: 14px; transform: translateX(-50%); width: 92px; height: 40px; display: grid; place-items: center;
  border-radius: 50% 50% 6px 6px / 70% 70% 6px 6px; font: 600 italic 15px/1 var(--script); color: #4a1a06; background: radial-gradient(circle at 50% 70%, #fff1c2, #f0c56c);
  box-shadow: 0 0 0 3px #f3e1b8, 0 0 0 5px #5b3018, 0 0 18px rgba(255, 210, 120, .6); }
#nyFairGame .nyf-house-wall { position: relative; padding: 16px 16px 14px; border-radius: 0 0 6px 6px;
  background: repeating-linear-gradient(180deg, #7f4d2a 0 15px, #6a3d20 15px 17px, #8b5832 17px 18px); box-shadow: inset 0 0 0 3px #5b3018, inset 0 10px 18px rgba(0, 0, 0, .25), 0 20px 30px rgba(0, 0, 0, .35); }
#nyFairGame .nyf-house-base { display: block; height: 20px; margin: -10px -20px 0; position: relative; z-index: 2; background: var(--snow); filter: drop-shadow(0 -1px 2px rgba(0, 30, 60, .25)); }
#nyFairGame .nyf-cal--1 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 12px; }
#nyFairGame .nyf-cal--1 .nyf-cd em { margin-top: 4px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 800; line-height: 16px; color: #4a2510; background: #f3e1b8; white-space: nowrap; }
#nyFairGame .nyf-hw { position: relative; display: block; width: 100%; aspect-ratio: .82; border-radius: 40% 40% 3px 3px / 26% 26% 3px 3px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 60%, #29506b, #10263a); box-shadow: 0 0 0 3px #f3e1b8, 0 0 0 4px #5b3018, 0 3px 0 4px #fff; }
#nyFairGame .nyf-hw::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent calc(50% - 1.5px), #f3e1b8 0 calc(50% + 1.5px), transparent 0), linear-gradient(180deg, transparent 52%, #f3e1b8 52% calc(52% + 3px), transparent 0); }
#nyFairGame .nyf-hw img { position: absolute; z-index: 1; left: 12%; top: 14%; width: 76%; height: 76%; }
#nyFairGame .nyf-hw-sh { position: absolute; inset: 0; z-index: 2; display: none; }
#nyFairGame .nyf-cd-locked .nyf-hw-sh { display: block; background: linear-gradient(90deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px calc(50% - 1px), rgba(0, 0, 0, .45) calc(50% - 1px) calc(50% + 1px), transparent 0 calc(100% - 1px), rgba(0, 0, 0, .35) 0),
  repeating-linear-gradient(180deg, #1f5a46 0 5px, #174536 5px 6px); }
#nyFairGame .nyf-cd-locked .nyf-hw::after { display: none; }
#nyFairGame .nyf-cd-today .nyf-hw { background: radial-gradient(70% 60% at 50% 55%, #fff6cf, #ffc860 55%, #e08b32); box-shadow: 0 0 0 3px #fff3c4, 0 0 0 4px #5b3018, 0 3px 0 4px #fff, 0 0 22px 6px rgba(255, 200, 90, .75); animation: nyfAdvWin 2.4s ease-in-out infinite; }
@keyframes nyfAdvWin { 50% { box-shadow: 0 0 0 3px #fff3c4, 0 0 0 4px #5b3018, 0 3px 0 4px #fff, 0 0 8px 2px rgba(255, 200, 90, .4); } }
#nyFairGame .nyf-cal--1 .nyf-cd-today em { color: #4a1a06; background: linear-gradient(180deg, #ffe7a6, #e2b866); }
#nyFairGame .nyf-cd-opened .nyf-hw { background: radial-gradient(70% 60% at 50% 60%, #ffe9b0, #e9a95a 70%, #b0662c); }
#nyFairGame .nyf-cd-burnt .nyf-hw { background: radial-gradient(80% 70% at 50% 60%, #33414a, #1a2228); }
#nyFairGame .nyf-cd-burnt .nyf-hw-sh { display: block; background: linear-gradient(38deg, transparent 42%, #8a5a3a 42% 56%, transparent 56%), linear-gradient(-38deg, transparent 42%, #7a4c30 42% 56%, transparent 56%); }
#nyFairGame .nyf-cal--1 .nyf-cd-burnt em { color: #d9c7bd; background: #4a3a34; text-decoration: line-through; }

/* =====================================================================
   2 · Три подарка: крышка слетает, игрушка поднимается
   ===================================================================== */
#nyFairGame .nyf-adv--2 .nyf-ac-row { margin-top: 64px; }
#nyFairGame .nyf-gift { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1.08; }
#nyFairGame .nyf-gift > span { position: absolute; display: block; }
#nyFairGame .nyf-gift-box, #nyFairGame .nyf-gift-lid, #nyFairGame .nyf-mg-box, #nyFairGame .nyf-mg-lid { --pap: radial-gradient(circle, rgba(248, 226, 168, .55) 0 1.6px, transparent 2.1px) 0 0 / 14px 14px, radial-gradient(circle, rgba(248, 226, 168, .3) 0 1.1px, transparent 1.6px) 7px 7px / 14px 14px, linear-gradient(160deg, #1f6a50, #123d2f);
  background: linear-gradient(90deg, transparent calc(50% - 11%), #8f1d24 0, #d9474e 50%, #8f1d24 calc(50% + 11%), transparent 0), var(--pap); }
#nyFairGame .nyf-gift-box { z-index: 2; left: 7%; right: 7%; bottom: 0; height: 62%; border-radius: 3px 3px 8px 8px;
  box-shadow: inset 0 0 0 1px rgba(248, 226, 168, .35), inset 0 14px 14px -8px rgba(0, 0, 0, .45), inset 0 -10px 16px rgba(0, 0, 0, .25), 0 16px 22px rgba(0, 0, 0, .4); }
#nyFairGame .nyf-gift-lid { z-index: 4; left: 2%; right: 2%; top: 30%; height: 15%; border-radius: 6px; transition: transform 1s cubic-bezier(.3, .9, .4, 1), opacity .6s .5s;
  box-shadow: inset 0 0 0 1px rgba(248, 226, 168, .4), inset 0 -6px 8px rgba(0, 0, 0, .3), 0 6px 10px rgba(0, 0, 0, .35); }
#nyFairGame .nyf-gift-bow { position: absolute; left: 50%; bottom: 55%; width: 66%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .4)); }
#nyFairGame .nyf-gift-in { z-index: 1; left: 8%; right: 8%; top: -34%; height: 84%; }
#nyFairGame .nyf-gift-in .nyf-ac-toy { width: 84%; transform: translate(-50%, 20%) scale(.4); transition: transform 1s .25s cubic-bezier(.2, 1.3, .4, 1), opacity .4s .25s, filter .6s; }
#nyFairGame .nyf-open .nyf-gift-in .nyf-ac-toy[src] { transform: translate(-50%, -50%) scale(1); }
#nyFairGame .nyf-other .nyf-gift-in .nyf-ac-toy[src] { transform: translate(-50%, -38%) scale(.8); }
#nyFairGame .nyf-gift-in .nyf-ac-glow { top: 46%; }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-gift-lid { transform: translateY(-8px) rotate(-3deg); }
#nyFairGame .nyf-adv--2 .nyf-ac-btn:not(:disabled):hover { animation: nyfAdvWig .6s ease; }
@keyframes nyfAdvWig { 25% { transform: rotate(-2deg); } 60% { transform: rotate(1.5deg); } }
#nyFairGame .nyf-chosen .nyf-gift-lid, #nyFairGame .nyf-mine .nyf-gift-lid { transform: translate(40%, -170%) rotate(28deg); opacity: 0; }
#nyFairGame .nyf-other .nyf-gift-lid { z-index: 0; transform: translate(-16%, -150%) rotate(-14deg) scale(.86); opacity: .95; transition-delay: 0s; }
#nyFairGame .nyf-mine .nyf-gift-box { box-shadow: inset 0 0 0 1px rgba(248, 226, 168, .5), inset 0 14px 14px -8px rgba(0, 0, 0, .45), 0 0 0 3px #f8e2a8, 0 0 30px rgba(255, 210, 120, .6), 0 16px 22px rgba(0, 0, 0, .4); }

/* календарь — ряд маленьких подарков */
#nyFairGame .nyf-cal--2 { display: grid; grid-template-columns: repeat(15, 1fr); gap: 8px 6px; }
#nyFairGame .nyf-mg { position: relative; display: block; width: 100%; max-width: 54px; aspect-ratio: 1; }
#nyFairGame .nyf-mg-box, #nyFairGame .nyf-mg-lid { position: absolute; display: block; }
#nyFairGame .nyf-mg-box { z-index: 2; left: 12%; right: 12%; bottom: 0; height: 56%; border-radius: 2px 2px 4px 4px; box-shadow: inset 0 0 0 1px rgba(248, 226, 168, .35), inset 0 5px 5px -3px rgba(0, 0, 0, .4); }
#nyFairGame .nyf-mg-lid { z-index: 3; left: 6%; right: 6%; top: 34%; height: 16%; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(248, 226, 168, .4); }
#nyFairGame .nyf-mg-lid::before, #nyFairGame .nyf-mg-lid::after { content: ''; position: absolute; bottom: 90%; width: 30%; aspect-ratio: 1.3; border: 2.5px solid #d9474e; border-radius: 50%; }
#nyFairGame .nyf-mg-lid::before { right: 50%; transform: rotate(-20deg); } #nyFairGame .nyf-mg-lid::after { left: 50%; transform: rotate(20deg); }
#nyFairGame .nyf-mg img { position: absolute; z-index: 1; left: 12%; top: -22%; width: 76%; height: 76%; }
#nyFairGame .nyf-cal--2 em { margin-top: 5px; font-size: 11px; font-weight: 700; color: #e6efe9; white-space: nowrap; }
#nyFairGame .nyf-cal--2 small { font-size: 10px; font-weight: 700; line-height: 1.1; }
#nyFairGame .nyf-cal--2 .nyf-cd-locked .nyf-mg { opacity: .55; }
#nyFairGame .nyf-cal--2 .nyf-cd-today .nyf-mg { filter: drop-shadow(0 0 10px rgba(255, 214, 120, .95)); animation: nyfAdvHop 2.2s ease-in-out infinite; }
#nyFairGame .nyf-cal--2 .nyf-cd-today em, #nyFairGame .nyf-cal--2 .nyf-cd-today small { color: var(--g2); }
@keyframes nyfAdvHop { 50% { transform: translateY(-3px); } }
#nyFairGame .nyf-cal--2 .nyf-cd-opened .nyf-mg-lid { transform: translate(-34%, -60%) rotate(-24deg); }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt .nyf-mg { filter: grayscale(1) brightness(.6); }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt .nyf-mg-box { height: 34%; }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt .nyf-mg-lid { top: 58%; transform: rotate(8deg); }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt .nyf-mg-lid::before, #nyFairGame .nyf-cal--2 .nyf-cd-burnt .nyf-mg-lid::after { display: none; }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt em { color: #a9b8b0; text-decoration: line-through; }
#nyFairGame .nyf-cal--2 .nyf-cd-burnt small { color: #e7a08f; }

/* =====================================================================
   3 · Стеклянные шары с инеем: иней тает, внутри игрушка
   ===================================================================== */
@property --nyf-th { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
#nyFairGame .nyf-adv--3 .nyf-ac-row { margin-top: 26px; }
#nyFairGame .nyf-ball { position: relative; display: block; width: 100%; padding-top: 11%; transition: transform .35s; }
#nyFairGame .nyf-ball-cap { position: absolute; z-index: 3; left: 50%; top: 0; width: 24%; height: 15%; transform: translateX(-50%); border-radius: 5px 5px 3px 3px;
  background: repeating-linear-gradient(90deg, #f8e2a8 0 3px, #c99545 3px 5px, #e2b866 5px 7px), #e2b866; box-shadow: inset 0 -3px 0 rgba(90, 50, 0, .35), 0 3px 4px rgba(0, 0, 0, .35); }
#nyFairGame .nyf-ball-cap::before { content: ''; position: absolute; left: -12%; right: -12%; bottom: -3px; height: 6px; border-radius: 50%; background: linear-gradient(180deg, #fff1c2, #b98a3a); }
#nyFairGame .nyf-ball-glass { --t1: #9c2a34; --t2: #4a0d14; position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 62%, var(--t1) 0%, var(--t2) 78%);
  box-shadow: inset 0 -14px 30px rgba(0, 0, 0, .5), inset 0 6px 18px rgba(255, 255, 255, .18), 0 0 0 1px rgba(248, 226, 168, .3), 0 20px 34px rgba(0, 0, 0, .45); }
#nyFairGame .nyf-ball--1 .nyf-ball-glass { --t1: #2a7a5c; --t2: #0b2a1f; }
#nyFairGame .nyf-ball--2 .nyf-ball-glass { --t1: #2c4f8f; --t2: #0d1a3a; }
#nyFairGame .nyf-ball-glass .nyf-ac-toy { width: 70%; }
#nyFairGame .nyf-ball-frost { position: absolute; inset: 0; z-index: 2; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, .9);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .5), rgba(226, 240, 250, .82) 72%, rgba(255, 255, 255, .95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent var(--nyf-th), #000 calc(var(--nyf-th) + 22%)); mask: radial-gradient(circle at 50% 50%, transparent var(--nyf-th), #000 calc(var(--nyf-th) + 22%));
  transition: --nyf-th 1.6s ease-out, opacity 1.2s .6s; }
#nyFairGame .nyf-ball-frost svg { width: 34%; height: 34%; stroke: #fff; stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(120, 180, 230, .9)); opacity: .9; transition: opacity .4s, transform .6s; }
#nyFairGame .nyf-ball-shine { position: absolute; z-index: 3; left: 14%; top: 10%; width: 36%; height: 26%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 40% 40%, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 70%); transform: rotate(-30deg); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-ball { transform: translateY(-5px) rotate(-3deg); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-ball-frost svg { transform: rotate(30deg) scale(1.08); }
#nyFairGame .nyf-chosen .nyf-ball-frost svg, #nyFairGame .nyf-open .nyf-ball-frost svg { opacity: 0; transform: scale(.4); }
#nyFairGame .nyf-chosen .nyf-ball-frost, #nyFairGame .nyf-mine .nyf-ball-frost { --nyf-th: 70%; opacity: 0; }
#nyFairGame .nyf-other .nyf-ball-frost { --nyf-th: 30%; opacity: .75; }
#nyFairGame .nyf-mine .nyf-ball-glass { box-shadow: inset 0 -14px 30px rgba(0, 0, 0, .45), inset 0 6px 18px rgba(255, 255, 255, .2), 0 0 0 3px #f8e2a8, 0 0 34px rgba(255, 214, 130, .7), 0 20px 34px rgba(0, 0, 0, .45); }

/* календарь — огоньки (без провода) */
#nyFairGame .nyf-cal--3 { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 0; }
#nyFairGame .nyf-cal--3 .nyf-cd { width: calc(100% / 15); }
#nyFairGame .nyf-bl { position: relative; display: block; width: 40px; height: 52px; }
#nyFairGame .nyf-bl-cap { position: absolute; left: 50%; top: 0; width: 15px; height: 10px; margin-left: -7.5px; border-radius: 2px; background: repeating-linear-gradient(90deg, #f8e2a8 0 2px, #b98a3a 2px 3px); }
#nyFairGame .nyf-bl-glass { position: absolute; left: 2px; right: 2px; top: 8px; bottom: 0; border-radius: 50% 50% 50% 50% / 42% 42% 58% 58%;
  background: rgba(255, 255, 255, .06); border: 1.5px solid rgba(248, 226, 168, .45); }
#nyFairGame .nyf-bl-glass img { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -48%); }
#nyFairGame .nyf-cal--3 em { margin-top: 5px; font-size: 12px; font-weight: 800; color: #e6efe9; }
#nyFairGame .nyf-cal--3 .nyf-cd-opened .nyf-bl-glass { border-color: #f8e2a8; background: radial-gradient(circle at 50% 45%, #fff3c4, #f2c063 70%); box-shadow: 0 0 14px 3px rgba(255, 205, 100, .55); }
#nyFairGame .nyf-cal--3 .nyf-cd-today .nyf-bl-glass { border-color: #fff3c4; background: radial-gradient(circle at 50% 40%, #fffbe6, #ffd36e 55%, #f0a03a); animation: nyfAdvBulb 1.8s ease-in-out infinite; }
#nyFairGame .nyf-cal--3 .nyf-cd-today em { color: #fff3c4; }
@keyframes nyfAdvBulb { 0%, 100% { box-shadow: 0 0 22px 7px rgba(255, 210, 110, .85); } 50% { box-shadow: 0 0 8px 2px rgba(255, 210, 110, .45); } }
#nyFairGame .nyf-cal--3 .nyf-cd-burnt .nyf-bl-glass { border-color: rgba(200, 200, 200, .25); background: radial-gradient(circle at 50% 40%, #4a4d50, #25282b); }
#nyFairGame .nyf-cal--3 .nyf-cd-burnt .nyf-bl-glass::after { content: ''; position: absolute; left: 30%; top: 22%; width: 40%; height: 56%;
  background: linear-gradient(115deg, transparent 45%, rgba(255, 255, 255, .45) 45% 52%, transparent 52%), linear-gradient(65deg, transparent 47%, rgba(255, 255, 255, .3) 47% 53%, transparent 53%); }
#nyFairGame .nyf-cal--3 .nyf-cd-burnt em { color: #93a39b; text-decoration: line-through; }

/* =====================================================================
   4 · Окна поезда: шторка поднимается, в окне игрушка; календарь — билеты
   ===================================================================== */
#nyFairGame .nyf-train { --gap: clamp(14px, 2.6vw, 30px); --w: clamp(100px, 17vw, 196px); position: relative; display: grid; grid-template-columns: auto repeat(3, var(--w)); column-gap: var(--gap); justify-content: center; align-items: end; margin-top: 28px; }
#nyFairGame .nyf-train .nyf-ac-row, #nyFairGame .nyf-train .nyf-ac { display: contents; }
#nyFairGame .nyf-train .nyf-ac-btn { grid-row: 1; }
#nyFairGame .nyf-train .nyf-dcap { grid-row: 2; align-self: start; }
#nyFairGame .nyf-train .nyf-ac[data-i="0"] > * { grid-column: 2; } #nyFairGame .nyf-train .nyf-ac[data-i="1"] > * { grid-column: 3; } #nyFairGame .nyf-train .nyf-ac[data-i="2"] > * { grid-column: 4; }
#nyFairGame .nyf-picked .nyf-train .nyf-ac:not(.nyf-chosen):not(.nyf-open) .nyf-ac-btn { opacity: .6; }
#nyFairGame .nyf-loco { position: relative; grid-row: 1; grid-column: 1; display: block; width: clamp(180px, 20vw, 260px); padding-bottom: 4px; }
#nyFairGame .nyf-loco img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .45)); }
#nyFairGame .nyf-wag { position: relative; display: block; width: 100%; padding-bottom: 15%; transition: transform .3s; }
#nyFairGame .nyf-wag > span { display: block; }
#nyFairGame .nyf-wag-roof { position: relative; height: 14px; margin: 0 -4%; border-radius: 12px 12px 3px 3px; background: linear-gradient(180deg, #4a2510, #2c1406); box-shadow: inset 0 -2px 0 #e2b866; }
#nyFairGame .nyf-wag-roof::before { content: ''; position: absolute; left: 6%; right: 6%; top: -6px; height: 10px; border-radius: 10px 10px 4px 4px; background: linear-gradient(#fff, #e6eff6); }
#nyFairGame .nyf-wag-body { position: relative; padding: 11% 10% 15%; border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, transparent 80%, #e2b866 80% 82%, transparent 82% 86%, #e2b866 86% 87%, transparent 87%), linear-gradient(180deg, #b3262d, #7d1a20);
  box-shadow: inset 0 0 0 2px rgba(248, 226, 168, .5), inset 0 -8px 12px rgba(0, 0, 0, .3), 0 12px 18px rgba(0, 0, 0, .35); }
#nyFairGame .nyf-wag-win { position: relative; display: block; width: 100%; aspect-ratio: 1.22; border-radius: 12px 12px 6px 6px; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 25%, #fff0c2, #f0b55c 45%, #9a5424 85%); box-shadow: 0 0 0 3px #e2b866, 0 0 0 5px #5b1a12, inset 0 -8px 14px rgba(80, 30, 0, .4); }
#nyFairGame .nyf-wag-in { position: absolute; inset: 0; display: block; }
#nyFairGame .nyf-wag-in .nyf-ac-toy { width: 76%; top: 54%; }
#nyFairGame .nyf-wag-cur { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 2; transform-origin: 50% 0; transition: transform 1.1s cubic-bezier(.5, 0, .25, 1);
  background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 18%), repeating-linear-gradient(90deg, #1f5a46 0 7px, #2a6e57 7px 10px, #174536 10px 15px, #0f2f25 15px 17px); }
#nyFairGame .nyf-wag-cur::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 12px;
  background: radial-gradient(circle at 6px 3px, #f8e2a8 0 3px, transparent 3.5px) 0 0 / 12px 12px repeat-x, linear-gradient(#e2b866, #e2b866) 0 0 / 100% 3px no-repeat; }
#nyFairGame .nyf-wag-plate { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); padding: 0 7px; border-radius: 3px; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 15px; color: #4a1a06; background: #f3d996; white-space: nowrap; }
#nyFairGame .nyf-wag-wheels { position: absolute; left: 12%; right: 12%; bottom: 3px; display: flex !important; justify-content: space-between; }
#nyFairGame .nyf-wag-wheels i { width: 24%; aspect-ratio: 1; margin-top: -40%; border-radius: 50%; background: radial-gradient(circle, #f8e2a8 0 14%, #3a1a0a 16% 26%, transparent 28%), repeating-conic-gradient(#3a1a0a 0 12deg, #6a3a1a 12deg 45deg); box-shadow: 0 0 0 3px #2a1206, inset 0 0 0 2px #e2b866; }
#nyFairGame .nyf-wag-rail { position: absolute; left: calc(var(--gap) / -2 - 1px); right: calc(var(--gap) / -2 - 1px); bottom: 0; height: 6px;
  background: linear-gradient(#c9d3d8, #7e8a90) 0 0 / 100% 3px no-repeat, repeating-linear-gradient(90deg, #5b3018 0 9px, transparent 9px 18px) 0 3px / 100% 3px no-repeat; }
#nyFairGame .nyf-loco .nyf-wag-rail { left: -10px; right: calc(var(--gap) / -2 - 1px); bottom: 0; }
#nyFairGame .nyf-wag::after { content: ''; position: absolute; right: calc(var(--gap) / -2 - 2px); bottom: 26%; width: calc(var(--gap) + 4px); height: 4px; background: #2a1206; border-radius: 2px; }
#nyFairGame .nyf-ac:last-child .nyf-wag::after { display: none; }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-wag-cur { transform: translateY(-10%); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-wag-body { transform: translateY(-2px); }
#nyFairGame .nyf-wag-body { transition: transform .25s; }
#nyFairGame .nyf-chosen .nyf-wag-cur, #nyFairGame .nyf-open .nyf-wag-cur { transform: translateY(-84%); }
#nyFairGame .nyf-mine .nyf-wag-body { box-shadow: inset 0 0 0 2px #f8e2a8, inset 0 -8px 12px rgba(0, 0, 0, .3), 0 0 0 3px rgba(248, 226, 168, .9), 0 0 34px rgba(255, 214, 120, .55), 0 12px 18px rgba(0, 0, 0, .35); }
#nyFairGame .nyf-mine .nyf-wag-win { box-shadow: 0 0 0 3px #fff3c4, 0 0 0 5px #5b1a12, 0 0 26px 6px rgba(255, 214, 120, .75), inset 0 -8px 14px rgba(80, 30, 0, .4); }

/* календарь — билеты */
#nyFairGame .nyf-cal--4 { display: grid; grid-template-columns: repeat(15, 1fr); gap: 8px 6px; }
#nyFairGame .nyf-tk { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 100%; aspect-ratio: .74; padding-top: 6px; border-radius: 6px; overflow: hidden;
  color: #4a2510; background: linear-gradient(180deg, transparent 30%, rgba(122, 18, 24, .28) 30% calc(30% + 1px), transparent 0), #fff3dc;
  -webkit-mask: radial-gradient(circle 5px at 0 30%, transparent 95%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 30%, transparent 95%, #000) 100% 0 / 51% 100% no-repeat;
  mask: radial-gradient(circle 5px at 0 30%, transparent 95%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 5px at 100% 30%, transparent 95%, #000) 100% 0 / 51% 100% no-repeat; }
#nyFairGame .nyf-tk > small { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #a5262d; }
#nyFairGame .nyf-tk b { margin-top: 6px; font: 800 20px/1 var(--script); color: #4a2510; }
#nyFairGame .nyf-tk .nyf-tk-tag { margin-top: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0; text-transform: none; color: inherit; }
#nyFairGame .nyf-tk-stamp { position: absolute; right: 2px; bottom: 2px; width: 58%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(179, 38, 45, .75); transform: rotate(-14deg); display: grid; place-items: center; background: rgba(255, 255, 255, .5); }
#nyFairGame .nyf-tk-stamp img { width: 84%; height: 84%; }
#nyFairGame .nyf-cal--4 .nyf-cd-opened .nyf-tk b { font-size: 16px; margin-top: 3px; align-self: flex-start; margin-left: 18%; }
#nyFairGame .nyf-cal--4 .nyf-cd-locked .nyf-tk { color: #e6efe9; background: linear-gradient(180deg, transparent 30%, rgba(248, 226, 168, .3) 30% calc(30% + 1px), transparent 0), rgba(255, 246, 230, .1); }
#nyFairGame .nyf-cal--4 .nyf-cd-locked .nyf-tk b, #nyFairGame .nyf-cal--4 .nyf-cd-locked .nyf-tk > small { color: rgba(248, 226, 168, .8); }
#nyFairGame .nyf-cal--4 .nyf-cd-today .nyf-tk { background: linear-gradient(180deg, transparent 30%, rgba(122, 60, 0, .35) 30% calc(30% + 1px), transparent 0), linear-gradient(160deg, #fff3c4, #e8b65a); }
#nyFairGame .nyf-cal--4 .nyf-cd-today { filter: drop-shadow(0 0 8px rgba(255, 210, 120, .8)); animation: nyfAdvHop 2.2s ease-in-out infinite; }
#nyFairGame .nyf-cal--4 .nyf-cd-burnt .nyf-tk { background: #b9aa98; color: #5b4a3e; clip-path: polygon(0 0, 100% 0, 100% 78%, 82% 86%, 64% 76%, 46% 90%, 28% 80%, 12% 92%, 0 82%); }
#nyFairGame .nyf-cal--4 .nyf-cd-burnt .nyf-tk b { color: #5b4a3e; text-decoration: line-through; }
#nyFairGame .nyf-cal--4 .nyf-cd-burnt .nyf-tk > small:first-child { color: #6a5446; }

/* =====================================================================
   5 · Изящные дверцы 2.0: золотая арка с огоньками, свет из щели, снег на пороге
   ===================================================================== */
#nyFairGame .nyf-adv--5 .nyf-ac-row { margin-top: 26px; perspective: 1400px; }
#nyFairGame .nyf-adv--5 .nyf-ac { width: clamp(100px, 24vw, 184px); }
#nyFairGame .nyf-adv--5 .nyf-dcap { margin-top: 24px; }
#nyFairGame .nyf-arch { position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 50% 50% 8px 8px / 33.3% 33.3% 8px 8px;
  background: linear-gradient(135deg, #fff1c2, #e2b866 30%, #a8782e 55%, #f3d58e 80%, #b98a3a);
  box-shadow: 0 0 0 1px #6a4a18, 0 22px 34px rgba(0, 0, 0, .45); transform-style: preserve-3d; }
#nyFairGame .nyf-arch-in, #nyFairGame .nyf-arch-door { position: absolute; left: 7%; right: 7%; top: 4.7%; bottom: 0; border-radius: 50% 50% 0 0 / 33.3% 33.3% 0 0; }
#nyFairGame .nyf-arch-in { overflow: hidden; display: block; background: radial-gradient(70% 55% at 50% 45%, #fff3c4, #f3b85c 45%, #9a5424 85%); box-shadow: inset 0 0 0 2px #6a4a18, inset 0 0 24px rgba(90, 40, 0, .5); }
#nyFairGame .nyf-arch-in .nyf-ac-toy { top: 48%; width: 78%; }
#nyFairGame .nyf-arch-slit { position: absolute; z-index: 1; right: 7%; top: 30%; bottom: 0; width: 3px; display: block; background: linear-gradient(180deg, transparent, #fff3c4 25%, #ffd27a); box-shadow: 0 0 12px 3px rgba(255, 210, 120, .85); animation: nyfAdvSlit 2.6s ease-in-out infinite; transition: opacity .3s, width .3s; }
@keyframes nyfAdvSlit { 50% { opacity: .55; } }
#nyFairGame .nyf-arch-door { z-index: 2; display: block; transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1.3s cubic-bezier(.45, .05, .25, 1); }
#nyFairGame .nyf-arch-face, #nyFairGame .nyf-arch-back { position: absolute; inset: 0; display: block; border-radius: inherit; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
#nyFairGame .nyf-arch-face { background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 20%, transparent 80%, rgba(0, 0, 0, .25)), linear-gradient(180deg, #23664f, #154a39 60%, #103a2d);
  box-shadow: inset 0 0 0 2px #6a4a18, inset 0 0 0 4px rgba(248, 226, 168, .55); }
#nyFairGame .nyf-arch-face::before { content: ''; position: absolute; left: 13%; right: 13%; top: 9%; height: 40%; border-radius: 50% 50% 4px 4px / 40% 40% 4px 4px; box-shadow: inset 0 0 0 1.5px rgba(248, 226, 168, .5), inset 0 0 14px rgba(0, 0, 0, .25); }
#nyFairGame .nyf-arch-face::after { content: ''; position: absolute; left: 13%; right: 13%; top: 56%; bottom: 7%; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgba(248, 226, 168, .5), inset 0 0 14px rgba(0, 0, 0, .25); }
#nyFairGame .nyf-arch-back { transform: rotateY(180deg); background: linear-gradient(90deg, #0b2a1f, #154a39); box-shadow: inset 0 0 0 3px #6a4a18; }
#nyFairGame .nyf-arch-wreath { position: absolute; z-index: 1; left: 50%; top: 13%; width: 56%; height: auto; transform: translateX(-50%); filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .45)); }
#nyFairGame .nyf-arch-plate { position: absolute; z-index: 1; left: 50%; top: 62%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; min-width: 44%; padding: 4px 6px 5px; border-radius: 6px;
  font: 700 clamp(18px, 2.4vw, 28px)/1 var(--script); color: #4a2a06; background: linear-gradient(180deg, #fff1c2, #e2b866 60%, #c99545); box-shadow: 0 3px 6px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .5); }
#nyFairGame .nyf-arch-plate small { font: 800 9px/1.2 Montserrat, Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
#nyFairGame .nyf-arch-knob { position: absolute; z-index: 1; right: 11%; top: 52%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, #e2b866 50%, #8a5a1a); box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
#nyFairGame .nyf-arch-lights { position: absolute; inset: 0; z-index: 3; display: block; pointer-events: none; }
#nyFairGame .nyf-arch-lights i { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff7d6; box-shadow: 0 0 6px 2px rgba(255, 220, 130, .9); animation: nyfAdvTw 2.6s ease-in-out infinite; }
@keyframes nyfAdvTw { 50% { opacity: .45; box-shadow: 0 0 2px 0 rgba(255, 220, 130, .6); } }
#nyFairGame .nyf-arch-snow { position: absolute; z-index: 4; left: -9%; right: -9%; bottom: -3%; height: 9%; display: block; pointer-events: none; background: var(--snow); filter: drop-shadow(0 -1px 2px rgba(0, 30, 60, .3)); }
#nyFairGame .nyf-arch::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -5%; height: 5%; border-radius: 3px; background: linear-gradient(180deg, #f3d58e, #a8782e); box-shadow: 0 8px 14px rgba(0, 0, 0, .4); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-arch-door { transform: rotateY(-16deg); }
#nyFairGame .nyf-ac-btn:not(:disabled):hover .nyf-arch-slit { width: 7px; }
#nyFairGame .nyf-chosen .nyf-arch-door { animation: nyfAdvKnock .42s ease; }
@keyframes nyfAdvKnock { 25% { transform: rotateY(-6deg); } 50% { transform: rotateY(2deg); } 75% { transform: rotateY(-4deg); } }
#nyFairGame .nyf-open .nyf-arch-door { transform: rotateY(-104deg); animation: none; }
#nyFairGame .nyf-open .nyf-arch-slit { opacity: 0; animation: none; }
#nyFairGame .nyf-mine .nyf-arch { box-shadow: 0 0 0 1px #6a4a18, 0 0 40px rgba(255, 210, 120, .6), 0 22px 34px rgba(0, 0, 0, .45); }

/* календарь — тонкая лента дат */
#nyFairGame .nyf-cal--5 { position: relative; display: flex; justify-content: space-between; padding: 6px 0 0; }
#nyFairGame .nyf-cal--5::before { content: ''; position: absolute; left: calc(100% / 30); right: calc(100% / 30); top: 23px; height: 2px; background: linear-gradient(90deg, rgba(226, 184, 102, .2), rgba(226, 184, 102, .7), rgba(226, 184, 102, .2)); }
#nyFairGame .nyf-cal--5 .nyf-cd { flex: 1; }
#nyFairGame .nyf-rd { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #133c2f; border: 1.5px solid rgba(248, 226, 168, .55); }
#nyFairGame .nyf-rd img { width: 82%; height: 82%; }
#nyFairGame .nyf-cal--5 em { margin-top: 6px; font-size: 12px; font-weight: 700; color: #cfdcd5; }
#nyFairGame .nyf-cal--5 .nyf-cd-opened .nyf-rd { background: radial-gradient(circle, #fffaf0, #f4e3c3); border: 2px solid #e2b866; }
#nyFairGame .nyf-cal--5 .nyf-cd-today .nyf-rd { background: radial-gradient(circle, #fff3c4 0 22%, #e2b866 26% 40%, #133c2f 44%); border: 2px solid #f8e2a8; animation: nyfAdvRd 2.2s ease-in-out infinite; }
@keyframes nyfAdvRd { 0%, 100% { box-shadow: 0 0 0 4px rgba(248, 226, 168, .2), 0 0 16px rgba(255, 210, 120, .8); } 50% { box-shadow: 0 0 0 8px rgba(248, 226, 168, 0), 0 0 6px rgba(255, 210, 120, .4); } }
#nyFairGame .nyf-cal--5 .nyf-cd-today em { color: #fff3c4; }
#nyFairGame .nyf-cal--5 .nyf-cd-burnt .nyf-rd { width: 22px; height: 22px; margin: 6px 0; background: linear-gradient(135deg, transparent 45%, #e7a08f 45% 55%, transparent 55%), #3b2a24; border-color: #6a4a3e; }
#nyFairGame .nyf-cal--5 .nyf-cd-burnt em { color: #93a39b; text-decoration: line-through; }
#nyFairGame .nyf-cal--5 .nyf-cd-locked .nyf-rd { width: 16px; height: 16px; margin: 9px 0; background: #0f2f25; }

/* =====================================================================
   Телефон
   ===================================================================== */
@media (max-width: 899px) {
  #nyFairGame .nyf-adv--1 .nyf-adv-body { grid-template-columns: 1fr; grid-template-areas: "stage" "acts" "cal"; }
  #nyFairGame .nyf-adv--1 .nyf-days-head { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(226, 184, 102, .22); }
}
@media (max-width: 759px) {
  #nyFairGame .nyf-adv { padding: 24px 12px 20px; }
  #nyFairGame .nyf-adv-title { font-size: 23px; padding: 8px 34px 9px; }
  #nyFairGame .nyf-adv-date { font-size: 11.5px; letter-spacing: .08em; }
  #nyFairGame .nyf-adv .nyf-sub { font-size: 14px; }
  #nyFairGame .nyf-ac-row { gap: 10px; }
  #nyFairGame .nyf-ac { width: calc((100% - 20px) / 3); max-width: 124px; }
  #nyFairGame .nyf-adv .nyf-dcap { min-height: 82px; margin-top: 10px; }
  #nyFairGame .nyf-adv .nyf-dcap .nyf-rb { white-space: normal; justify-content: center; text-align: center; line-height: 1.25; padding: 2px 7px; }
  #nyFairGame .nyf-adv .nyf-days-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  #nyFairGame .nyf-adv--1 .nyf-days-head { align-items: center; }
  /* 1 */
  #nyFairGame .nyf-win { padding: 10px; margin-top: 22px; border-radius: 50% 50% 12px 12px / 48px 48px 12px 12px; }
  #nyFairGame .nyf-win-glass { padding: 44px 6px 8px; border-radius: 50% 50% 6px 6px / 40px 40px 6px 6px; }
  #nyFairGame .nyf-shut { inset: 10px; border-radius: 50% 50% 6px 6px / 40px 40px 6px 6px; }
  #nyFairGame .nyf-shut-l { border-radius: 100% 0 0 6px / 40px 0 0 6px; } #nyFairGame .nyf-shut-r { border-radius: 0 100% 6px 0 / 0 40px 6px 0; }
  #nyFairGame .nyf-shut-tag { font-size: 13px; padding: 8px 14px; bottom: 14%; }
  #nyFairGame .nyf-win .nyf-ac-row { gap: 6px; }
  #nyFairGame .nyf-win .nyf-ac { width: calc((100% - 12px) / 3); }
  #nyFairGame .nyf-win-sill { left: -12px; right: -12px; }
  #nyFairGame .nyf-house { max-width: 326px; }
  #nyFairGame .nyf-house-roof { height: 84px; margin: 0 -12px -1px; }
  #nyFairGame .nyf-house-base { margin: -10px -14px 0; }
  #nyFairGame .nyf-shut-l::after, #nyFairGame .nyf-shut-r::after { width: 28px; height: 28px; margin-left: -14px; }
  #nyFairGame .nyf-house-wall { padding: 12px 12px 12px; }
  #nyFairGame .nyf-cal--1 { gap: 9px 10px; }
  /* 2 */
  #nyFairGame .nyf-cal--2, #nyFairGame .nyf-cal--4 { grid-template-columns: repeat(5, 1fr); gap: 12px 10px; }
  #nyFairGame .nyf-cal--2 .nyf-mg { max-width: 50px; }
  #nyFairGame .nyf-cal--4 .nyf-tk { max-width: 60px; margin: 0 auto; }
  /* 3 */
  #nyFairGame .nyf-cal--3 .nyf-cd { width: calc(100% / 8); }
  #nyFairGame .nyf-bl { width: 34px; height: 46px; }
  #nyFairGame .nyf-bl-glass img { width: 26px; height: 26px; }
  #nyFairGame .nyf-ball-frost svg { width: 40%; height: 40%; }
  /* 4 */
  #nyFairGame .nyf-train { --gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #nyFairGame .nyf-loco, #nyFairGame .nyf-wag .nyf-wag-plate { display: none; }
  #nyFairGame .nyf-train .nyf-ac[data-i="0"] > * { grid-column: 1; } #nyFairGame .nyf-train .nyf-ac[data-i="1"] > * { grid-column: 2; } #nyFairGame .nyf-train .nyf-ac[data-i="2"] > * { grid-column: 3; }
  #nyFairGame .nyf-train .nyf-ac[data-i="0"] > * { grid-column: 1; } #nyFairGame .nyf-train .nyf-ac[data-i="1"] > * { grid-column: 2; } #nyFairGame .nyf-train .nyf-ac[data-i="2"] > * { grid-column: 3; }
  #nyFairGame .nyf-wag-roof { height: 10px; }
  #nyFairGame .nyf-wag-plate { font-size: 8.5px; padding: 0 4px; line-height: 13px; }
  /* 5 */
  #nyFairGame .nyf-adv--5 .nyf-ac { width: calc((100% - 20px) / 3); }
  #nyFairGame .nyf-arch-lights i { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
  #nyFairGame .nyf-arch-plate { font-size: 17px; }
  #nyFairGame .nyf-arch-plate small { font-size: 7.5px; }
  #nyFairGame .nyf-cal--5::before { top: 17px; }
  #nyFairGame .nyf-rd { width: 22px; height: 22px; }
  #nyFairGame .nyf-rd img { width: 90%; height: 90%; }
  #nyFairGame .nyf-cal--5 .nyf-cd-today .nyf-rd { width: 24px; height: 24px; }
  #nyFairGame .nyf-cal--5 .nyf-cd-burnt .nyf-rd { width: 16px; height: 16px; margin: 3px 0; }
  #nyFairGame .nyf-cal--5 .nyf-cd-locked .nyf-rd { width: 11px; height: 11px; margin: 5.5px 0; border-width: 1px; }
  #nyFairGame .nyf-cal--5 em { font-size: 10px; }
}

/* боевой режим вне дней акции (до 7 декабря и после 18-го): коробки видны, но закрыты — приглушены, без «Открыть» и покачиваний */
#nyFairGame .nyf-doors.nyf-closed .nyf-ac-btn { cursor: default; filter: saturate(.55) brightness(.8); }
#nyFairGame .nyf-doors.nyf-closed .nyf-ac-btn * { animation: none !important; }
#nyFairGame .nyf-doors.nyf-closed .nyf-tapme { visibility: hidden; animation: none; }

/* меньше движения: без покачиваний и мерцаний (переходы отключает общее правило game.css) */
@media (prefers-reduced-motion: reduce) {
  #nyFairGame .nyf-adv *, #nyFairGame .nyf-adv *::before, #nyFairGame .nyf-adv *::after { animation: none !important; }
}
