/* BeeSpeaker Kalambury — styl „stare kasyno”: neony, żarówki, złoto, czerwień. */
:root {
  --gold-1: #fff6c2;
  --gold-2: #ffd23f;
  --gold-3: #e89b0c;
  --gold-4: #7a4300;
  --red-1: #ff5a6e;
  --red-2: #e0142d;
  --red-3: #7a0616;
  --pink: #ff3fa4;
  --cyan: #3ff3ff;
  --green: #36f58a;
  --p0: #0b0214;
  --p1: #1a0630;
  --p2: #2c0b4a;
  --p3: #4a1473;
  --ink: #fff;
  --muted: #e2cffb;
  --font-display: "Bungee", "Rubik", Impact, sans-serif;
  --font-shade: "Bungee Shade", "Bungee", Impact, sans-serif;
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--p0);
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

/* ---------------------------------------------------------------- tło */
.bg {
  position: fixed; inset: 0; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -5%, #6b1fa3 0%, #3a0f63 28%, #1a0630 60%, #0b0214 100%);
}
.rays {
  position: absolute; left: 50%; top: 40%; width: 240vmax; height: 240vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 63, .09) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%);
  animation: spin 70s linear infinite;
}
.honey {
  position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffd23f' stroke-width='2'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23ffd23f' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 42px 75px;
}
.spot {
  position: absolute; left: 50%; bottom: -30vh; width: 140vw; height: 60vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 63, 164, .28), transparent);
  filter: blur(10px);
}
.sparkles i {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 246, 194, .9);
  animation: twinkle 2.4s ease-in-out infinite;
}
#fx { position: fixed; inset: 0; z-index: 50; pointer-events: none; }

/* ---------------------------------------------------------------- układ */
.app {
  position: relative; z-index: 1;
  height: 100vh; height: 100dvh;
  max-width: 500px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: max(8px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom));
}
.top { display: flex; align-items: center; gap: 10px; height: 54px; flex: none; }
.logo { display: flex; align-items: center; gap: 6px; }
.bee { width: 38px; height: 38px; filter: drop-shadow(0 0 8px rgba(255, 210, 63, .6)); animation: buzz 2.6s ease-in-out infinite; }
.logo-txt {
  display: flex; flex-direction: column; line-height: .95;
  font-family: var(--font-display); font-size: 19px; color: var(--gold-2);
  text-shadow: 0 0 10px rgba(255, 210, 63, .55), 0 2px 0 var(--gold-4);
}
.logo-txt small { font-family: var(--font); font-weight: 700; font-size: 10px; letter-spacing: .18em; color: var(--pink); text-shadow: 0 0 8px var(--pink); text-transform: uppercase; }
.bank {
  margin-left: auto; display: flex; flex-direction: column; align-items: flex-end;
  padding: 3px 12px 4px; border-radius: 10px;
  background: linear-gradient(#170003, #2c0409);
  border: 2px solid var(--gold-3);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .9), 0 0 14px rgba(255, 210, 63, .25);
  min-width: 96px;
}
.bank-label { font-size: 9px; letter-spacing: .22em; color: var(--gold-2); font-weight: 700; }
.bank-val {
  font-family: var(--font-display); font-size: 22px; line-height: 1.05; color: #ff4d5e;
  text-shadow: 0 0 6px #ff2d55, 0 0 14px #ff2d55; font-variant-numeric: tabular-nums;
}
.bank.bump { animation: bump .5s cubic-bezier(.2, 1.6, .4, 1); }
.sound {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255, 210, 63, .5);
  background: rgba(255, 255, 255, .08); font-size: 18px; display: grid; place-items: center; flex: none;
}
.stage { position: relative; flex: 1; min-height: 0; }
.screen {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center;
}
.screen.active { display: flex; animation: screen-in .5s cubic-bezier(.2, 1.2, .4, 1) both; }

/* ---------------------------------------------------------------- żarówki */
.bulbs { position: absolute; inset: 0; pointer-events: none; }
.bulb {
  position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, #ffe98a 40%, #f0a50f 75%);
  box-shadow: 0 0 6px 2px rgba(255, 210, 63, .85), 0 0 14px rgba(255, 210, 63, .5);
  animation: bulb 1s steps(1) infinite;
}
.bulb.b { animation-delay: -.5s; }
.win .bulb { animation-duration: .16s; }
.lose .bulb { animation: none; opacity: .35; box-shadow: none; }

