/* Literki z nieba — style. Jeden, celowo ciemny wygląd: wieczór przy stole, nocne niebo za oknem,
   kremowe płytki jak klocki, ciepłe złoto jako akcent. Czcionka Poppins z plików lokalnych (OFL). */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonty/poppins-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonty/poppins-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonty/poppins-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonty/poppins-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(fonty/poppins-800-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(fonty/poppins-800-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --niebo: #141233; --niebo-2: #1f1b45; --niebo-3: #2c2760; --niebo-4: #3a3478;
  --plytka: #fbf1da; --plytka-2: #f3e4c3; --plytka-krawedz: #d9c49a; --atrament: #2b2342;
  --zloto: #f2b33d; --zloto-2: #ffd36b; --zielen: #5cc8a0; --roz: #ef6f6c; --mgla: #b9b0d4; --tekst: #f6f1ff;
  --f: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --r: 14px;
  --cien: 0 10px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--niebo); color: var(--tekst); font-family: var(--f); font-size: 16px; line-height: 1.5;
  background-image: radial-gradient(ellipse at 50% -10%, var(--niebo-4), transparent 60%);
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
#niebo, #konfetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#niebo { z-index: 0; }
#konfetti { z-index: 20; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column;
  padding: max(14px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.ekran { flex: 1; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
h1, h2 { font-weight: 800; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 6vw, 2rem); color: var(--zloto-2); }
h2 { font-size: 1.45rem; }
p { margin: 0; }
.maly { font-size: .85rem; color: var(--mgla); }
.etykieta { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--mgla); font-weight: 800; }
.pole { display: flex; flex-direction: column; gap: 8px; }
.pole-srodek { align-items: center; text-align: center; }
.pole-dol { margin-top: auto; padding-top: 6px; }
.rzad { display: flex; gap: 10px; align-items: stretch; }
.rzad-dwa { gap: 16px; }
.rzad-dwa > .pole { flex: 1; }
.notka { background: rgba(31, 27, 69, .75); border-radius: var(--r); padding: 11px 14px; font-size: .92rem; color: var(--mgla); }

/* ---------- przyciski ---------- */
button { font: inherit; cursor: pointer; border: 0; border-radius: var(--r); color: inherit; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--zloto); outline-offset: 2px; }
.btn { min-height: 52px; padding: 12px 18px; font-size: 1.1rem; font-weight: 800; border-radius: var(--r); transition: transform .08s, filter .15s; }
.btn:active { transform: translateY(2px) scale(.985); }
.btn-zloty { background: linear-gradient(180deg, var(--zloto-2), var(--zloto)); color: var(--atrament); box-shadow: inset 0 -4px 0 #c98c17, 0 6px 16px rgba(242, 179, 61, .25); }
.btn-zloty:active { box-shadow: inset 0 -1px 0 #c98c17; }
.btn-obrys { background: rgba(31, 27, 69, .8); border: 2px solid var(--niebo-4); color: var(--tekst); }
.btn-obrys:hover { border-color: var(--mgla); }
.btn-maly { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
input[type=text] { font: inherit; background: var(--niebo-2); color: var(--tekst); border: 2px solid var(--niebo-4); border-radius: var(--r); padding: 12px 14px; font-size: 1.1rem; min-height: 52px; width: 100%; }
input::placeholder { color: #7f78a3; }
.kod-pole { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; text-align: center; flex: 1; min-width: 0; }
.rzad > .btn { flex: 0 0 auto; }

/* dźwięk w rogu */
.dzwiek { position: fixed; top: max(10px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); z-index: 15; width: 46px; height: 46px; border-radius: 50%; background: rgba(31, 27, 69, .85); border: 2px solid var(--niebo-4); display: grid; place-items: center; color: var(--mgla); }
.dzwiek svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dzwiek.wl { color: var(--zloto-2); border-color: var(--zloto); }
.panel-dzwiek { position: fixed; top: calc(max(10px, env(safe-area-inset-top, 0px)) + 54px); right: max(10px, env(safe-area-inset-right, 0px)); z-index: 16; width: min(280px, calc(100vw - 20px)); background: var(--niebo-2); border: 2px solid var(--niebo-4); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--cien); }
.panel-dzwiek .btn-maly { width: 100%; }
.panel-dzwiek .btn-maly[aria-pressed=true] { border-color: var(--zloto); color: var(--zloto-2); }
.suwak { display: grid; grid-template-columns: 58px 1fr 44px; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.suwak b { text-align: right; font-variant-numeric: tabular-nums; color: var(--mgla); font-weight: 700; }
.suwak input[type=range] { width: 100%; accent-color: var(--zloto); height: 28px; margin: 0; }

/* ---------- płytki ---------- */
.plytka {
  position: relative; background: var(--plytka); color: var(--atrament); font-weight: 800; display: grid; place-items: center;
  border-radius: 10px; user-select: none; -webkit-user-select: none; line-height: 1;
  box-shadow: inset 0 -5px 0 var(--plytka-krawedz), inset 0 1px 0 #fff, 0 4px 8px rgba(0, 0, 0, .35);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)'/%3E%3C/svg%3E");
  padding-bottom: 4px;
}

/* logo z płytek na starcie */
.hero { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; padding-right: 48px; }
.logo { display: flex; gap: 5px; flex-wrap: wrap; }
.logo .plytka { width: clamp(34px, 9.5vw, 44px); height: clamp(38px, 10.5vw, 48px); font-size: clamp(1.3rem, 5.5vw, 1.8rem); transform: rotate(var(--obrot)); }
.logo .plytka.spada { animation: spada .9s cubic-bezier(.35, 0, .55, 1) both; animation-delay: var(--d); }
.logo .plytka.cicho { animation: pojaw .35s ease-out both; animation-delay: var(--d); }
.z-nieba { display: inline-block; }
/* ilustracja na starcie (Kling): zaokrąglona, z dołem rozmytym w tło nieba */
.hero-obraz { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); margin-top: -4px; }
.hero-obraz img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-obraz::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 51, .25) 0%, rgba(20, 18, 51, 0) 35%, rgba(20, 18, 51, 0) 70%, rgba(20, 18, 51, .55) 100%); pointer-events: none; }
.lead { color: var(--mgla); font-size: .97rem; }

