*, *::before, *::after { box-sizing: border-box; }

:root {
    --tlo: #0b0b0f;
    --tlo-glebokie: #050309;
    --karta: #1b1b25;
    --karta-jasna: #24242f;
    --wglebienie: #15151d;
    --obramowanie: #32324a;
    --obramowanie-jasne: #4a4a68;
    --akcent: #ff7a18;
    --akcent-jasny: #ffa047;
    --akcent-ciemny: #3d1c02;
    --akcent-poswiata: rgba(255, 122, 24, 0.16);
    --fiolet: #9b6cff;
    --fiolet-tlo: rgba(155, 108, 255, 0.14);
    --zombie: #8bdc3c;
    --zombie-tlo: rgba(139, 220, 60, 0.14);
    --czerwony: #ef4444;
    --czerwony-tlo: rgba(239, 68, 68, 0.14);
    --tekst: #f3f0f7;
    --tekst-drugi: #a19bb3;
    --tekst-trzeci: #5c5873;
    --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --font-tytul: 'Segoe UI Black', 'Arial Black', 'Segoe UI', system-ui, sans-serif;
    --k0: #ff7a18; --k1: #9b6cff; --k2: #8bdc3c; --k3: #22d3ee; --k4: #f472b6; --k5: #facc15;
    --k6: #ef4444; --k7: #2dd4bf; --k8: #60a5fa; --k9: #fb923c; --k10: #e879f9; --k11: #e5e7eb;
    --o0: #ff7a18; --o1: #9b6cff; --o2: #22c55e; --o3: #ef4444;
}

html, body { margin: 0; padding: 0; }

body {
    background: radial-gradient(ellipse at 50% -10%, #2a1442 0%, #120a1e 38%, var(--tlo) 70%) fixed, var(--tlo);
    color: var(--tekst);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

button, input { font-family: inherit; }
button { cursor: pointer; }
.ukryty { display: none !important; }

.k0 { --kg: var(--k0); } .k1 { --kg: var(--k1); } .k2 { --kg: var(--k2); } .k3 { --kg: var(--k3); }
.k4 { --kg: var(--k4); } .k5 { --kg: var(--k5); } .k6 { --kg: var(--k6); } .k7 { --kg: var(--k7); }
.k8 { --kg: var(--k8); } .k9 { --kg: var(--k9); } .k10 { --kg: var(--k10); } .k11 { --kg: var(--k11); }

.awatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6em;
    height: 2.6em;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--kg, var(--akcent)) 45%, #1b1b25), #14121c 75%);
    border: 0.16em solid var(--kg, var(--akcent));
    box-shadow: 0 0 0.8em color-mix(in srgb, var(--kg, var(--akcent)) 35%, transparent);
    font-size: 1em;
    line-height: 1;
    flex-shrink: 0;
}
.awatar > span { font-size: 1.45em; }
.awatar.offline { filter: grayscale(1) brightness(0.55); }

.przycisk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    border: none;
    border-radius: 0.8em;
    padding: 0.8em 1.4em;
    font-size: 1em;
    font-weight: 800;
    color: #1a0b00;
    background: linear-gradient(180deg, var(--akcent-jasny), var(--akcent));
    box-shadow: 0 0.25em 0 #a8480a, 0 0.4em 1.2em rgba(255, 122, 24, 0.25);
    touch-action: manipulation;
    user-select: none;
    transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.przycisk:active { transform: translateY(0.18em); box-shadow: 0 0.07em 0 #a8480a; }
.przycisk:disabled { filter: grayscale(0.9) brightness(0.6); cursor: default; }
.przycisk.drugi {
    color: var(--tekst);
    background: var(--karta-jasna);
    box-shadow: 0 0.25em 0 #0e0e14;
    border: 1px solid var(--obramowanie-jasne);
}
.przycisk.drugi:active { box-shadow: 0 0.07em 0 #0e0e14; }
.przycisk.maly { padding: 0.45em 0.9em; font-size: 0.85em; border-radius: 0.6em; }

.karta {
    background: linear-gradient(180deg, rgba(36, 36, 47, 0.97), rgba(27, 27, 37, 0.97));
    border: 1px solid var(--obramowanie);
    border-radius: 1em;
    box-shadow: 0 0.6em 2em rgba(0, 0, 0, 0.45);
}

.tytul-gry {
    font-family: var(--font-tytul);
    font-weight: 900;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #ffd29a 0%, var(--akcent) 55%, #c24d00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0.08em 0 #3d1c02) drop-shadow(0 0 0.5em rgba(255, 122, 24, 0.35));
}

.pasek-czasu {
    height: 0.6em;
    border-radius: 1em;
    background: var(--wglebienie);
    overflow: hidden;
    border: 1px solid var(--obramowanie);
}
.pasek-czasu > i {
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--czerwony), var(--akcent) 35%, var(--akcent-jasny));
    transform-origin: left center;
}

