/* 3.2.24: «Фабрика іграшок» — вкладка і гра «Знайди пару» */
.tf-p{display:flex;flex-direction:column;gap:10px;text-align:center}
.tf-load{display:flex;justify-content:center;padding:14px 0}
.tf-spin{width:42px;height:42px;animation:tfSpin 1.2s linear infinite}
@keyframes tfSpin{to{transform:rotate(360deg)}}

/* банер: майстерня, сніжна шапка, іграшки, що гойдаються */
.tf-ban{position:relative;display:flex;align-items:center;gap:10px;min-height:104px;margin-top:8px;padding:12px 12px 10px;border-radius:22px;text-align:left;background:radial-gradient(circle at 16% 55%,rgba(255,226,150,.45),rgba(255,226,150,0) 42%),radial-gradient(circle at 85% 20%,rgba(255,255,255,.18),rgba(255,255,255,0) 40%),linear-gradient(135deg,#d83a34 0%,#9c1c33 52%,#5e1246 100%);border:2px solid #ffd98a;box-shadow:inset 0 2px 0 rgba(255,255,255,.3),inset 0 -6px 14px rgba(60,0,30,.35),0 8px 18px rgba(0,0,0,.4),0 0 18px rgba(255,170,90,.25)}
.tf-ban::before{content:"";position:absolute;inset:0;border-radius:20px;background:repeating-linear-gradient(-45deg,rgba(255,255,255,.06) 0 10px,rgba(0,0,0,0) 10px 20px);pointer-events:none}
.tf-ban::after{content:"";position:absolute;left:6px;right:6px;top:-12px;height:28px;background:url(images/snow/cap2.webp?v=1) 0 0/100% 100% no-repeat;pointer-events:none}
.tf-glob{position:relative;flex:none;width:86px;height:86px;display:grid;place-items:center}
.tf-glob::before{content:"";position:absolute;inset:4px;border-radius:50%;background:radial-gradient(circle,rgba(255,230,160,.6),rgba(255,230,160,0) 70%);animation:tfPulse 2.6s ease-in-out infinite}
@keyframes tfPulse{50%{transform:scale(1.12);opacity:.65}}
.tf-glob img{position:relative;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 6px rgba(0,0,0,.45));animation:tfBob 3s ease-in-out infinite}
@keyframes tfBob{50%{transform:translateY(-3px) rotate(-2deg)}}
.tf-bt{position:relative;z-index:1;flex:1;min-width:0}
.tf-bt b{display:block;font:400 23px/1.05 var(--display);background:linear-gradient(180deg,#fff 35%,#ffe2a6);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 0 #5a0c18) drop-shadow(0 0 8px rgba(255,200,120,.4))}
.tf-bt small{display:inline-block;margin-top:6px;padding:3px 9px;border-radius:10px;background:rgba(40,0,20,.35);border:1px solid rgba(255,220,150,.35);font-size:11px;font-weight:900;color:#ffe7b0}
.tf-deco{position:absolute;right:2px;top:6px;bottom:4px;width:34%;pointer-events:none}
.tf-deco i{position:absolute;width:32px;height:32px;animation:tfSway 2.8s ease-in-out infinite;animation-delay:calc(var(--k) * -.55s)}
.tf-deco i img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(0,0,0,.4))}
.tf-deco i:nth-child(1){right:62%;top:10%}.tf-deco i:nth-child(2){right:32%;top:2%}.tf-deco i:nth-child(3){right:4%;top:24%}.tf-deco i:nth-child(4){right:44%;bottom:4%}.tf-deco i:nth-child(5){right:14%;bottom:0}
@keyframes tfSway{50%{transform:translateY(-4px) rotate(7deg)}}

/* дві валюти: сніжинки й іграшки */
.tf-wal{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.tf-cur{position:relative;display:flex;align-items:center;gap:8px;padding:9px 9px 9px 8px;border-radius:18px;text-align:left;overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 4px 10px rgba(0,0,0,.3)}
.tf-cur.fl{background:linear-gradient(150deg,rgba(110,200,255,.55),rgba(20,70,170,.85));border:1.5px solid rgba(200,238,255,.8)}
.tf-cur.ty{background:linear-gradient(150deg,rgba(255,190,110,.5),rgba(150,30,60,.85));border:1.5px solid rgba(255,220,150,.8)}
.tf-cur::after{content:"";position:absolute;right:-18px;top:-18px;width:64px;height:64px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.25),rgba(255,255,255,0) 70%)}
.tf-cur>i{flex:none;width:48px;height:48px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 50% 38%,rgba(255,255,255,.45),rgba(255,255,255,.08) 70%);box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.4)}
.tf-cur>i img{width:40px;height:40px;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.tf-cur.fl>i img{animation:tfSpin 9s linear infinite}
.tf-cur>div{display:flex;flex-direction:column;min-width:0}
.tf-cur b{font:400 22px/1 var(--display);color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.3)}
.tf-cur span{margin-top:1px;font:400 12.5px/1.1 var(--display);color:#fff3cf}
.tf-cur.fl span{color:#d9f2ff}
.tf-cur small{margin-top:2px;font-size:9.5px;font-weight:800;line-height:1.2;color:rgba(255,255,255,.75)}

/* гра: статистика і кнопка / відлік */
.tf-play{display:flex;flex-direction:column;gap:8px}
.tf-st{display:flex;justify-content:center;gap:6px}
.tf-st span{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:11px;background:rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.12)}
.tf-st small{font-size:10px;font-weight:900;color:#a9c8f0;text-transform:uppercase;letter-spacing:.3px}
.tf-st b{font:400 14px/1 var(--display);color:#ffd45a}
.tf-go{position:relative;width:100%;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px;padding:13px;border-radius:20px;border:2px solid #fff3c4;background:linear-gradient(180deg,#ffe27a 0%,#ffb321 50%,#e07b0a 100%);box-shadow:0 5px 0 #8a4300,0 0 20px rgba(255,190,70,.5),inset 0 2px 0 rgba(255,255,255,.6);color:#5a2a00;cursor:pointer}
.tf-go::before{content:"";position:absolute;z-index:2;left:4px;right:4px;top:-13px;height:30px;background:url(images/snow/cap2.webp?v=1) 0 0/100% 100% no-repeat;pointer-events:none}
.tf-go b{position:relative;font:400 23px/1 var(--display);color:#fff;text-shadow:0 2px 0 #8a4300}
.tf-go small{position:relative;padding:3px 9px;border-radius:9px;background:rgba(0,0,0,.2);font:400 13px/1 var(--display);color:#fff}
.tf-go:active{transform:translateY(3px);box-shadow:0 2px 0 #8a4300}
.tf-go:disabled{filter:saturate(.6);opacity:.8}
.tf-gosh{position:absolute;inset:0;border-radius:18px;overflow:hidden;pointer-events:none}
.tf-gosh::after{content:"";position:absolute;top:0;bottom:0;width:40%;left:-50%;background:linear-gradient(100deg,transparent,rgba(255,255,255,.5),transparent);animation:tfShine 2.6s ease-in-out infinite}
@keyframes tfShine{60%,100%{transform:translateX(425%)}}
.tf-cd{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px 12px;border-radius:20px;background:linear-gradient(180deg,rgba(40,80,170,.85),rgba(10,26,80,.92));border:1.5px solid rgba(170,220,255,.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 4px 10px rgba(0,0,0,.3)}
.tf-cdr{position:relative;flex:none;width:60px;height:60px;filter:drop-shadow(0 3px 4px rgba(0,0,0,.45))}
.tf-cdr svg{position:absolute;inset:0;width:100%;height:100%}
.tf-cdr .o1{fill:#071640;stroke:#ffd45a;stroke-width:1.6}
.tf-cdr .o2{fill:none;stroke:rgba(255,255,255,.18);stroke-width:.8}
.tf-cdr .tk line{stroke:#8fd3ff;stroke-width:1.4;stroke-linecap:round;opacity:.8}
.tf-cdr .tr{fill:none;stroke:#16336f;stroke-width:6.5}
.tf-cdr .ar0{fill:none;stroke:#5a2a00;stroke-width:8.6;stroke-linecap:round}
.tf-cdr .ar{fill:none;stroke:url(#tfRg);stroke-width:5.6;stroke-linecap:round}
.tf-cdr .dt{fill:#fffbe0;stroke:#ff9a1c;stroke-width:1.2;filter:drop-shadow(0 0 3px #ffd45a)}
.tf-cdr .in{fill:#0f2d78;stroke:#8fd3ff;stroke-width:1.4}
.tf-cdr img{position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;object-fit:contain;animation:tfHg 3s ease-in-out infinite}
@keyframes tfHg{0%,70%{transform:rotate(0)}85%,100%{transform:rotate(180deg)}}
.tf-cd div:last-child{display:flex;flex-direction:column;align-items:flex-start}
.tf-cd small{font-size:11px;font-weight:900;color:#a9c8f0}
.tf-cd b{font:400 26px/1.05 var(--display);color:#fff;text-shadow:0 2px 0 #0b2a7a}

.tf-h3{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:4px;font:400 16px/1 var(--display);color:#fff;text-shadow:0 2px 0 #0b2a7a}
.tf-h3::before,.tf-h3::after{content:"";flex:1;max-width:70px;height:2px;border-radius:2px;background:linear-gradient(90deg,transparent,rgba(255,214,140,.85))}
.tf-h3::after{background:linear-gradient(90deg,rgba(255,214,140,.85),transparent)}

/* нагороди за час — медалі 1-2-3 */
.tf-tiers{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:14px}
.tf-tier{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:24px 4px 8px;border-radius:17px;border:1.5px solid rgba(255,255,255,.25);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 4px 10px rgba(0,0,0,.3)}
.tf-tier.t1{background:linear-gradient(180deg,rgba(255,210,90,.42),rgba(120,70,10,.6));border-color:rgba(255,220,120,.85)}
.tf-tier.t2{background:linear-gradient(180deg,rgba(220,232,255,.36),rgba(60,80,120,.6));border-color:rgba(220,232,255,.75)}
.tf-tier.t3{background:linear-gradient(180deg,rgba(230,150,90,.36),rgba(90,45,20,.6));border-color:rgba(240,170,110,.65)}
.tf-med{position:absolute;top:-22px;left:50%;width:42px;height:42px;margin-left:-21px;object-fit:contain;filter:drop-shadow(0 3px 3px rgba(0,0,0,.4))}
.tf-tt{padding:2px 8px;border-radius:8px;background:rgba(0,0,0,.3);font-size:10.5px;font-weight:900;color:#fff}
.tf-tier>b{font:400 30px/1 var(--display);color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.35)}
.tf-tier.t1>b{color:#ffe16a}
.tf-tr{display:flex;align-items:center;gap:3px}
.tf-tr img{width:24px;height:24px;object-fit:contain}
.tf-tr em{font-style:normal;font:400 13px/1 var(--display);color:rgba(255,255,255,.7)}
.tf-note{display:flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:11px;font-weight:800;color:#cfe2ff}
.tf-note img{width:18px;height:18px;object-fit:contain}

.tf-rules{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.tf-rules div{display:flex;flex-direction:column;align-items:center;gap:3px;padding:9px 6px;border-radius:16px;background:linear-gradient(180deg,rgba(90,160,255,.22),rgba(12,30,90,.6));border:1.5px solid rgba(170,220,255,.3)}
.tf-rules img,.tf-rules i{width:32px;height:32px;object-fit:contain}
.tf-rules i{display:grid;place-items:center;border-radius:10px;background:linear-gradient(160deg,#5fc4ff,#1747b0);border:2px solid #e6f6ff;box-shadow:0 2px 0 #0c2d78;font:400 13px/1 var(--display);font-style:normal;color:#fff}
.tf-rules b{font:400 14px/1.1 var(--display);color:#ffe7a0}
.tf-rules span{font-size:10.5px;font-weight:800;line-height:1.25;color:#cfe2ff}

/* ── гра: окремий екран поверх локації ── */
#tf-game{display:none;position:absolute;inset:0;z-index:30;flex-direction:column;background:radial-gradient(circle at 50% 0%,rgba(255,200,120,.22),rgba(255,200,120,0) 50%),url(images/winter/bg_snow.webp?v=1) center/cover,#0a1c50;color:#fff;font-family:var(--body);user-select:none;-webkit-user-select:none}
#tf-game.on{display:flex;animation:tfIn .25s ease-out}
@keyframes tfIn{from{opacity:0}}
body.tf-on #wt-screen{visibility:hidden}
.tfg-top{flex:none;display:flex;align-items:center;gap:8px;padding:calc(8px + max(env(safe-area-inset-top,0px),var(--app-sat,0px))) 14px 6px}
.tfg-x{flex:none;width:36px;height:36px;border-radius:50%;border:2px solid #fff;background:linear-gradient(#ff7a88,#e0344c);box-shadow:0 3px #8a1526;color:#fff;font:900 16px/1 var(--body);cursor:pointer}
.tfg-x:active{transform:translateY(2px);box-shadow:0 1px #8a1526}
/* таймер — ліворуч */
.tfg-time{flex:none;display:flex;align-items:center;gap:6px;padding:4px 10px 4px 5px;border-radius:14px;background:rgba(0,0,0,.35);border:1.5px solid rgba(170,220,255,.45)}
.tfg-time img{width:26px;height:26px}
.tfg-time b{font:400 21px/1 var(--display);min-width:50px;text-align:left;text-shadow:0 2px 0 #0b2a7a;font-variant-numeric:tabular-nums}
.tfg-tier{font-style:normal;padding:3px 7px;border-radius:9px;font:400 12.5px/1 var(--display);background:rgba(0,0,0,.35)}
.tfg-tier.k1{color:#ffe16a;box-shadow:0 0 0 1.5px rgba(255,225,106,.75)}
.tfg-tier.k2{color:#e5eeff;box-shadow:0 0 0 1.5px rgba(229,238,255,.65)}
.tfg-tier.k3{color:#f0b07a;box-shadow:0 0 0 1.5px rgba(240,176,122,.65)}
.tfg-tier.chg{animation:tfChg .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes tfChg{40%{transform:scale(1.35)}}
/* спроби і пари */
.tfg-stat{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;padding:3px 10px;border-radius:13px;background:rgba(0,0,0,.35);border:1.5px solid rgba(170,220,255,.4)}
.tfg-stat small{font-size:9.5px;font-weight:900;line-height:1.1;color:#a9c8f0;text-transform:uppercase;letter-spacing:.3px}
.tfg-stat b{font:400 19px/1 var(--display);color:#fff;font-variant-numeric:tabular-nums}
.tfg-flips{flex:1}
.tfg-pairs{flex:1;border-color:rgba(255,214,140,.55)}
.tfg-pairs span{display:flex;align-items:baseline;gap:3px}
.tfg-pairs b{color:#ffd45a;text-shadow:0 2px 0 #6a3d00}
.tfg-pairs i{font-style:normal;font:400 13px/1 var(--display);color:rgba(255,255,255,.7)}
.tfg-bar{position:relative;flex:none;height:7px;margin:0 16px 10px;border-radius:5px;background:rgba(0,0,0,.45);overflow:hidden;box-shadow:inset 0 1px 2px rgba(0,0,0,.5)}
.tfg-bar i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#7fe3ff,#2a8bff 60%,#ffd45a);transform-origin:0 50%;transform:scaleX(0);transition:transform .35s cubic-bezier(.3,.8,.4,1);box-shadow:0 0 8px rgba(120,210,255,.7)}
/* відступи від країв екрана */
.tfg-wrap{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:4px 16px 8px}
.tfg-desc{flex:none;display:flex;align-items:center;gap:10px;margin:0 16px calc(12px + max(env(safe-area-inset-bottom,0px),var(--app-sab,0px)));padding:9px 12px 9px 8px;border-radius:18px;background:radial-gradient(circle at 12% 50%,rgba(120,190,255,.25),rgba(120,190,255,0) 40%),linear-gradient(160deg,#1d4aa8 0%,#0f2b70 55%,#08184a 100%);border:2px solid #8fd3ff;box-shadow:0 4px 0 #061846,inset 0 1px 0 rgba(255,255,255,.2),0 0 14px rgba(90,170,255,.25);text-align:left}
.tfg-desc img{flex:none;width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45))}
.tfg-desc span{font:400 12.5px/1.3 var(--display);color:#e6f4ff;text-shadow:0 1px 0 rgba(0,0,0,.35)}
.tfg-board{display:grid;grid-template-columns:repeat(5,var(--ts,60px));grid-auto-rows:var(--ts,60px);gap:var(--tg,6px);padding:10px;border-radius:22px;background:linear-gradient(180deg,rgba(20,50,120,.55),rgba(6,18,60,.65));border:1.5px solid rgba(150,210,255,.3);box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 10px 24px rgba(0,0,0,.35)}
.tfg-t{position:relative;padding:0;border:0;background:none;perspective:600px;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.tfg-board.dl .tfg-t{animation:tfDeal .3s cubic-bezier(.3,1.4,.5,1) backwards;animation-delay:var(--d)}
@keyframes tfDeal{from{transform:scale(.4) rotate(-8deg);opacity:0}}
.tfg-in{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .3s cubic-bezier(.3,1.3,.5,1);will-change:transform}
.tfg-t.open .tfg-in{transform:rotateY(180deg)}
.tfg-t.open:not(.ok){animation:tfLift .3s ease-out}
@keyframes tfLift{45%{transform:scale(1.08) translateY(-2px)}}
.tfg-b,.tfg-f{position:absolute;inset:0;border-radius:20%;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden}
/* сорочка: синя крижана плитка з контуром, внутрішньою рамкою й сніжинкою */
.tfg-b{background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.3),rgba(255,255,255,0) 55%),linear-gradient(160deg,#5fc4ff 0%,#2b7ce6 45%,#1747b0 100%);border:2px solid #e6f6ff;box-shadow:0 3px 0 #0c2d78,inset 0 0 0 2px rgba(10,40,120,.3)}
.tfg-b::before{content:"";position:absolute;inset:9%;border-radius:16%;border:1.5px solid rgba(220,242,255,.55)}
.tfg-b::after{content:"";position:absolute;left:50%;top:50%;width:50%;height:50%;margin:-25% 0 0 -25%;background:url(images/snow/i_flake.webp?v=2) center/contain no-repeat;opacity:.95}
/* лице: темно-синя плитка з блакитним контуром */
.tfg-f{transform:rotateY(180deg);display:grid;place-items:center;background:radial-gradient(circle at 50% 36%,#3466cc 0%,#1a3f94 55%,#0c2460 100%);border:2px solid #8fd3ff;box-shadow:0 3px 0 #061846,inset 0 0 0 2px rgba(255,255,255,.1)}
.tfg-f img{position:relative;z-index:1;width:80%;height:80%;object-fit:contain}
.tfg-f::after{content:"";position:absolute;top:-20%;bottom:-20%;left:0;width:45%;transform:translateX(-160%) skewX(-18deg);background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.45),rgba(255,255,255,0));z-index:2}
.tfg-t.open .tfg-f::after{animation:tfGleam .55s ease-out .18s}
@keyframes tfGleam{to{transform:translateX(330%) skewX(-18deg)}}
/* пара знайдена: золотий контур, сяйво й іскри */
.tfg-t.ok .tfg-f{background:radial-gradient(circle at 50% 36%,#4a7fe0 0%,#1f4aa6 55%,#0f2a6e 100%);border-color:#ffd45a;box-shadow:0 3px 0 #7a4a00,inset 0 0 0 2px rgba(255,230,150,.35),0 0 10px rgba(255,200,80,.55)}
.tfg-t.hit{animation:tfHit .42s cubic-bezier(.3,1.6,.5,1)}
@keyframes tfHit{35%{transform:scale(1.15)}}
.tfg-t::before{content:"";position:absolute;inset:-30%;z-index:3;pointer-events:none;background:url(images/snow/fx_sparks.webp?v=2) center/contain no-repeat;opacity:0;transform:scale(.3)}
.tfg-t.hit::before{animation:tfSpark .5s ease-out}
@keyframes tfSpark{0%{opacity:1;transform:scale(.3) rotate(0)}100%{opacity:0;transform:scale(1.15) rotate(25deg)}}
.tfg-t::after{content:"";position:absolute;inset:-6%;z-index:2;pointer-events:none;border-radius:24%;box-shadow:0 0 0 3px rgba(255,214,90,.95),0 0 14px rgba(255,200,70,.9);opacity:0}
.tfg-t.hit::after{animation:tfRing .45s ease-out}
@keyframes tfRing{0%{opacity:1;transform:scale(.9)}100%{opacity:0;transform:scale(1.25)}}
/* не пара: червоний контур і струс */
.tfg-t.bad .tfg-f{border-color:#ff5a6e;box-shadow:0 3px 0 #5a0c18,0 0 10px rgba(255,80,100,.6)}
.tfg-t.bad{animation:tfBad .28s}
@keyframes tfBad{20%{transform:translateX(-3px) rotate(-2deg)}60%{transform:translateX(3px) rotate(2deg)}}
/* усі пари: золота хвиля по полю */
.tfg-board.win .tfg-t{animation:tfWin .5s ease-out backwards;animation-delay:var(--d)}
@keyframes tfWin{40%{transform:scale(1.12) translateY(-4px)}}
/* комбо */
.tfg-combo{position:absolute;left:50%;top:38%;z-index:4;pointer-events:none;font:400 30px/1 var(--display);color:#ffe16a;text-shadow:0 3px 0 #8a4300,0 0 14px rgba(255,200,80,.8);opacity:0;transform:translate(-50%,-50%)}
.tfg-combo.on{animation:tfCombo .9s ease-out}
@keyframes tfCombo{0%{opacity:0;transform:translate(-50%,-50%) scale(.4)}20%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}70%{opacity:1;transform:translate(-50%,-80%) scale(1)}100%{opacity:0;transform:translate(-50%,-110%) scale(.95)}}
.tfg-t:disabled{cursor:default}
#app.q-low .tfg-t.open .tfg-f::after,#app.q-low .tfg-t.hit::before,#app.q-low .tfg-board.win .tfg-t{animation:none}

/* підсумок */
.tfg-ov{position:absolute;inset:0;z-index:5;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(4,12,40,.55)}
.tfg-ov.on{display:flex}
.tfg-res{width:min(100%,340px);display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px;border-radius:24px;background:linear-gradient(180deg,rgba(60,130,240,.95),rgba(12,32,100,.96));border:2px solid rgba(210,240,255,.9);box-shadow:0 0 24px rgba(120,200,255,.45),0 12px 24px rgba(0,0,0,.5);animation:tfRes .4s cubic-bezier(.3,1.4,.5,1)}
@keyframes tfRes{from{transform:scale(.85);opacity:0}}
.tfg-rgl img{width:84px;height:84px;object-fit:contain;animation:tfBob 2.4s ease-in-out infinite}
.tfg-rt{font:400 22px/1.1 var(--display);text-shadow:0 2px 0 #0b2a7a}
.tfg-rtime{display:flex;align-items:center;gap:6px;padding:4px 12px;border-radius:12px;background:rgba(0,0,0,.3)}
.tfg-rtime img{width:22px;height:22px}
.tfg-rtime b{font:400 20px/1 var(--display)}
.tfg-rtime.k1 b{color:#ffe16a}.tfg-rtime.k2 b{color:#e5eeff}.tfg-rtime.k3 b{color:#f0b07a}
.tfg-rw{display:flex;gap:8px}
.tfg-rw span{display:flex;align-items:center;gap:4px;padding:6px 10px;border-radius:13px;background:rgba(0,0,0,.3)}
.tfg-rw img{width:28px;height:28px;object-fit:contain}
.tfg-rw b{font:400 20px/1 var(--display);color:#8ff07a}
.tfg-rw small{font-size:10.5px;font-weight:900;color:#dfeaff;max-width:70px;line-height:1.1;text-align:left}
.tfg-rpics{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;width:100%}
.tfg-rpics i{aspect-ratio:1;border-radius:10px;background:rgba(255,255,255,.12);display:grid;place-items:center;animation:tfDeal .35s ease-out backwards;animation-delay:calc(var(--k) * .05s + .2s)}
.tfg-rpics img{width:84%;height:84%;object-fit:contain}
.tfg-ok{margin-top:4px;width:100%;padding:12px;border-radius:15px;border:2px solid #fff3c4;background:linear-gradient(180deg,#ffe27a,#ffb321 50%,#e07b0a);box-shadow:0 4px 0 #8a4300;color:#fff;font:400 18px/1 var(--display);text-shadow:0 2px 0 #8a4300;cursor:pointer}
#app.q-low .tf-deco i,#app.q-low .tf-gosh::after,#app.q-low .tf-glob img,#app.q-low .tf-glob::before,#app.q-low .tf-cur.fl>i img{animation:none}

/* підказка: сіра кнопка, темно-синя заливка піднімається під час перезарядки; поруч — скільки використано */
.tfg-hrow{flex:none;display:flex;gap:8px;margin:0 16px 8px}
.tfg-hint{position:relative;flex:1.3;height:44px;padding:0;border-radius:15px;border:2px solid #b9c4d8;background:linear-gradient(180deg,#8d97ad,#5d6680);box-shadow:0 3px 0 #3a4158;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tfg-hf{position:absolute;inset:0;background:linear-gradient(180deg,#3466cc 0%,#1a3f94 55%,#0c2460 100%);transform:translateX(-100%);transition:transform .25s linear;will-change:transform}
.tfg-hc{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;gap:6px;height:100%}
.tfg-hc img{width:28px;height:28px;object-fit:contain;filter:grayscale(.7) brightness(.85);transition:filter .3s}
.tfg-hc b{font:400 16px/1 var(--display);color:#e8edf7;text-shadow:0 2px 0 rgba(0,0,0,.35)}
.tfg-hc em{font-style:normal;padding:2px 6px;border-radius:8px;background:rgba(0,0,0,.3);font:400 12px/1 var(--display);color:#fff;font-variant-numeric:tabular-nums}
.tfg-hc em:empty{display:none}
.tfg-hint.ready{border-color:#8fd3ff;box-shadow:0 3px 0 #061846,0 0 14px rgba(110,190,255,.45)}
.tfg-hint.ready::before{content:"";position:absolute;inset:0;z-index:1;border-radius:13px;box-shadow:inset 0 0 16px rgba(170,225,255,.9);pointer-events:none;animation:tfHintRdy 2.2s ease-in-out infinite}
.tfg-hint.ready .tfg-hc img{filter:none;animation:tfSway 2.2s ease-in-out infinite}
.tfg-hint.ready .tfg-hc b{color:#fff}
@keyframes tfHintRdy{50%{opacity:.2}}
.tfg-hint:active{transform:translateY(2px);box-shadow:0 1px 0 #061846}
.tfg-hint.nope{animation:tfBad .3s}
.tfg-hused{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:15px;background:linear-gradient(160deg,#1d4aa8,#0c2460);border:2px solid rgba(143,211,255,.6);box-shadow:0 3px 0 #061846}
.tfg-hused small{font:400 10.5px/1.1 var(--display);color:#a9d4ff}
.tfg-hused b{font:400 19px/1.1 var(--display);color:#fff}
/* плитки з підказки: «дихають» і світяться, доки пару не знайдено */
.tfg-t.hint:not(.open) .tfg-b{border-color:#ffd45a;box-shadow:0 3px 0 #7a4a00,inset 0 0 12px rgba(255,230,140,.6);background:radial-gradient(circle at 50% 30%,rgba(255,255,255,.4),rgba(255,255,255,0) 55%),linear-gradient(160deg,#7fd8ff 0%,#3b8cf0 45%,#1f55c4 100%)}
.tfg-t.hint:not(.open){animation:tfBreath 1.3s ease-in-out infinite}
.tfg-t.hint:not(.open)::after{animation:tfHGlow 1.3s ease-in-out infinite}
@keyframes tfBreath{50%{transform:scale(1.07)}}
@keyframes tfHGlow{0%,100%{opacity:.5;transform:scale(1)}50%{opacity:1;transform:scale(1.03)}}
.tfg-t.open{pointer-events:none}
#app.q-low .tfg-hint.ready::before,#app.q-low .tfg-hint.ready .tfg-hc img{animation:none}

/* 3.2.24: пульсація — лише прозорість (дешево для відеокарти) */
.tfg-t.hint:not(.open)::after{box-shadow:0 0 0 4px rgba(255,236,140,1),0 0 24px rgba(255,210,90,1)}
.tfg-t,.tfg-hint{touch-action:manipulation}

.tf-gosh::after{will-change:transform}

.tf-tfl{display:flex;align-items:center;justify-content:center;gap:2px;font:800 11px/1 var(--body);color:#cfeeff;margin-top:2px}.tf-tfl img{width:14px;height:14px;object-fit:contain}