/* ---------------------------------------------------------------- ekran powitalny */
.marquee {
  position: relative; margin: auto 4px; width: 100%;
  border-radius: 30px; padding: 16px;
  background: linear-gradient(180deg, var(--red-2), var(--red-3));
  box-shadow: 0 0 0 4px var(--gold-3), 0 0 0 9px #2a0209, 0 25px 60px rgba(0, 0, 0, .6), 0 0 80px rgba(255, 63, 164, .3);
}
.marquee-inner {
  border-radius: 20px; padding: 26px 16px 22px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #3d0f60, #14041f);
  box-shadow: inset 0 4px 24px rgba(0, 0, 0, .75);
}
.neon-small {
  font-family: var(--font); font-weight: 900; letter-spacing: .3em; text-transform: uppercase; font-size: 13px;
  color: #ffe1f3; text-shadow: 0 0 6px var(--pink), 0 0 14px var(--pink), 0 0 26px var(--pink);
  animation: flicker 5s linear infinite;
}
.title-shade {
  margin: 6px 0 4px; font-family: var(--font-shade); font-weight: 400;
  font-size: clamp(54px, 17vw, 84px); line-height: .92; color: var(--gold-2);
  text-shadow: 0 0 18px rgba(255, 210, 63, .55), 0 4px 0 var(--gold-4);
}
.sub { font-family: var(--font-display); color: var(--cyan); font-size: 18px; text-shadow: 0 0 10px var(--cyan); letter-spacing: .06em; }
.reels { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.reel {
  width: 62px; height: 76px; overflow: hidden; border-radius: 10px;
  background: linear-gradient(#fffdf2, #efe2c0 50%, #fffdf2);
  border: 3px solid var(--gold-3);
  box-shadow: inset 0 12px 14px -8px rgba(0, 0, 0, .55), inset 0 -12px 14px -8px rgba(0, 0, 0, .55), 0 6px 14px rgba(0, 0, 0, .45);
}
.strip {
  font-family: var(--font-display); font-size: 46px; color: var(--red-2);
  animation: reel 2.2s linear infinite;
}
.strip b { display: block; height: 70px; line-height: 70px; text-align: center; font-weight: 400; }
.reel:nth-child(2) .strip { animation-duration: 1.7s; }
.reel:nth-child(3) .strip { animation-duration: 2.6s; }

/* ---------------------------------------------------------------- wybór poziomu */
#s-level { justify-content: center; gap: 12px; padding: 4px 0 10px; text-align: center; }
.neon-title {
  margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 8.5vw, 38px);
  color: #fff; text-shadow: 0 0 6px var(--cyan), 0 0 16px var(--cyan), 0 0 32px var(--cyan);
  animation: flicker 6s linear infinite;
}
.lead { margin: 0 6px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.lead b { color: var(--gold-2); }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; width: 100%; margin-top: 6px; }
.chip {
  appearance: none; border: 0; background: rgba(255, 255, 255, .05); border-radius: 22px; padding: 14px 8px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid rgba(255, 210, 63, .18); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.chip:hover { transform: translateY(-3px); border-color: var(--gold-2); background: rgba(255, 255, 255, .09); }
.chip:active { transform: scale(.96); }
.chip.last { border-color: var(--gold-2); box-shadow: 0 0 22px rgba(255, 210, 63, .35); }
.chip-face {
  width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background:
    radial-gradient(circle, var(--c) 0 50%, rgba(255, 255, 255, .92) 50% 54%, var(--c) 54% 60%, transparent 60%),
    repeating-conic-gradient(from 7deg, var(--stripe, #fff) 0 14deg, var(--c) 14deg 45deg);
  box-shadow: 0 6px 0 var(--cd), 0 12px 22px rgba(0, 0, 0, .55), inset 0 0 0 3px rgba(0, 0, 0, .18);
  transition: transform .5s cubic-bezier(.2, 1.4, .4, 1);
}
.chip:hover .chip-face { transform: rotate(40deg); }
.chip.picked .chip-face { animation: chip-spin .8s cubic-bezier(.2, .9, .3, 1) both; }
.chip-face b { font-family: var(--font-display); font-weight: 400; font-size: 26px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.chip[data-level="B2"] .chip-face b { color: var(--gold-2); }
.chip-name { font-family: var(--font-display); font-size: 17px; color: var(--gold-1); margin-top: 6px; }
.chip-desc { font-size: 12.5px; color: var(--muted); }
.rules { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.rules span {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 210, 63, .35); color: var(--gold-1);
}

/* ---------------------------------------------------------------- rozgrywka */
#s-play { justify-content: flex-start; gap: 8px; }
.rounds { display: flex; gap: 8px; justify-content: center; margin-top: 2px; flex: none; }
.rdot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 11px; color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .06); border: 2px dashed rgba(255, 255, 255, .25);
  transition: all .3s ease;
}
.rdot.now { color: #1b0b00; background: var(--gold-2); border: 2px solid #fff; box-shadow: 0 0 14px var(--gold-2); animation: bump 1.2s ease-in-out infinite; }
.rdot.ok { background: var(--green); border: 2px solid #eafff2; color: #04210f; box-shadow: 0 0 10px rgba(54, 245, 138, .6); }
.rdot.bad { background: #5a1022; border: 2px solid #ff5a6e; color: #ffb3bd; }
.rounds:has(.mini) { gap: 4px; align-items: center; flex-wrap: wrap; }
.rdot.mini { width: 11px; height: 11px; border-width: 1.5px; }
.rdot.mini.now { animation: bump 1.2s ease-in-out infinite; box-shadow: 0 0 8px var(--gold-2); border-width: 2px; }
.rcount { margin-left: 6px; font-family: var(--font-display); font-size: 13px; color: var(--gold-1); text-shadow: 0 0 8px rgba(255, 210, 63, .5); }

.machine {
  position: relative; width: calc(100% - 12px); flex: none;
  border-radius: 28px; padding: 15px;
  background: linear-gradient(180deg, var(--red-2), var(--red-3));
  box-shadow: 0 0 0 4px var(--gold-3), 0 0 0 9px #2a0209, 0 22px 50px rgba(0, 0, 0, .6), 0 0 60px rgba(255, 63, 164, .25);
  transition: box-shadow .3s ease;
}
.machine.win { box-shadow: 0 0 0 4px var(--gold-1), 0 0 0 9px #2a0209, 0 22px 50px rgba(0, 0, 0, .6), 0 0 90px rgba(255, 210, 63, .7); }
.machine.shake { animation: shake .45s ease; }
.machine-inner {
  position: relative; border-radius: 18px; padding: 12px 10px 12px; text-align: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #3d0f60, #150420);
  box-shadow: inset 0 4px 22px rgba(0, 0, 0, .75);
}
.hint-label { font-size: 11px; font-weight: 700; letter-spacing: .26em; color: var(--pink); text-shadow: 0 0 8px var(--pink); }
.hint {
  margin: 2px 0 0; min-height: 1.15em;
  font-family: var(--font); font-weight: 900; font-size: clamp(30px, 9.5vw, 44px); line-height: 1.1;
  background: linear-gradient(180deg, #fff 0%, #fff0b3 50%, #ffc21a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #6b1d00) drop-shadow(0 0 14px rgba(255, 210, 63, .45));
}
.hint.pop { animation: pop-in .55s cubic-bezier(.2, 1.5, .4, 1) both; }
/* Długa podpowiedź (definicja w wersji angielskiej, długie słowo niemieckie) — klasę dodaje game.js tylko powyżej
   progu dłuższego niż każda polska podpowiedź, więc polska wersja wygląda jak dotąd. */
.hint.long { font-size: clamp(19px, 5.6vw, 24px); line-height: 1.2; overflow-wrap: anywhere; }
.hint-sub { min-height: 18px; font-size: 14px; color: var(--muted); font-style: italic; }
.tiles {
  --gap: 5px;
  --tile: min(46px, calc((min(100vw, 500px) - 76px - (var(--n, 5) - 1) * var(--gap)) / var(--n, 5)));
  display: flex; justify-content: center; gap: var(--gap); margin: 10px 0 8px;
}
.tile {
  position: relative; width: var(--tile); height: calc(var(--tile) * 1.28); border-radius: calc(var(--tile) * .18);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: calc(var(--tile) * .66); line-height: 1;
  background: linear-gradient(180deg, #2a0b44, #16041f);
  border: 2px solid rgba(255, 210, 63, .45);
  color: rgba(255, 210, 63, .5);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .7), 0 3px 0 rgba(0, 0, 0, .4);
  animation: tile-drop .45s cubic-bezier(.2, 1.5, .4, 1) both;
}
.tile.hidden::after { content: "?"; animation: qpulse 1.4s ease-in-out infinite; }
.tile.open {
  color: var(--red-2);
  background: linear-gradient(180deg, #fffdf2, #efe2c0 50%, #fffdf2);
  border-color: var(--gold-3);
  box-shadow: inset 0 8px 8px -6px rgba(0, 0, 0, .5), inset 0 -8px 8px -6px rgba(0, 0, 0, .5), 0 3px 0 rgba(0, 0, 0, .4);
}
.tile.spin { animation: reel-tick .07s linear infinite; }
.tile.land { animation: land .35s cubic-bezier(.2, 1.8, .4, 1); }
.tile.gold {
  color: #3a1d00;
  background: linear-gradient(180deg, #fffbe0, #ffd23f 55%, #e89b0c);
  border-color: #fff6c2;
  box-shadow: 0 0 16px rgba(255, 210, 63, .9), inset 0 -4px 0 rgba(0, 0, 0, .15);
  animation: flip-gold .5s cubic-bezier(.2, 1.4, .4, 1) both;
}
.tile.miss { color: #fff; background: linear-gradient(180deg, #ff6b7d, #b00020); border-color: #ffb3bd; animation: flip-gold .5s ease both; }
.tick-bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin: 0 6px 8px; }
.tick-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--pink)); box-shadow: 0 0 8px var(--pink); }
.tick-bar i.run { animation: tick-fill 2s linear infinite; }
.meter { display: flex; align-items: center; justify-content: center; gap: 10px; }
.meter-label { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--gold-1); }
.meter-val {
  min-width: 96px; padding: 2px 10px; border-radius: 8px; text-align: center;
  font-family: var(--font-display); font-size: 26px; line-height: 1.15; color: #ff4d5e; font-variant-numeric: tabular-nums;
  background: #120003; border: 2px solid #5a0a14; text-shadow: 0 0 6px #ff2d55, 0 0 14px #ff2d55;
}
.meter-val.drop { animation: drop .35s ease; }
.meter-bulbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 8px; min-height: 10px; }
.meter-bulbs i {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, #ffe98a 40%, #f0a50f 75%);
  box-shadow: 0 0 8px rgba(255, 210, 63, .9); transition: all .3s ease;
}
.meter-bulbs i.off { background: #3b1a3f; box-shadow: none; transform: scale(.75); }

.flash-word {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-size: clamp(30px, 10vw, 46px); color: #fff; opacity: 0;
  text-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan), 0 4px 0 #0a3a44;
  transform: translate(-50%, -50%);
}
.flash-word.go { animation: flash-word 1s cubic-bezier(.2, .9, .3, 1) both; }
.popup {
  position: absolute; left: 50%; top: 46%; z-index: 4; pointer-events: none; text-align: center; opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
}
.popup.go { animation: popup 1.9s cubic-bezier(.2, 1.4, .4, 1) both; }
.popup .big {
  display: block; font-family: var(--font-display); font-size: clamp(40px, 13vw, 60px); line-height: 1; white-space: nowrap;
  color: var(--gold-2); -webkit-text-stroke: 2px #7a0616;
  text-shadow: 0 5px 0 #7a0616, 0 0 30px rgba(255, 210, 63, .9);
}
/* Dłuższy napis w innym języku (np. „ACABOU O TEMPO!”) — próg powyżej polskiego „CZAS MINĄŁ!”. */
.popup.long .big { font-size: clamp(30px, 9.5vw, 44px); }
.popup .pts {
  display: inline-block; margin-top: 6px; padding: 4px 14px; border-radius: 999px;
  font-family: var(--font-display); font-size: 26px; color: #1b0b00; background: var(--gold-2);
  box-shadow: 0 0 20px rgba(255, 210, 63, .9);
}
.popup.bad .big { color: #fff; -webkit-text-stroke: 2px #7a0616; text-shadow: 0 5px 0 #3a0010, 0 0 30px rgba(255, 45, 85, .9); }
.popup .word { display: block; margin-top: 8px; font-family: var(--font-display); font-size: 22px; color: #fff; text-shadow: 0 0 10px var(--cyan); }
.popup::before {
  content: ""; position: absolute; left: 50%; top: 40%; width: 420px; height: 420px; z-index: -1;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 63, .35) 0 10deg, transparent 10deg 24deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, transparent 62%);
  animation: spin 6s linear infinite;
}
.popup.bad::before { display: none; }

/* ---------------------------------------------------------------- mikrofon */
.controls { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.bubble {
  min-height: 34px; max-width: 92%; padding: 6px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; text-align: center;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .15); color: var(--muted);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease;
}
.bubble.on { opacity: 1; }
.bubble.bad { color: #ffd0d6; border-color: #ff5a6e; background: rgba(90, 16, 34, .7); animation: shake .4s ease; }
.bubble.live { color: #fff; border-color: var(--cyan); }
.mic-zone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mic {
  position: relative; width: 116px; height: 116px; border-radius: 50%; border: 0; color: #fff;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 28%, #ff9aa6 0%, #ff2d45 32%, #b00020 68%, #5c0010 100%);
  box-shadow: 0 0 0 6px var(--gold-2), 0 0 0 10px #5a2a00, 0 10px 0 10px #2e0a00, 0 22px 40px rgba(0, 0, 0, .6), 0 0 44px rgba(255, 45, 69, .55);
  transition: transform .08s ease, box-shadow .08s ease, filter .2s ease;
}
.mic svg { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .35)); position: relative; z-index: 1; }
.mic:active { transform: translateY(6px); box-shadow: 0 0 0 6px var(--gold-2), 0 0 0 10px #5a2a00, 0 4px 0 10px #2e0a00, 0 12px 26px rgba(0, 0, 0, .6); }
.mic[disabled] { filter: grayscale(.8) brightness(.6); cursor: default; }
.mic.idle-pulse { animation: mic-invite 1.6s ease-in-out infinite; }
.mic.listening {
  background: radial-gradient(circle at 35% 28%, #b9fbff 0%, #3ff3ff 30%, #1580b8 70%, #0a3350 100%);
  box-shadow: 0 0 0 6px #fff, 0 0 0 10px #0a3350, 0 10px 0 10px #041a2a, 0 22px 40px rgba(0, 0, 0, .6), 0 0 60px rgba(63, 243, 255, .8);
}
.mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--cyan); opacity: 0; }
.mic.listening .ring { animation: ring 1.4s ease-out infinite; }
.mic.listening .ring.r2 { animation-delay: .7s; }
.mic-label { font-family: var(--font-display); font-size: 15px; color: var(--gold-1); text-shadow: 0 0 8px rgba(255, 210, 63, .5); letter-spacing: .03em; text-align: center; }
.mic-label.live { color: #fff; text-shadow: 0 0 10px var(--cyan); }
.typing { display: flex; gap: 8px; width: 100%; max-width: 360px; }
.typing input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--gold-3);
  background: #fffdf2; color: #3a0010; font: 700 20px var(--font); -webkit-user-select: text; user-select: text;
}
.typing .ok {
  padding: 0 20px; border-radius: 16px; border: 0; font-family: var(--font-display); font-size: 20px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); color: #2a1200; box-shadow: 0 4px 0 var(--gold-4);
}
.aux { display: flex; gap: 10px; }
.pill {
  font-family: var(--font-display); font-size: 13px; padding: 9px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 210, 63, .45); color: var(--gold-1);
}
.pill:active { transform: scale(.96); }
.pill[disabled] { opacity: .4; }

/* ---------------------------------------------------------------- finał */
#s-final { justify-content: center; gap: 14px; text-align: center; }
.final-rays {
  position: absolute; left: 50%; top: 42%; width: 900px; height: 900px; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 63, .28) 0 9deg, transparent 9deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle, #000 0%, transparent 60%);
  animation: spin 12s linear infinite; pointer-events: none;
}
.final-title {
  position: relative; font-family: var(--font-shade); font-size: clamp(54px, 17vw, 86px); line-height: 1; color: var(--gold-2);
  text-shadow: 0 0 24px rgba(255, 210, 63, .8), 0 5px 0 var(--gold-4);
  animation: title-slam .8s cubic-bezier(.2, 1.6, .4, 1) both;
}
.final-score-box {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 10px 26px 12px; border-radius: 18px;
  background: #120003; border: 3px solid var(--gold-3); box-shadow: inset 0 0 18px rgba(0, 0, 0, .9), 0 0 30px rgba(255, 45, 85, .35);
  animation: pop-in .6s .25s cubic-bezier(.2, 1.5, .4, 1) both;
}
.final-score-label { font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--gold-2); }
.final-score { font-family: var(--font-display); font-size: clamp(48px, 15vw, 70px); line-height: 1.05; color: #ff4d5e; text-shadow: 0 0 10px #ff2d55, 0 0 24px #ff2d55; font-variant-numeric: tabular-nums; }
.final-stars { position: relative; font-size: 34px; letter-spacing: 6px; }
.final-stars span { display: inline-block; color: #3b1a3f; animation: pop-in .4s cubic-bezier(.2, 1.8, .4, 1) both; }
.final-stars span.on { color: var(--gold-2); text-shadow: 0 0 14px var(--gold-2); }
.final-sub { position: relative; font-size: 17px; font-weight: 700; color: var(--muted); }

/* ---------------------------------------------------------------- animacje */
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .1; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes bulb { 0% { opacity: 1; } 50% { opacity: .25; box-shadow: none; } }
@keyframes flicker { 0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; } 20%, 24%, 55% { opacity: .45; } }
@keyframes buzz { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(1px, -2px) rotate(4deg); } 50% { transform: translate(-1px, 1px) rotate(-3deg); } 75% { transform: translate(1px, 2px) rotate(5deg); } }
@keyframes screen-in { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes reel { from { transform: translateY(0); } to { transform: translateY(calc(-70px * 26)); } }
@keyframes chip-spin { 0% { transform: rotate(0) scale(1); } 60% { transform: rotate(600deg) scale(1.2); } 100% { transform: rotate(720deg) scale(1.08); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.15); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes tile-drop { from { opacity: 0; transform: translateY(-30px) rotateX(80deg); } to { opacity: 1; transform: none; } }
@keyframes qpulse { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }
@keyframes reel-tick { 0% { transform: translateY(-3px); } 50% { transform: translateY(3px); } 100% { transform: translateY(-3px); } }
@keyframes land { 0% { transform: translateY(-10px) scale(1.15); } 60% { transform: translateY(3px) scale(.95); } 100% { transform: none; } }
@keyframes flip-gold { 0% { transform: rotateY(90deg) scale(.8); } 100% { transform: none; } }
@keyframes tick-fill { from { width: 0; } to { width: 100%; } }
@keyframes drop { 0% { transform: scale(1.25); color: #fff; } 100% { transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes flash-word {
  0% { opacity: 0; transform: translate(-150%, -50%) skewX(-20deg); }
  25% { opacity: 1; transform: translate(-50%, -50%) skewX(0); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(60%, -50%) skewX(20deg); }
}
@keyframes popup {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(2deg); }
  28% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  82% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -64%) scale(.9); }
}
@keyframes mic-invite { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
@keyframes title-slam { 0% { opacity: 0; transform: scale(2.4) rotate(-6deg); } 100% { opacity: 1; transform: none; } }

@media (min-height: 760px) {
  .machine-inner { padding: 16px 12px 16px; }
  .tiles { margin: 14px 0 12px; }
}
@media (max-height: 640px) {
  .top { height: 46px; }
  .mic { width: 96px; height: 96px; }
  .hint { font-size: 30px; }
  .chip-face { width: 72px; height: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