/* awatary */
.aw { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; background: var(--niebo-3); }
.aw[data-a="0"] { background: #ffd9b8; } .aw[data-a="1"] { background: #f0dcc3; } .aw[data-a="2"] { background: #d9d2f0; } .aw[data-a="3"] { background: #ffd1b3; }
.aw[data-a="4"] { background: #cdebcf; } .aw[data-a="5"] { background: #efdcc4; } .aw[data-a="6"] { background: #fbe0ea; } .aw[data-a="7"] { background: #e3e0c7; }
.awatary { display: flex; gap: 8px; flex-wrap: wrap; }
.awatary button { width: 56px; height: 56px; border-radius: 50%; padding: 0; background: transparent; border: 3px solid transparent; display: grid; place-items: center; transition: transform .12s; }
.awatary button .aw { width: 46px; height: 46px; }
.awatary button[aria-checked=true] { border-color: var(--zloto); transform: scale(1.08); }
.awatary button:active { transform: scale(.94); }

.baner-dolacz { background: var(--niebo-2); border: 2px solid var(--zloto); border-radius: var(--r); padding: 12px 14px; font-weight: 700; }
.przyciski-start { gap: 10px; }

.jak { margin-top: 10px; background: rgba(31, 27, 69, .55); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.jak ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.stopka { font-size: .8rem; color: var(--mgla); text-align: center; padding: 8px 0 4px; }
.stopka a { color: var(--mgla); }

/* ---------- lobby ---------- */
.kod-plytki { display: flex; gap: 8px; justify-content: center; }
.kod-plytki .plytka { width: clamp(52px, 15vw, 68px); height: clamp(58px, 17vw, 76px); font-size: clamp(2rem, 9vw, 2.8rem); color: var(--atrament); }
.kod-plytki .plytka.solo { font-size: 1.1rem; width: auto; padding: 0 18px; }
.udostepnij { display: flex; gap: 14px; align-items: center; background: rgba(31, 27, 69, .8); border-radius: 18px; padding: 12px; }
.qr-ramka { flex: 0 0 auto; width: 136px; height: 136px; background: var(--plytka); border-radius: 12px; padding: 8px; box-shadow: inset 0 -5px 0 var(--plytka-krawedz), 0 4px 8px rgba(0, 0, 0, .35); }
.qr-ramka canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; border-radius: 4px; }
.link { font-size: .82rem; word-break: break-all; color: var(--tekst); background: var(--niebo); padding: 6px 8px; border-radius: 8px; font-family: ui-monospace, Consolas, monospace; }
.gracze { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.gracz { display: inline-flex; align-items: center; gap: 8px; background: var(--niebo-2); border-radius: 999px; padding: 4px 14px 4px 4px; font-weight: 700; border: 2px solid transparent; }
.gracz .aw { width: 36px; height: 36px; }
.gracz.ja { border-color: var(--zielen); }
.gracz .rola { font-size: .72rem; color: var(--mgla); font-weight: 700; }
.gracz.wpada { animation: wpada .5s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes wpada { from { transform: translateY(-40px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.opcje { display: flex; flex-wrap: wrap; gap: 8px; }
.opcja { min-height: 48px; padding: 8px 14px; border-radius: 12px; background: var(--niebo-2); border: 2px solid var(--niebo-3); font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; color: var(--tekst); transition: transform .08s; }
.opcja svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.opcja small { font-weight: 400; color: var(--mgla); font-size: .8rem; }
.opcja[aria-pressed=true] { border-color: var(--zloto); background: var(--niebo-3); color: #fff; box-shadow: 0 0 0 2px rgba(242, 179, 61, .25); }
.opcja[aria-pressed=true] svg { color: var(--zloto-2); }
.opcja:active:not([disabled]) { transform: scale(.96); }
.opcja[disabled] { cursor: default; opacity: .85; }
.opcje-kat { display: grid; grid-template-columns: repeat(2, 1fr); }
.opcje-kat .opcja { justify-content: flex-start; }

/* ---------- gra ---------- */
.ekran-gra { gap: 12px; }
.gora { display: flex; flex-direction: column; gap: 8px; padding-right: 48px; }
.hud { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hud-kat { font-weight: 800; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; }
.hud-kat svg { width: 24px; height: 24px; fill: none; stroke: var(--zloto-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hud-runda { font-variant-numeric: tabular-nums; color: var(--mgla); font-weight: 800; white-space: nowrap; }
/* lont z iskrą */
.lont { position: relative; height: 10px; border-radius: 99px; background: var(--niebo-2); overflow: visible; }
.lont-sznur { position: absolute; inset: 0; border-radius: 99px; background: linear-gradient(90deg, #d8b26a, #f2b33d); transform-origin: left; transform: scaleX(1); box-shadow: 0 0 10px rgba(242, 179, 61, .35); }
.lont-iskra { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle, #fff 0 25%, var(--zloto-2) 45%, rgba(242, 179, 61, 0) 70%); box-shadow: 0 0 12px 3px rgba(255, 211, 107, .7); will-change: transform; }
.lont.koniec .lont-sznur { background: linear-gradient(90deg, #e07a6a, var(--roz)); animation: pulsuj .7s ease-in-out infinite; }
.lont.koniec .lont-iskra { background: radial-gradient(circle, #fff 0 30%, #ffb3a7 50%, rgba(239, 111, 108, 0) 70%); box-shadow: 0 0 18px 6px rgba(239, 111, 108, .8); }
@keyframes pulsuj { 50% { filter: brightness(1.35); } }
.wyniki { display: flex; gap: 6px; flex-wrap: wrap; }
.wynik { display: inline-flex; align-items: center; gap: 6px; background: var(--niebo-2); border-radius: 999px; padding: 3px 10px 3px 3px; font-weight: 800; font-size: .9rem; font-variant-numeric: tabular-nums; border: 2px solid transparent; }
.wynik .aw { width: 26px; height: 26px; }
.wynik.ja { border-color: var(--zielen); }
.wynik b { color: var(--zloto-2); }

.plansza { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.siatka { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.siatka .plytka { aspect-ratio: 1 / 1.05; width: 100%; font-size: clamp(1.5rem, 7vw, 2.3rem); cursor: pointer; transition: opacity .25s, transform .12s; }
.siatka .plytka.spada { animation: spada 1s cubic-bezier(.35, 0, .55, 1) both; animation-delay: var(--d); }
.siatka .plytka.spada::after { /* świetlisty ogonek jak u spadającej gwiazdy */
  content: ''; position: absolute; left: 50%; bottom: 85%; width: 10px; height: 90px; margin-left: -5px; border-radius: 99px;
  background: linear-gradient(180deg, rgba(255, 211, 107, 0), rgba(255, 211, 107, .85)); opacity: 0; animation: ogonek 1s linear both; animation-delay: var(--d); pointer-events: none;
}
@keyframes spada {
  0% { transform: translateY(-110vh) rotate(var(--obrot)); }
  72% { transform: translateY(0) rotate(0) scaleY(1); }
  82% { transform: translateY(2px) scale(1.08, .86); }
  92% { transform: translateY(-5px) scale(.98, 1.03); }
  100% { transform: none; }
}
@keyframes ogonek { 0% { opacity: 0; } 15% { opacity: .9; } 70% { opacity: .7; } 85%, 100% { opacity: 0; } }
.siatka .plytka.cicho { animation: pojaw .35s ease-out both; animation-delay: var(--d); }
@keyframes pojaw { from { opacity: 0; } to { opacity: 1; } }
.siatka .plytka:active { transform: scale(.94); }
.siatka .plytka.uzyta { opacity: .22; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); background-image: none; background: #6a5f8a; color: transparent; pointer-events: none; transform: scale(.94); }
.siatka .plytka.zgaszona { opacity: .35; filter: grayscale(.5); pointer-events: none; }
.iskra { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--zloto-2); box-shadow: 0 0 6px var(--zloto-2); pointer-events: none; z-index: 2; animation: iskra .55s ease-out forwards; }
@keyframes iskra { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
/* płytka w locie (FLIP) */
.lot { position: fixed; z-index: 10; pointer-events: none; font-size: clamp(1.5rem, 7vw, 2.3rem); transform-origin: center; will-change: transform; }

/* pola na słowo — wgłębienia w stole */
.pola { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; border-radius: 12px; padding: 4px; }
.pole-lit { width: clamp(30px, 9vw, 44px); height: clamp(36px, 10.5vw, 50px); border-radius: 9px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(255, 255, 255, .08); display: grid; place-items: center; font-weight: 800; font-size: clamp(1.25rem, 5.8vw, 1.85rem); color: var(--zloto-2); transition: box-shadow .2s; }
.pole-lit.pelne { background: var(--plytka); color: var(--atrament); box-shadow: inset 0 -4px 0 var(--plytka-krawedz), 0 2px 4px rgba(0, 0, 0, .3); }
.pole-lit.w-locie { color: transparent; background: rgba(0, 0, 0, .28); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55); }
.pole-lit.podpowiedz { box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55), 0 0 0 2px var(--zloto), 0 0 12px rgba(242, 179, 61, .6); animation: blysk-podp 1.2s ease-in-out 2; }
@keyframes blysk-podp { 50% { box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55), 0 0 0 3px var(--zloto-2), 0 0 20px rgba(255, 211, 107, .9); } }
.pola.trzesie { animation: trzesie .45s; }
.pola.blad .pole-lit { box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55), 0 0 0 2px var(--roz); animation: blysk-blad .5s ease-out; }
@keyframes trzesie { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes blysk-blad { 0% { box-shadow: inset 0 3px 6px rgba(0, 0, 0, .55), 0 0 0 3px var(--roz), 0 0 16px rgba(239, 111, 108, .8); } }
.pola.fala .pole-lit { animation: fala .55s cubic-bezier(.3, 1.3, .5, 1) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes fala { 35% { transform: translateY(-16px) scale(1.1); } 70% { transform: translateY(2px); } 100% { transform: none; } }
.plus { position: fixed; z-index: 21; font-weight: 800; font-size: 1.6rem; color: var(--zloto-2); text-shadow: 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }
.status { text-align: center; min-height: 1.5em; font-weight: 800; color: var(--mgla); }
.sterowanie { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.sterowanie .btn { min-height: 48px; font-size: 1rem; }
.sterowanie .btn-wyjdz { padding-inline: 14px; color: var(--mgla); font-size: .92rem; }
.sterowanie .btn-wyjdz.pytam { color: var(--roz); border-color: var(--roz); }

/* ---------- odsłona ---------- */
.odslona { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(14, 12, 36, .8); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 12; padding: 16px; }
.odslona .karta { text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; width: min(100%, 440px); }
.kto { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; background: var(--niebo-2); border-radius: 999px; padding: 6px 20px 6px 6px; animation: wjezdza .4s cubic-bezier(.3, 1.3, .5, 1) both; border: 2px solid var(--niebo-4); }
.kto .aw { width: 44px; height: 44px; }
.kto.wygrana { color: var(--zielen); border-color: var(--zielen); }
.kto.nikt { color: var(--mgla); padding: 10px 20px; }
@keyframes wjezdza { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
.slowo { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.slowo .plytka { width: clamp(30px, 9vw, 46px); height: clamp(34px, 10vw, 52px); font-size: clamp(1.3rem, 6vw, 2rem); animation: pyk .4s both; animation-delay: var(--d); }
@keyframes pyk { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- koniec: podium ---------- */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; min-height: 200px; padding-top: 10px; }
.stopien { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stopien .osoby { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stopien .osoba { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; font-size: .9rem; text-align: center; animation: wskakuje .6s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: var(--d); max-width: 100%; }
.stopien .osoba .aw { width: 52px; height: 52px; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.stopien .osoba small { font-weight: 700; color: var(--mgla); font-size: .78rem; }
.stopien .osoba span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes wskakuje { from { transform: translateY(-70px) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.stopien .blok { width: 100%; border-radius: 10px 10px 4px 4px; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--atrament); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .35); }
.stopien.m1 .blok { height: 96px; background: linear-gradient(180deg, var(--zloto-2), var(--zloto)); }
.stopien.m2 .blok { height: 70px; background: linear-gradient(180deg, #e6e2f0, #bfb8d2); }
.stopien.m3 .blok { height: 50px; background: linear-gradient(180deg, #e2b088, #c08356); }
.stopien.pusty .blok { background: var(--niebo-2); color: var(--mgla); box-shadow: none; }
.lista-wynikow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lista-wynikow li { display: flex; align-items: center; gap: 10px; background: var(--niebo-2); border-radius: 12px; padding: 8px 14px 8px 8px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lista-wynikow li .aw { width: 34px; height: 34px; }
.lista-wynikow li .m { color: var(--mgla); width: 1.6em; }
.lista-wynikow li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-wynikow li.ja { outline: 2px solid var(--zielen); }

@media (min-width: 420px) { .lead { font-size: 1.05rem; } h1 { font-size: 2.2rem; } }
@media (max-height: 640px) { .ekran-gra { gap: 8px; } .plansza { gap: 10px; } .siatka { gap: 7px; } .wyniki { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .siatka .plytka.spada, .siatka .plytka.spada::after, .slowo .plytka, .pola.trzesie, .pola.fala .pole-lit, .gracz.wpada, .stopien .osoba, .kto, .lont.koniec .lont-sznur, .pole-lit.podpowiedz { animation: none !important; }
  .btn, .opcja, .awatary button { transition: none; }
}