.plakietka {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.25em 0.75em;
    border-radius: 2em;
    font-weight: 700;
    font-size: 0.8em;
    background: var(--akcent-poswiata);
    color: var(--akcent-jasny);
    border: 1px solid rgba(255, 122, 24, 0.35);
}
.plakietka.fiolet { background: var(--fiolet-tlo); color: #c4a8ff; border-color: rgba(155, 108, 255, 0.4); }
.plakietka.zielona { background: var(--zombie-tlo); color: var(--zombie); border-color: rgba(139, 220, 60, 0.4); }
.plakietka.czerwona { background: var(--czerwony-tlo); color: #ff8a8a; border-color: rgba(239, 68, 68, 0.4); }

.odp-0 { --odp: var(--o0); } .odp-1 { --odp: var(--o1); } .odp-2 { --odp: var(--o2); } .odp-3 { --odp: var(--o3); }

@keyframes wjazd { from { opacity: 0; transform: translateY(0.8em) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes kolysanie { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes unoszenie { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.4em); } }
@keyframes drzenie { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-0.12em, 0.08em); } 40% { transform: translate(0.12em, -0.08em); } 60% { transform: translate(-0.08em, -0.12em); } 80% { transform: translate(0.08em, 0.12em); } }
@keyframes migotanie { 0%, 100% { opacity: 1; } 45% { opacity: 0.85; } 50% { opacity: 0.4; } 55% { opacity: 0.9; } }
@keyframes lot-nietoperza { 0% { transform: translate(-10vw, 0) scale(0.8); } 50% { transform: translate(55vw, -6vh) scale(1); } 100% { transform: translate(115vw, 4vh) scale(0.8); } }
@keyframes mgla { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes reakcja { 0% { opacity: 0; transform: translateY(0) scale(0.5); } 12% { opacity: 1; transform: translateY(-4vh) scale(1.2); } 100% { opacity: 0; transform: translateY(-55vh) scale(0.9) rotate(var(--obrot, 10deg)); } }
.wjazd { animation: wjazd 0.45s cubic-bezier(.2,.9,.3,1.2) both; }
.puls { animation: puls 1.2s ease-in-out infinite; }
.kolysanie { animation: kolysanie 2.4s ease-in-out infinite; display: inline-block; }
.unoszenie { animation: unoszenie 2.6s ease-in-out infinite; display: inline-block; }

.dekoracje { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.dekoracje .ksiezyc {
    position: absolute; top: -3vmin; left: 50%; margin-left: -6vmin; width: 12vmin; height: 12vmin; border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #fff6df, #ffd89a 55%, #e6a24a 100%);
    box-shadow: 0 0 6vmin rgba(255, 190, 110, 0.35), 0 0 16vmin rgba(255, 122, 24, 0.15);
    opacity: 0.32;
}
.dekoracje .nietoperz { position: absolute; font-size: 4vmin; animation: lot-nietoperza 18s linear infinite; opacity: 0.75; filter: brightness(0.25) drop-shadow(0 0 0.3vmin #000); }
.dekoracje .nietoperz.n2 { top: 18vh; animation-duration: 23s; animation-delay: -9s; font-size: 3vmin; }
.dekoracje .nietoperz.n1 { top: 10vh; }
.dekoracje .nietoperz.n3 { top: 26vh; animation-duration: 29s; animation-delay: -17s; font-size: 2.4vmin; }
.dekoracje .mgla {
    position: absolute; left: 0; bottom: 0; width: 200%; height: 22vh;
    background: radial-gradient(ellipse at 20% 100%, rgba(170, 150, 210, 0.16), transparent 60%),
                radial-gradient(ellipse at 60% 100%, rgba(170, 150, 210, 0.12), transparent 55%),
                radial-gradient(ellipse at 90% 100%, rgba(170, 150, 210, 0.14), transparent 60%);
    animation: mgla 60s linear infinite;
}
.dekoracje .cmentarz {
    position: absolute; left: 0; right: 0; bottom: 0; height: 12vh;
    display: flex; align-items: flex-end; justify-content: space-between; padding: 0 2vw;
    font-size: 7vmin; opacity: 0.22; filter: grayscale(0.4);
}

/* ================= TELEWIZOR ================= */

body.tv {
    height: 100vh;
    overflow: hidden;
    font-size: calc(100vh / 52);
}
@media (max-aspect-ratio: 4/3) { body.tv { font-size: calc(100vw / 70); } }

.tv-ramka { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; padding: 1.4em 2.2em 1.6em; gap: 1em; }
.tv-gora { display: flex; align-items: center; justify-content: space-between; gap: 1.5em; min-height: 3.2em; }
.tv-logo { display: flex; align-items: center; gap: 0.6em; font-size: 1.5em; font-weight: 900; }
.tv-logo .dynia { font-size: 1.5em; }
.tv-logo small { display: block; font-size: 0.5em; font-weight: 600; color: var(--tekst-drugi); letter-spacing: 0.04em; }
.tv-kod-maly { display: flex; align-items: center; gap: 0.8em; font-size: 1.05em; color: var(--tekst-drugi); }
.tv-kod-maly b { color: var(--akcent-jasny); font-size: 1.5em; letter-spacing: 0.12em; font-family: var(--font-tytul); }
.tv-scena { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.tv-reakcje { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.tv-reakcje .lecaca { position: absolute; bottom: 4vh; font-size: 4.2em; animation: reakcja 3.6s ease-out forwards; filter: drop-shadow(0 0.1em 0.2em rgba(0,0,0,0.6)); }
.tv-reakcje .lecaca small { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 0.22em; font-weight: 800; white-space: nowrap; background: rgba(0,0,0,0.55); padding: 0.1em 0.5em; border-radius: 1em; color: var(--kg); }

.tv-start { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6em; text-align: center; }
.tv-start h1 { font-size: 5.2em; margin: 0; line-height: 1; }
.tv-start p { font-size: 1.4em; color: var(--tekst-drugi); margin: 0; max-width: 40em; }
.tv-start .wielkie-dynie { font-size: 6em; display: flex; gap: 0.3em; }
.tv-start .przycisk { font-size: 1.8em; }

.lobby { flex: 1; min-height: 0; display: grid; grid-template-columns: 30em 1fr; gap: 1.6em; }
.lobby-dolacz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em; padding: 1.6em; text-align: center; }
.lobby-dolacz .qr { width: 17em; height: 17em; background: #fff; border-radius: 1em; padding: 0.7em; box-shadow: 0 0 0 0.35em var(--akcent), 0 0 3em rgba(255, 122, 24, 0.4); }
.lobby-dolacz .qr img { width: 100%; height: 100%; display: block; }
.lobby-dolacz .adres { font-size: 1.15em; color: var(--tekst-drugi); }
.lobby-dolacz .adres b { color: var(--tekst); }
.lobby-dolacz .kod { font-family: var(--font-tytul); font-size: 5.4em; letter-spacing: 0.14em; line-height: 1; padding-left: 0.14em; }
.lobby-prawa { display: flex; flex-direction: column; gap: 1.2em; min-height: 0; }
.lobby-gracze { flex: 1; min-height: 0; padding: 1.4em; display: flex; flex-direction: column; gap: 1em; }
.lobby-gracze h2 { margin: 0; font-size: 1.5em; display: flex; justify-content: space-between; align-items: center; }
.siatka-graczy { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5em, 1fr)); gap: 0.8em; align-content: start; overflow: hidden; }
.kafel-gracza { display: flex; align-items: center; gap: 0.7em; padding: 0.6em 0.8em; border-radius: 0.9em; background: var(--wglebienie); border: 1px solid var(--obramowanie); animation: wjazd 0.45s cubic-bezier(.2,.9,.3,1.2) both; min-width: 0; position: relative; }
.kafel-gracza .awatar { font-size: 1.05em; }
.kafel-gracza .nick { font-weight: 800; font-size: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kafel-gracza .opis { font-size: 0.8em; color: var(--tekst-drugi); }
.kafel-gracza .wyrzuc { position: absolute; top: 0.25em; right: 0.35em; background: none; border: none; color: var(--tekst-trzeci); font-size: 1em; padding: 0.2em; }
.kafel-gracza .wyrzuc:hover { color: var(--czerwony); }
.pusto { color: var(--tekst-drugi); font-size: 1.2em; text-align: center; padding: 2em 1em; }
.pusto .duch-pusto { font-size: 4em; display: block; margin-bottom: 0.2em; }

.wybor-gier { padding: 1.2em 1.4em; display: flex; flex-direction: column; gap: 0.9em; }
.wybor-gier .naglowek-wyboru { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.wybor-gier h3 { margin: 0; font-size: 1.2em; white-space: nowrap; }
.zestawy { display: flex; flex-wrap: wrap; gap: 0.6em; }
.zestaw { border: 1px solid var(--obramowanie-jasne); background: var(--wglebienie); color: var(--tekst); border-radius: 2em; padding: 0.45em 1em; font-weight: 700; font-size: 0.9em; }
.zestaw.wybrany { background: var(--akcent-poswiata); border-color: var(--akcent); color: var(--akcent-jasny); }
.lista-gier { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5em, 1fr)); gap: 0.5em; }
.gra-wybor { display: flex; align-items: center; gap: 0.5em; padding: 0.45em 0.7em; border-radius: 0.7em; background: var(--wglebienie); border: 1px solid var(--obramowanie); color: var(--tekst-drugi); font-size: 0.88em; font-weight: 700; text-align: left; min-width: 0; }
.gra-wybor .ik { font-size: 1.35em; }
.gra-wybor span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gra-wybor.wybrana { color: var(--tekst); border-color: var(--akcent); background: linear-gradient(90deg, rgba(255,122,24,0.18), rgba(255,122,24,0.04)); }
.wybor-gier .start { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.wybor-gier .start .przycisk { font-size: 1.3em; }
.wybor-gier .podpowiedz { color: var(--tekst-drugi); font-size: 0.95em; }

.zapowiedz { flex: 1; display: grid; grid-template-columns: 1fr 26em; gap: 2em; align-items: center; }
.zapowiedz-glowna { display: flex; flex-direction: column; gap: 1.2em; align-items: flex-start; }
.zapowiedz .numer { font-size: 1.2em; color: var(--tekst-drugi); font-weight: 700; display: flex; gap: 0.8em; align-items: center; }
.zapowiedz .ikona-gry { font-size: 8em; line-height: 1; filter: drop-shadow(0 0 0.3em rgba(255,122,24,0.4)); }
.zapowiedz h1 { font-size: 5em; margin: 0; line-height: 1.02; }
.zapowiedz ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.7em; counter-reset: zasada; }
.zapowiedz li { font-size: 1.6em; display: flex; gap: 0.7em; align-items: baseline; counter-increment: zasada; }
.zapowiedz li::before { content: counter(zasada); flex-shrink: 0; width: 1.6em; height: 1.6em; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--akcent); color: #1a0b00; font-weight: 900; font-size: 0.75em; transform: translateY(-0.1em); }
.zapowiedz-gotowi { padding: 1.4em; display: flex; flex-direction: column; gap: 1em; align-self: stretch; justify-content: center; }
.zapowiedz-gotowi h3 { margin: 0; font-size: 1.3em; display: flex; justify-content: space-between; }
.gotowi-lista { display: flex; flex-wrap: wrap; gap: 0.6em; }
.gotowi-lista .awatar { font-size: 1.15em; transition: filter 0.3s, transform 0.3s; filter: grayscale(1) brightness(0.45); }
.gotowi-lista .awatar.gotowy { filter: none; transform: scale(1.08); }
.licznik-duzy { font-family: var(--font-tytul); font-size: 3.4em; color: var(--akcent-jasny); text-align: center; line-height: 1; }
.podwojne-baner { font-family: var(--font-tytul); font-size: 1.4em; color: #1a0b00; background: linear-gradient(90deg, var(--akcent-jasny), var(--akcent)); padding: 0.3em 0.9em; border-radius: 0.5em; animation: puls 1s ease-in-out infinite; }

.wyniki { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.2em; }
.wyniki h1 { margin: 0; font-size: 3.2em; text-align: center; }
.tabela-wynikow { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0.55em; max-width: 64em; width: 100%; margin: 0 auto; }
.wiersz-wyniku { display: grid; grid-template-columns: 3em auto 1fr auto 7em; align-items: center; gap: 1em; padding: 0.55em 1em; border-radius: 0.9em; background: var(--karta); border: 1px solid var(--obramowanie); animation: wjazd 0.5s cubic-bezier(.2,.9,.3,1.2) both; }
.wiersz-wyniku.pierwszy { border-color: var(--akcent); background: linear-gradient(90deg, rgba(255,122,24,0.22), var(--karta) 60%); }
.wiersz-wyniku .miejsce { font-family: var(--font-tytul); font-size: 1.6em; color: var(--tekst-drugi); text-align: center; }
.wiersz-wyniku.pierwszy .miejsce { color: var(--akcent-jasny); }
.wiersz-wyniku .nick { font-size: 1.35em; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wiersz-wyniku .zdobyte { font-weight: 800; color: var(--zombie); font-size: 1.2em; }
.wiersz-wyniku .zdobyte.zero { color: var(--tekst-trzeci); }
.wiersz-wyniku .razem { font-family: var(--font-tytul); font-size: 1.5em; text-align: right; }
.wiersz-wyniku .zmiana { font-size: 0.8em; margin-left: 0.4em; }
.wiersz-wyniku .zmiana.gora { color: var(--zombie); }
.wiersz-wyniku .zmiana.dol { color: #ff8a8a; }
.tabela-wynikow.gesta .wiersz-wyniku { padding: 0.3em 0.9em; }
.tabela-wynikow.gesta .wiersz-wyniku .awatar { font-size: 0.8em; }

.final { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 1em; }
.final h1 { margin: 0 0 0.6em; font-size: 3.6em; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.4em; flex: 1; min-height: 0; padding-bottom: 0.5em; overflow: hidden; }
.podium-miejsce { display: flex; flex-direction: column; align-items: center; gap: 0.6em; width: 15em; }
.podium-miejsce .awatar { font-size: 1.8em; }
.podium-miejsce.m1 .awatar { font-size: 2.3em; }
.podium-miejsce .nick { font-size: 1.6em; font-weight: 900; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-miejsce .pkt { color: var(--tekst-drugi); font-size: 1.2em; font-weight: 700; }
.podium-miejsce .blok { width: 100%; border-radius: 0.8em 0.8em 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 0.4em; font-family: var(--font-tytul); font-size: 3em; color: rgba(0,0,0,0.55); }
.podium-miejsce.m1 .blok { height: 5.6em; background: linear-gradient(180deg, var(--akcent-jasny), var(--akcent) 60%, #a8480a); }
.podium-miejsce.m2 .blok { height: 3.8em; background: linear-gradient(180deg, #c9bfe6, #8d82ad); }
.podium-miejsce.m3 .blok { height: 2.6em; background: linear-gradient(180deg, #a6e86b, #5f9b25); }
.podium-miejsce .korona { font-size: 2.2em; margin-bottom: -0.5em; animation: kolysanie 2s ease-in-out infinite; }
.final .reszta { display: flex; flex-wrap: wrap; gap: 0.6em 1.4em; justify-content: center; color: var(--tekst-drugi); font-size: 1.1em; }
.final .akcje { display: flex; gap: 1em; }

.tv-sterowanie { position: fixed; right: 1.2em; bottom: 1em; z-index: 40; display: flex; gap: 0.6em; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
body.mysz-aktywna .tv-sterowanie, .tv-sterowanie:hover, .tv-sterowanie:focus-within { opacity: 1; pointer-events: auto; }
body.tv:not(.mysz-aktywna) { cursor: none; }

.komunikat { position: fixed; left: 50%; top: 1.2em; transform: translateX(-50%); z-index: 100; background: #2a1010; border: 1px solid var(--czerwony); color: #ffd0d0; padding: 0.7em 1.2em; border-radius: 0.8em; font-weight: 700; box-shadow: 0 0.5em 2em rgba(0,0,0,0.5); max-width: calc(100vw - 2em); text-align: center; }
.komunikat.info { background: #1d1530; border-color: var(--fiolet); color: #e4d8ff; }
.rozlaczony { position: fixed; inset: 0; z-index: 90; background: rgba(5, 3, 9, 0.8); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.6em; font-size: 1.3em; font-weight: 800; text-align: center; padding: 1em; }
.rozlaczony .duch { font-size: 3em; animation: unoszenie 2s ease-in-out infinite; }

.plansza { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1em; }
.plansza-gora { display: flex; align-items: center; justify-content: space-between; gap: 1.5em; }
.plansza-gora h2 { margin: 0; font-size: 2em; display: flex; align-items: center; gap: 0.5em; }
.plansza-gora .czas { font-family: var(--font-tytul); font-size: 2.6em; color: var(--akcent-jasny); min-width: 2.2em; text-align: right; }
.odliczanie-start { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.3em; }
.odliczanie-start .cyfra { font-family: var(--font-tytul); font-size: 14em; line-height: 1; color: var(--akcent); text-shadow: 0 0 0.2em rgba(255,122,24,0.6); animation: puls 1s ease-in-out infinite; }
.odliczanie-start .opis { font-size: 2em; font-weight: 800; color: var(--tekst-drugi); }

/* ================= TELEFON ================= */

body.telefon {
    min-height: 100svh;
    overscroll-behavior: none;
    font-size: 16px;
    user-select: none;
    -webkit-user-select: none;
}
body.telefon input, body.telefon textarea { user-select: text; -webkit-user-select: text; }
.tel-ramka { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; min-height: 100svh; display: flex; flex-direction: column; padding: 0.7rem 0.9rem calc(0.9rem + env(safe-area-inset-bottom)); gap: 0.8rem; }
.tel-gora { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 2.8rem; }
.tel-ja { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.tel-ja .awatar { font-size: 0.85rem; }
.tel-ja .nick { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tel-ja .pkt { font-size: 0.8rem; color: var(--tekst-drugi); }
.tel-kod { font-size: 0.75rem; color: var(--tekst-drugi); text-align: right; flex-shrink: 0; }
.tel-kod b { display: block; color: var(--akcent-jasny); font-size: 1.15rem; letter-spacing: 0.1em; font-family: var(--font-tytul); }
.tel-tresc { flex: 1; display: flex; flex-direction: column; gap: 0.9rem; min-height: 0; }
.tel-srodek { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.8rem; padding: 0.5rem 0; }
.tel-srodek .duza-ikona { font-size: 5rem; line-height: 1; }
.tel-srodek h2 { margin: 0; font-size: 1.6rem; line-height: 1.15; }
.tel-srodek p { margin: 0; color: var(--tekst-drugi); font-size: 1.05rem; line-height: 1.4; }
.tel-reakcje { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.3rem; padding: 0.45rem; }
.tel-reakcje button { font-size: 1.45rem; padding: 0.35rem 0; border-radius: 0.6rem; border: none; background: var(--wglebienie); touch-action: manipulation; line-height: 1; }
.tel-reakcje button:active { transform: scale(1.25); background: var(--akcent-poswiata); }
.tel-podpis { text-align: center; font-size: 0.78rem; color: var(--tekst-trzeci); }

.formularz { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.1rem; }
.formularz h1 { margin: 0; font-size: 2rem; text-align: center; line-height: 1.1; }
.formularz label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 700; font-size: 0.9rem; color: var(--tekst-drugi); }
.formularz input {
    font-size: 16px; padding: 0.85rem 0.9rem; border-radius: 0.7rem; border: 1px solid var(--obramowanie-jasne);
    background: var(--wglebienie); color: var(--tekst); font-weight: 700; outline: none; width: 100%;
}
.formularz input:focus { border-color: var(--akcent); box-shadow: 0 0 0 3px var(--akcent-poswiata); }
.formularz input.kod-pole { text-transform: uppercase; letter-spacing: 0.35em; font-size: 1.6rem; text-align: center; font-family: var(--font-tytul); padding: 0.6rem; }
.wybor-awatara { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.35rem; }
.wybor-awatara button { aspect-ratio: 1; font-size: 1.45rem; border-radius: 0.6rem; border: 2px solid transparent; background: var(--wglebienie); padding: 0; touch-action: manipulation; }
.wybor-awatara button.wybrany { border-color: var(--akcent); background: var(--akcent-poswiata); transform: scale(1.06); }
.formularz .przycisk { font-size: 1.2rem; padding: 0.95rem; }

.tel-duzy-przycisk { width: 100%; font-size: 1.35rem; padding: 1.1rem; }
.lobby-tel-gracze { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.lobby-tel-gracze .awatar { font-size: 0.8rem; }
.panel-vip { padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; }
.panel-vip h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: 0.4rem; }
.panel-vip .zestawy { gap: 0.4rem; }
.panel-vip .zestaw { font-size: 0.85rem; padding: 0.5rem 0.8rem; }
.panel-vip .lista-gier { grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.panel-vip .gra-wybor { font-size: 0.8rem; padding: 0.5rem 0.5rem; }

.licznik-tel { font-family: var(--font-tytul); font-size: 1.5rem; color: var(--akcent-jasny); }
.wynik-tel { font-family: var(--font-tytul); font-size: 3rem; line-height: 1; }
.wynik-tel.dobrze { color: var(--zombie); }
.wynik-tel.zle { color: #ff7676; }

.siatka-odpowiedzi { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 0.6rem; min-height: 18rem; }
.odp-przycisk {
    border: none; border-radius: 1rem; background: var(--odp); color: #fff; font-weight: 800; font-size: 1.05rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.6rem;
    box-shadow: inset 0 -0.35rem 0 rgba(0,0,0,0.25); text-shadow: 0 1px 2px rgba(0,0,0,0.45); touch-action: manipulation;
    line-height: 1.2; word-break: break-word; min-height: 0;
}
.odp-przycisk .znak { font-size: 2rem; line-height: 1; }
.odp-przycisk:active { transform: scale(0.97); }
.odp-przycisk.wygaszony { filter: grayscale(1) brightness(0.4); }
.odp-przycisk.wybrany { outline: 4px solid #fff; outline-offset: -4px; }

.wybor-startu { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.kafel-startu { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.2rem; text-decoration: none; color: var(--tekst); transition: transform 0.15s, border-color 0.15s; }
.kafel-startu:hover { transform: translateY(-3px); border-color: var(--akcent); }
.kafel-startu .ik { font-size: 2.6rem; }
.kafel-startu b { font-size: 1.25rem; }
.kafel-startu span:last-child { color: var(--tekst-drugi); font-size: 0.95rem; line-height: 1.4; }

@media (max-width: 640px) {
    .wybor-startu { grid-template-columns: 1fr; }
}

.nagrobek {
    position: relative; display: inline-block; width: 0.8em; height: 1em; overflow: hidden;
    border-radius: 0.4em 0.4em 0.06em 0.06em; vertical-align: bottom;
    background: linear-gradient(180deg, #8b8798, #57536a); color: transparent;
    box-shadow: inset -0.05em -0.05em 0 rgba(0,0,0,0.3);
}
.nagrobek::after {
    content: 'RIP'; position: absolute; left: 0; right: 0; top: 30%; text-align: center;
    font-family: var(--font-tytul); font-weight: 900; font-size: 0.22em; color: #2a2735; letter-spacing: 0.02em;
}
body.telefon .dekoracje .ksiezyc { display: none; }
