/* ==========================================================================
   Maszyna losująca — widget "chybił trafił".
   Używany przez go1140.php (/chybil-trafil/) i go510.php (/typowania/<gra>/zatypuj.htm)
   przez include gen-maszyna.php. Ładowany z CDN, wiec po deployu SPRAWDZIC,
   czy plik doszedl na multipasko.ovh (brakujacy plik = HTTP 200 z placeholderem SVG).
   ========================================================================== */
.mlos{
  --stage-w: 700px;
  --kula: 40px;              /* średnica kuli w bębnie (JS przelicza wg puli) */
  --wyn-kula: 46px;          /* średnica kuli w wyniku */
  position:relative;
  border-radius:12px;
  padding:14px 14px 10px;
  background:
    radial-gradient(circle at 50% 24%, #7cbdec 0%, #4e9bd7 40%, #2d73b1 78%, #1d5488 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 6px 18px rgba(0,0,0,.35);
  color:#fff;
  font-size:16px;
  overflow:hidden;
}

/* --- pasek sterowania ----------------------------------------------------- */
/* Sterowanie na ciemniejszej podkładce. Biały tekst wprost na błękitnym tle
   widgetu dawał kontrast 2,05:1 (wymagane 4,5:1) — na tej podkładce jest 5,8:1. */
.mlos-panel{
  text-align:center;
  background: rgba(6,34,62,.55);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 12px 10px 14px;
}
.mlos-presety{ display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-bottom:10px; }
.mlos-presety button{
  font-weight:700; font-size:13px; line-height:1; font-family:inherit; padding:7px 12px; border-radius:20px; cursor:pointer;
  border:1px solid rgba(255,214,74,.6); background:rgba(2,20,40,.5); color:#ffd54a;
}
.mlos-presety button:hover{ background:rgba(2,20,40,.8); border-color:#ffd54a; }
.mlos-presety button.on{ background:#ffd54a; border-color:#ffd54a; color:#20344a; }

.mlos-ile{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center;
  font-size:17px; font-weight:600; text-shadow:0 1px 2px rgba(0,18,40,.5); }
.mlos-ile input[type=number]{
  width:64px; padding:6px 4px; font-weight:700; font-size:17px; line-height:1; font-family:inherit; text-align:center;
  border-radius:7px; border:1px solid rgba(255,255,255,.5); background:#fff; color:#123;
}
.mlos-ile select{
  padding:6px 6px; font-weight:600; font-size:15px; line-height:1; font-family:inherit; border-radius:7px;
  border:1px solid rgba(255,255,255,.5); background:#fff; color:#123;
}


.mlos-suwak{
  display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:center;
  margin-top:10px; font-size:17px; font-weight:600; text-shadow:0 1px 2px rgba(0,18,40,.5);
}
.mlos-suwak input[type=range]{ width:230px; accent-color:#ffd54a; cursor:pointer; }
.mlos-suwak input[type=number]{
  width:64px; padding:6px 4px; font-weight:800; font-size:18px; line-height:1; font-family:inherit; text-align:center;
  border-radius:7px; border:1px solid rgba(255,255,255,.5); background:#ffd54a; color:#20344a;
}

.mlos-akcje{ margin-top:10px; display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.mlos-akcje button{
  padding:10px 22px; font-weight:800; font-size:16px; line-height:1; font-family:inherit; border-radius:8px; cursor:pointer; border:none; color:#1b2a38;
  background:linear-gradient(180deg,#ffe07a,#f3b91c);
  box-shadow:0 4px 0 #b9860a, 0 6px 14px rgba(0,20,50,.3);
}
.mlos-akcje button:active{ transform:translateY(3px); box-shadow:0 1px 0 #b9860a; }
.mlos-akcje button.szary{ background:linear-gradient(180deg,#e3ebf1,#aebbc6); box-shadow:0 4px 0 #7b8894, 0 6px 14px rgba(0,20,50,.3); }
.mlos-akcje button[disabled]{ opacity:.45; cursor:default; }
.mlos-akcje button.ikona{ padding:10px 16px; }
.mlos-akcje button.ikona.cicho{ opacity:.72; }
/* głośnik rysowany w CSS — czytelny w każdej skali, bez zależności od fontu */
.mlos-glosnik{ position:relative; display:inline-block; width:23px; height:16px; margin-right:7px; vertical-align:-3px; }
.mlos-glosnik::before{ content:""; position:absolute; left:0; top:0; width:13px; height:16px; background:currentColor;
  clip-path: polygon(0 30%, 38% 30%, 100% 0, 100% 100%, 38% 70%, 0 70%); }
.mlos-glosnik::after{ content:""; position:absolute; left:15px; top:3px; width:5px; height:10px;
  border:2px solid currentColor; border-left:none; border-radius:0 8px 8px 0; }
.ikona.cicho .mlos-glosnik::after{ border:none; border-radius:0; left:6px; top:-2px; width:2px; height:20px;
  background:currentColor; transform:rotate(34deg); }
.mlos-blad{ min-height:20px; margin-top:7px; font-size:14px; font-weight:700; color:#ffe07a; }

/* --- scena ---------------------------------------------------------------- */
.mlos-scena-box{ position:relative; margin:24px auto 0; }
.mlos-scena{
  position:absolute; left:0; top:0;
  width:var(--stage-w);
  transform-origin: top left;
  transform: scale(var(--skala,1));
}

/* konstrukcja */
.mlos-podloga{ position:absolute; left:60px; width:420px; height:60px; border-radius:50%;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); filter:blur(2px); }
.mlos-slup{ position:absolute; width:12px; border-radius:3px;
  background:linear-gradient(90deg,#96a3ad,#eef3f7 35%,#b6c1c9 60%,#7f8b96); }
.mlos-noga{ position:absolute; width:8px; height:104px; border-radius:4px;
  background:linear-gradient(90deg,#8b96a1,#e7eef3 40%,#9aa5b0); }

.mlos-postument{
  position:absolute; border-radius:12px/8px;
  background:linear-gradient(90deg,#b87a05,#f6b524 22%,#ffd76a 42%,#f0a614 64%,#a96d04);
  box-shadow:0 14px 26px rgba(10,40,80,.35), inset 0 -12px 22px rgba(120,70,0,.35);
}
.mlos-postument::before{ content:""; position:absolute; left:0; right:0; top:-11px; height:22px; border-radius:50%;
  background:linear-gradient(90deg,#c58305,#ffd469 40%,#f7bb31 60%,#b3730a); box-shadow:inset 0 3px 6px rgba(255,255,255,.5); }
.mlos-postument::after{ content:""; position:absolute; left:0; right:0; bottom:-9px; height:18px; border-radius:50%;
  background:linear-gradient(90deg,#8d5a03,#c78708 45%,#8d5a03); }

/* szklana kula */
.mlos-szklo{
  position:absolute; border-radius:50%;
  background: radial-gradient(circle at 50% 50%, rgba(205,232,255,.16), rgba(120,180,230,.30));
  border:2px solid rgba(255,255,255,.55);
  box-shadow: inset 0 0 60px rgba(255,255,255,.28), inset -20px -24px 60px rgba(20,60,100,.28), 0 20px 44px rgba(10,40,80,.32);
}
.mlos-wnetrze{ position:absolute; inset:0; border-radius:50%; overflow:hidden; pointer-events:none; }
.mlos-led{ position:absolute; height:13px; border-radius:7px; background:linear-gradient(180deg,#fff,#dceeff);
  box-shadow:0 0 14px rgba(255,255,255,.9), 0 0 30px rgba(180,225,255,.75); }
.mlos-polysk{
  position:absolute; inset:0; border-radius:50%; pointer-events:none;
  background:
    radial-gradient(circle at 30% 18%, rgba(255,255,255,.58), rgba(255,255,255,0) 30%),
    radial-gradient(circle at 76% 80%, rgba(255,255,255,.24), rgba(255,255,255,0) 26%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 62%, rgba(140,195,240,.28) 100%);
}
.mlos-obrecz{
  position:absolute; height:15px; border-radius:8px;
  background:linear-gradient(180deg,#f4f8fb,#c3ccd4 38%,#7d8894 62%,#e4ebf1);
  box-shadow:0 4px 9px rgba(10,40,80,.3);
}

/* port ssący */
.mlos-port{ position:absolute; border-radius:8px 8px 13px 13px;
  background:linear-gradient(180deg,#eef4f8,#9aa6b1); box-shadow:0 4px 9px rgba(10,40,80,.3); }
.mlos-port i{ position:absolute; left:50%; top:10px; width:10px; height:10px; margin-left:-5px; border-radius:50%; background:#3d4b57; }
.mlos.ssie .mlos-port i{ background:#ff4b3e; box-shadow:0 0 10px #ff4b3e, 0 0 22px rgba(255,75,62,.8); animation:mlos-miga .45s steps(2) infinite; }
@keyframes mlos-miga{ 50%{ opacity:.35; } }

/* --- kule w bębnie -------------------------------------------------------- */
.mlos-beben{ position:absolute; width:0; height:0; }

.mlos-k{ position:absolute; left:0; top:0; width:0; height:0;
  animation: mlos-orbita var(--o) linear infinite var(--od) var(--dir); }
@keyframes mlos-orbita{ from{ transform: rotate(var(--a0)); } to{ transform: rotate(calc(var(--a0) + 360deg)); } }

.mlos-k > .mlos-r{ position:absolute; left:0; top:0; width:0; height:0;
  animation: mlos-promien var(--rd) ease-in-out infinite alternate var(--rdel); }
@keyframes mlos-promien{ from{ translate: var(--r1) 0; } to{ translate: var(--r2) 0; } }

/* kula: podskok (translate) + koziołek (rotate) — dwie NIEZALEŻNE właściwości */
.mlos-k .mlos-b{
  left: calc(var(--kula) / -2); top: calc(var(--kula) / -2);
  width:var(--kula); height:var(--kula);
  animation:
    mlos-podskok var(--sd) ease-in-out infinite alternate var(--sdel),
    mlos-koziolek var(--t) linear infinite;
}
@keyframes mlos-podskok{ from{ translate: 0 calc(var(--sy) * -1); } to{ translate: 0 var(--sy); } }
@keyframes mlos-koziolek{ from{ rotate: 0deg; } to{ rotate: -360deg; } }

/* wygląd kuli */
.mlos-b{
  position:absolute; border-radius:50%;
  background: radial-gradient(circle at 33% 27%, #fff6b0 0%, #f7d53a 42%, #d9a507 100%);
  box-shadow: inset -3px -5px 9px rgba(150,95,0,.45), inset 3px 4px 7px rgba(255,255,255,.75), 0 2px 5px rgba(10,40,80,.35);
  display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:calc(var(--kula) * .44); color:#241a00;
  text-shadow:0 1px 0 rgba(255,255,255,.35); letter-spacing:-.5px; user-select:none;
}
/* druga pula (Eurojackpot / Ekstra Pensja) — kule srebrne */
.mlos-b.extra{ background: radial-gradient(circle at 33% 27%, #ffffff 0%, #cfe0ee 42%, #7f96ab 100%); color:#12212e; }

.mlos.turbo .mlos-k{ animation-duration: calc(var(--o) * .38); }
.mlos.turbo .mlos-k > .mlos-r{ animation-duration: calc(var(--rd) * .55); }
.mlos.turbo .mlos-k .mlos-b{ animation-duration: calc(var(--sd) * .5), calc(var(--t) * .45); filter: blur(.4px); }

.mlos-k.wyjeta{ visibility:hidden; }

/* poza ekranem / w tle nie ma po co mielić 80 kul */
.mlos.pauza .mlos-k,
.mlos.pauza .mlos-k > .mlos-r,
.mlos.pauza .mlos-k .mlos-b{ animation-play-state: paused; }

/* --- maskotka Multipasko (cała z CSS, bez obrazków) ----------------------- */
/* Kąt ręki w barku. Zarejestrowany, żeby dało się go animować i płynnie
   przechodzić — dłoń jest DZIECKIEM ręki i kontruje ten sam kąt, dzięki czemu
   nigdy się nie odkleja, a kciuk zawsze sterczy pionowo. */
@property --kat{ syntax:'<angle>'; inherits:true; initial-value:0deg; }

.mlos-gostek{ position:absolute; width:170px; height:255px; }
.mlos-gostek .g-cien{
  position:absolute; left:20px; top:236px; width:130px; height:19px; border-radius:50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,25,60,.36), rgba(0,25,60,0) 70%);
}
/* delikatne kołysanie */
.mlos-gostek .g-cialo{ position:absolute; inset:0; animation: mlos-kiwa 2.6s ease-in-out infinite alternate; transform-origin:50% 100%; }
@keyframes mlos-kiwa{ from{ transform: translateY(0) rotate(-1.2deg); } to{ transform: translateY(-3px) rotate(1.2deg); } }
.mlos.turbo .mlos-gostek .g-cialo{ animation-duration:.9s; }

.mlos-gostek i, .mlos-gostek b, .mlos-gostek span{ position:absolute; display:block; }

/* nogi + buty */
.g-noga{ width:22px; height:51px; border-radius:6px 6px 3px 3px; top:180px;
  background:linear-gradient(90deg,#1c2c39,#3d5b72 42%,#233543 78%,#18242e); }
.g-noga.l{ left:53px; } .g-noga.p{ left:90px; }
.g-but{ width:33px; height:16px; border-radius:9px 13px 5px 5px; top:224px;
  background:linear-gradient(180deg,#fdfefe 55%,#dbe3e9 56%,#aebac4); }
.g-but.l{ left:46px; } .g-but.p{ left:85px; }
.g-but::after{ content:""; position:absolute; left:1px; right:1px; bottom:0; height:4px; border-radius:0 0 5px 5px; background:#8e9ba6; }

/* ręce — obrót w barku; dłoń wisi na końcu ręki i kontruje obrót */
.g-reka{ width:15px; height:50px; top:116px; border-radius:8px;
  transform-origin:50% 7px; transform: rotate(var(--kat));
  transition: --kat .3s ease;
  background:linear-gradient(90deg,#dda80b,#ffe066 42%,#f2c81f 70%,#c99806); }
.g-reka.l{ left:34px;  --kat: 9deg; }
.g-reka.p{ left:122px; --kat: -9deg; }

.g-dlon{ left:-5px; top:39px; width:25px; height:25px; border-radius:10px 10px 9px 9px;
  transform: rotate(calc(-1 * var(--kat)));
  transition: --kat .3s ease;
  background:radial-gradient(circle at 36% 30%, #fff3b8, #f7d53a 46%, #d9a507);
  box-shadow: inset -3px -4px 6px rgba(150,95,0,.35); }
/* kciuk w górę — tylko prawa dłoń, tylko gdy ręka idzie w górę */
.g-kciuk{ left:3px; top:-15px; width:10px; height:19px; border-radius:5px; opacity:0;
  transition: opacity .25s ease;
  background:radial-gradient(circle at 40% 30%, #fff3b8, #f5d13a 55%, #d9a507);
  box-shadow: inset -1px -2px 3px rgba(150,95,0,.3); }

/* koszulka */
.g-tulow{
  left:42px; top:106px; width:85px; height:80px; border-radius:23px 23px 10px 10px;
  background:linear-gradient(180deg,#2a9c51,#17743a 55%,#0f5228);
  box-shadow: inset 0 5px 9px rgba(255,255,255,.3), inset 0 -10px 15px rgba(0,40,15,.35);
}
.g-tulow::before, .g-tulow::after{ content:""; position:absolute; top:4px; width:21px; height:30px;
  background:linear-gradient(180deg,#2a9c51,#166b36); border-radius:11px; }
.g-tulow::before{ left:-14px; transform:rotate(11deg); }
.g-tulow::after{ right:-14px; transform:rotate(-11deg); }
/* dolny ścieg koszulki */
.g-rabek{ left:44px; top:176px; width:81px; height:3px; border-radius:2px; background:rgba(0,45,18,.45); }
/* napis na klacie */
.g-napis{ left:0; right:0; top:28px; text-align:center;
  font-weight:800; font-size:10px; line-height:1; font-family:Arial,Helvetica,sans-serif;
  letter-spacing:.3px; color:#fff; text-shadow:0 1px 1px rgba(0,35,12,.7); }
/* wykończenie dekoltu */
.g-kolnierz{ left:85px; top:100px; width:36px; height:14px; margin-left:-18px; border-radius:0 0 18px 18px;
  background:linear-gradient(180deg,#f5fafd,#c9d9e4); box-shadow:0 1px 3px rgba(0,30,10,.4); }

/* głowa */
.g-glowa{
  left:36px; top:15px; width:98px; height:93px; border-radius:50%;
  background:radial-gradient(circle at 34% 26%, #fff8c4 0%, #f9db4a 40%, #eab90f 72%, #c99204 100%);
  box-shadow: inset -6px -9px 15px rgba(150,95,0,.4), inset 5px 6px 12px rgba(255,255,255,.6), 0 5px 11px rgba(10,40,80,.32);
}
/* czapka */
.g-czapka{ left:31px; top:3px; width:108px; height:39px; border-radius:54px 54px 8px 8px;
  background:linear-gradient(180deg,#33ad5c,#17743a 58%,#0f5228);
  box-shadow: inset 0 5px 8px rgba(255,255,255,.32); }
.g-czapka::before{ content:""; position:absolute; left:50%; top:-5px; width:12px; height:12px; margin-left:-6px;
  border-radius:50%; background:linear-gradient(180deg,#3cbd67,#12602f); }
.g-czapka::after{ content:""; position:absolute; left:77px; top:27px; width:59px; height:13px; border-radius:4px 13px 13px 4px;
  background:linear-gradient(180deg,#1e8745,#0b4520); transform:rotate(-4deg); }
/* szew czapki */
.g-szew{ left:84px; top:6px; width:3px; height:33px; background:rgba(255,255,255,.22); border-radius:2px; }

/* okulary — współrzędne względem głowy (98x93) */
.g-okulary{ left:8px; top:28px; width:82px; height:23px; }
.g-okulary i{ top:0; width:35px; height:23px; border-radius:9px 12px 10px 9px;
  background:linear-gradient(150deg,#454b54 0%,#0d0f12 42%,#000 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18); }
.g-okulary i:nth-of-type(1){ left:0; }
.g-okulary i:nth-of-type(2){ left:47px; }
/* błyski na szkłach */
.g-okulary i::after{ content:""; position:absolute; left:5px; top:4px; width:12px; height:5px;
  background:rgba(255,255,255,.85); border-radius:3px; transform:rotate(-22deg); }
/* mostek */
.g-okulary::after{ content:""; position:absolute; left:35px; top:7px; width:12px; height:5px; background:#15181c; border-radius:2px; }

/* uśmiech */
.g-usta{ left:50%; top:57px; width:41px; height:23px; margin-left:-20.5px; border-radius:5px 5px 22px 22px;
  background:linear-gradient(180deg,#63131b,#340810); overflow:hidden;
  box-shadow: inset 0 -4px 6px rgba(0,0,0,.5), 0 1px 3px rgba(120,70,0,.4); }
.g-usta i{ left:0; top:0; width:100%; height:6px; background:#fff; }
.g-usta b{ left:50%; bottom:-6px; width:21px; height:13px; margin-left:-10.5px; border-radius:50%; background:#b8323f; }

/* iskierki na finał */
.g-iskra{ width:19px; height:19px; opacity:0;
  background:radial-gradient(circle, #fffbe0 0%, #ffd21f 55%, rgba(255,210,31,0) 72%);
  clip-path: polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%); }
.g-iskra.a{ left:0px;   top:44px; }
.g-iskra.b{ left:148px; top:16px; }
.g-iskra.c{ left:132px; top:132px; }

/* --- reakcje ludzika ------------------------------------------------------ */
.g-glowa, .g-czapka, .g-szew, .g-usta{ transition: transform .3s ease, height .3s ease, width .3s ease; }

/* losowanie trwa: zadziera głowę na maszynę i unosi kciuk */
.mlos.turbo .g-glowa{ transform: rotate(-8deg); }
.mlos.turbo .g-czapka, .mlos.turbo .g-szew{ transform: rotate(-8deg); transform-origin:50% 90%; }
.mlos.turbo .g-reka.p{ --kat: -152deg; }
.mlos.turbo .g-kciuk{ opacity:1; }
.mlos.turbo .g-usta{ height:28px; width:44px; margin-left:-22px; }

/* moment zassania kuli: „ooo!" — usta w kółko */
.mlos.ssie .g-usta{ width:22px; height:22px; margin-left:-11px; border-radius:50%; }
.mlos.ssie .g-usta i, .mlos.ssie .g-usta b{ opacity:0; }

/* kula wpadła na półkę: podskok z pompką ręki */
.mlos-gostek.hop .g-cialo{ animation: mlos-hop .55s cubic-bezier(.3,1.5,.5,1); }
@keyframes mlos-hop{
  0%  { transform: translateY(0) rotate(0deg); }
  32% { transform: translateY(-16px) rotate(-5deg); }
  60% { transform: translateY(3px) rotate(3deg); }
  100%{ transform: translateY(0) rotate(0deg); }
}
.mlos-gostek.hop .g-reka.p{ animation: mlos-pompka .55s ease-out; }
@keyframes mlos-pompka{ 0%,100%{ --kat:-152deg; } 45%{ --kat:-168deg; } }

/* koniec losowania: „mamy to!" — obie ręce w górę, podskok i iskry */
.mlos-gostek.finisz .g-kciuk{ opacity:1; }
.mlos-gostek.finisz .g-cialo{ animation: mlos-hura 1.9s cubic-bezier(.3,1.3,.5,1); }
@keyframes mlos-hura{
  0%  { transform: translateY(0) scaleY(1); }
  9%  { transform: translateY(6px) scaleY(.93); }
  28% { transform: translateY(-26px) scaleY(1.05); }
  46% { transform: translateY(0) scaleY(.97); }
  60% { transform: translateY(-11px) scaleY(1.02); }
  76% { transform: translateY(0) scaleY(1); }
  100%{ transform: translateY(0) scaleY(1); }
}
/* obie ręce symetrycznie w górę — dłonie jadą razem z nimi */
.mlos-gostek.finisz .g-reka.l{ animation: mlos-hura-l 1.9s cubic-bezier(.3,1.4,.5,1); }
.mlos-gostek.finisz .g-reka.p{ animation: mlos-hura-p 1.9s cubic-bezier(.3,1.4,.5,1); }
@keyframes mlos-hura-l{ 0%,100%{ --kat: 9deg; }  22%,82%{ --kat: 150deg; } }
@keyframes mlos-hura-p{ 0%,100%{ --kat: -9deg; } 22%,82%{ --kat: -150deg; } }
.mlos-gostek.finisz .g-usta{ animation: mlos-krzyk 1.9s ease-out; }
@keyframes mlos-krzyk{ 0%,100%{ height:23px; } 20%,78%{ height:35px; } }
.mlos-gostek.finisz .g-iskra{ animation: mlos-iskra 1.6s ease-out; }
.mlos-gostek.finisz .g-iskra.b{ animation-delay:.2s; }
.mlos-gostek.finisz .g-iskra.c{ animation-delay:.38s; }
@keyframes mlos-iskra{
  0%,10%{ opacity:0; transform:scale(.2) rotate(0deg); }
  34%   { opacity:1; transform:scale(1.3) rotate(60deg); }
  70%   { opacity:.9; transform:scale(1) rotate(120deg); }
  100%  { opacity:0; transform:scale(.4) rotate(180deg); }
}

/* --- tor + wylot ---------------------------------------------------------- */
.mlos-tor{ position:absolute; left:0; top:0; overflow:visible; pointer-events:none; }
.mlos-wylot{ position:absolute; width:52px; height:46px; border-radius:5px 5px 20px 20px;
  background:linear-gradient(90deg,#8b98a3,#f2f7fa 28%,#ccd6dd 60%,#7d8a94);
  box-shadow:0 5px 11px rgba(10,40,80,.32), inset 0 3px 5px rgba(255,255,255,.5); }
.mlos-wylot::after{ content:""; position:absolute; left:-5px; right:-5px; bottom:-7px; height:15px;
  border-radius:50%; background:linear-gradient(90deg,#78848f,#eaf0f4 38%,#96a2ad);
  box-shadow:0 3px 6px rgba(10,40,80,.3); }

/* kula lecąca — pozycję nadaje CSS motion path */
.mlos-lot{
  position:absolute; left:0; top:0; width:var(--wyn-kula); height:var(--wyn-kula);
  offset-rotate:0deg; offset-anchor:50% 50%; offset-distance:0%;
  animation: mlos-lecimy var(--lot) cubic-bezier(.4,.03,.3,1) forwards;
  z-index:6;
}
/* kula jedzie tylko do swojego miejsca postoju w torze i tam zostaje */
@keyframes mlos-lecimy{ from{ offset-distance:0%; } to{ offset-distance: var(--stop, 100%); } }
.mlos-lot .mlos-b{
  inset:0; width:auto; height:auto; font-size:calc(var(--wyn-kula) * .44);
  animation: mlos-rosnie var(--lot) cubic-bezier(.4,.03,.3,1) forwards, mlos-koziolek .5s linear infinite;
}
/* doturlała się na miejsce — przestaje koziołkować i staje numerem do góry */
.mlos-lot.stoi .mlos-b{
  animation: mlos-rosnie var(--lot) cubic-bezier(.4,.03,.3,1) forwards,
             mlos-dojechala .45s cubic-bezier(.3,1.6,.5,1) forwards;
}
@keyframes mlos-dojechala{ 0%{ rotate:-20deg; } 60%{ rotate:7deg; } 100%{ rotate:0deg; } }
@keyframes mlos-rosnie{ from{ scale: var(--od-skali); } to{ scale: var(--do-skali, 1); } }

/* --- podsumowanie pod maszyną --------------------------------------------- */
/* półka pojawia się DOPIERO po losowaniu; ma własny, stały rozmiar kul,
   niezależny od --wyn-kula (które zmienia się wraz z liczbą kul w torze) */
.mlos-wyniki{
  --polka: 46px;
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
  min-height:var(--polka);
  width:fit-content; max-width:100%;
  margin:6px auto 0; padding:9px 14px;
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.22);
  box-shadow:inset 0 2px 5px rgba(255,255,255,.18), 0 4px 12px rgba(0,20,50,.22);
}
.mlos-wyniki:empty{ display:none; }
.mlos-wyniki .mlos-b{
  position:relative; width:var(--polka); height:var(--polka);
  font-size:calc(var(--polka) * .44);
  animation: mlos-wskok .5s cubic-bezier(.25,1.7,.45,1) both;
}
@media (max-width:520px){ .mlos-wyniki{ --polka: 38px; gap:6px; } }
@keyframes mlos-wskok{
  from{ scale:.25; opacity:0; }
  60% { scale:1.14; opacity:1; }
  to  { scale:1; opacity:1; }
}
.mlos-wyniki .mlos-b.czeka{ opacity:0; animation:none; }

/* wiersz z gotowym wynikiem — to po niego ludzie tu przychodzą, więc ma być
   największym tekstem pod maszyną; etykieta ciszej, liczby na pierwszym planie */
.mlos-podsum{ margin:16px 4px 8px; text-align:center; font-size:16px; line-height:1.6; min-height:30px; }
.mlos-podsum .etykieta{ opacity:.82; }
.mlos-podsum b{ color:#ffe07a; font-size:22px; font-weight:800; letter-spacing:.8px; }
.mlos-podsum button{
  margin-left:12px; padding:9px 20px; font-weight:800; font-size:15px; line-height:1; font-family:inherit;
  border-radius:8px; cursor:pointer; white-space:nowrap;
  border:1px solid rgba(255,255,255,.55); background:rgba(255,255,255,.2); color:#fff;
  box-shadow:0 3px 0 rgba(0,25,55,.35);
}
.mlos-podsum button:hover{ background:rgba(255,255,255,.32); }
.mlos-podsum button:active{ transform:translateY(2px); box-shadow:0 1px 0 rgba(0,25,55,.35); }
.mlos-podsum button.ok{ background:#ffd54a; border-color:#ffd54a; color:#20344a; }
@media (max-width:520px){
  .mlos-podsum{ font-size:15px; }
  .mlos-podsum b{ font-size:19px; }
}

/* ==========================================================================
   .mlos-tel — wariant dla TELEFONU (klasę dokłada PHP z $_SESSION['mobile']).
   Strona /chybil-trafil/ nie ma wersji mobilnej, wiec wychodzi z
   <meta viewport width=1220> i telefon renderuje ja w skali ~30%. Media query
   NIC tu nie da (viewport CSS zawsze = 1220px), dlatego powiekszamy z PHP.
   Podgląd bez telefonu: dopisz ?tel=1 do adresu.
   ========================================================================== */
.mlos-tel .mlos-presety{ gap:10px; margin-bottom:16px; }
.mlos-tel .mlos-presety button{ font-size:22px; padding:12px 20px; border-radius:30px; border-width:2px; }

.mlos-tel .mlos-ile,
.mlos-tel .mlos-suwak{ font-size:30px; gap:14px; }
.mlos-tel .mlos-ile input[type=number]{ width:110px; padding:10px 6px; font-size:30px; border-radius:10px; }
.mlos-tel .mlos-ile select{ font-size:26px; padding:10px 8px; border-radius:10px; }
.mlos-tel .mlos-suwak input[type=number]{ width:110px; padding:10px 6px; font-size:32px; border-radius:10px; }

/* suwak: domyślna kropka ma ~16px, na telefonie to <5px na ekranie — rysujemy własną */
/* wysokosc SAMEGO inputa robi za pole dotyku, dlatego 50px, a tor rysujemy
   w ::track — inaczej palcem trzeba trafic w 6-pikselowy pasek */
.mlos-tel .mlos-suwak input[type=range]{
  -webkit-appearance:none; appearance:none; width:320px; height:50px;
  background:transparent; border:none;
}
.mlos-tel .mlos-suwak input[type=range]::-webkit-slider-runnable-track{
  height:22px; border-radius:11px;
  background:linear-gradient(180deg,#26374a,#1a2734); border:1px solid rgba(255,255,255,.35);
}
.mlos-tel .mlos-suwak input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none; width:46px; height:46px; margin-top:-13px; border-radius:50%;
  background:linear-gradient(180deg,#ffe07a,#f3b91c); border:2px solid #b9860a; cursor:pointer;
}
.mlos-tel .mlos-suwak input[type=range]::-moz-range-track{
  height:22px; border-radius:11px;
  background:linear-gradient(180deg,#26374a,#1a2734); border:1px solid rgba(255,255,255,.35);
}
.mlos-tel .mlos-suwak input[type=range]::-moz-range-thumb{
  width:46px; height:46px; border-radius:50%;
  background:linear-gradient(180deg,#ffe07a,#f3b91c); border:2px solid #b9860a; cursor:pointer;
}

.mlos-tel .mlos-akcje{ gap:14px; margin-top:16px; }
.mlos-tel .mlos-akcje button{ font-size:26px; padding:16px 30px; border-radius:12px; }
.mlos-tel .mlos-akcje button.ikona{ padding:16px 24px; }
.mlos-tel .mlos-glosnik{ width:36px; height:25px; margin-right:11px; vertical-align:-5px; }
.mlos-tel .mlos-glosnik::before{ width:20px; height:25px; }
.mlos-tel .mlos-glosnik::after{ left:23px; top:5px; width:8px; height:15px; border-width:3px; }
.mlos-tel .ikona.cicho .mlos-glosnik::after{ left:9px; top:-3px; width:3px; height:31px; }
.mlos-tel .mlos-blad{ font-size:24px; min-height:30px; }

.mlos-tel .mlos-wyniki{ --polka:72px; gap:12px; padding:14px 18px; border-radius:22px; }
.mlos-tel .mlos-podsum{ font-size:28px; margin:22px 4px 10px; }
.mlos-tel .mlos-podsum b{ font-size:38px; letter-spacing:1.2px; }
.mlos-tel .mlos-podsum button{ font-size:26px; padding:15px 32px; border-radius:12px; margin-left:18px; }

/* --- tryb zablokowany: warianty zamiast suwaka ---------------------------- */
.mlos-warianty{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:4px; }
.mlos-warianty:empty{ display:none; }
.mlos-warianty button{
  font-weight:800; font-size:16px; line-height:1.25; font-family:inherit;
  padding:10px 18px; border-radius:10px; cursor:pointer;
  border:1px solid rgba(255,214,74,.6); background:rgba(2,20,40,.5); color:#ffd54a;
}
.mlos-warianty button em{ display:block; font-style:normal; font-weight:600; font-size:12px; opacity:.85; }
.mlos-warianty button:hover{ background:rgba(2,20,40,.8); border-color:#ffd54a; }
.mlos-warianty button.on{ background:#ffd54a; border-color:#ffd54a; color:#20344a; }

.mlos-tel .mlos-warianty{ gap:12px; }
.mlos-tel .mlos-warianty button{ font-size:26px; padding:16px 26px; border-radius:14px; border-width:2px; }
.mlos-tel .mlos-warianty button em{ font-size:19px; }

/* --- podświetlenie pól formularza, które maszyna właśnie wypełniła --------
   UWAGA: te pola są POZA widgetem (formularz typowania), więc selektor jest
   globalny i celowo ma własny prefiks, żeby nie kolidować z niczym na stronie. */
.mlos-wpisane{
  animation: mlos-wpisane 2.6s ease-out;
  position:relative; z-index:1;
}
@keyframes mlos-wpisane{
  0%   { background:#ffe07a; box-shadow:0 0 0 4px rgba(255,213,74,.9); }
  60%  { background:#fff8d8; box-shadow:0 0 0 4px rgba(255,213,74,.45); }
  100% { background:inherit; box-shadow:0 0 0 4px rgba(255,213,74,0); }
}
/* --- zachęta dla niezalogowanych ------------------------------------------ */
.mlos-zacheta{
  margin:4px auto 8px; padding:12px 18px; max-width:92%;
  text-align:center; font-size:16px; line-height:1.5;
  border-radius:12px;
  background:rgba(6,34,62,.55); border:1px solid rgba(255,214,74,.45);
  animation: mlos-wskok .45s cubic-bezier(.25,1.6,.45,1) both;
}
.mlos-zacheta a{
  display:inline-block; margin-left:8px; padding:8px 18px; border-radius:8px;
  background:linear-gradient(180deg,#ffe07a,#f3b91c); color:#1b2a38;
  font-weight:800; text-decoration:none; box-shadow:0 3px 0 #b9860a;
}
.mlos-zacheta a:hover{ background:linear-gradient(180deg,#fff0b0,#ffc93a); }
.mlos-tel .mlos-zacheta{ font-size:28px; padding:20px 24px; }
.mlos-tel .mlos-zacheta a{ font-size:26px; padding:14px 28px; margin-left:14px; }

@media (prefers-reduced-motion: reduce){ .mlos-wpisane{ animation:none; } }

@media (prefers-reduced-motion: reduce){
  .mlos-k, .mlos-k > .mlos-r, .mlos-k .mlos-b, .mlos-lot, .mlos-lot .mlos-b, .mlos-wyniki .mlos-b{ animation:none !important; }
  .mlos-lot{ offset-distance:100%; }
}
