*, *::before, *::after { box-sizing: border-box; }

:root {
    --tlo: #06140f;
    --tlo-glebokie: #030b08;
    --karta: #10261f;
    --karta-jasna: #17332a;
    --wglebienie: #0b1d17;
    --obramowanie: #24493c;
    --obramowanie-jasne: #36695a;
    --akcent: #e63946;
    --akcent-jasny: #ff7b84;
    --akcent-ciemny: #4a0d14;
    --akcent-poswiata: rgba(230, 57, 70, 0.16);
    --zloto: #ffd166;
    --zloto-jasne: #fff1c1;
    --fiolet: #7fd1ff;
    --fiolet-tlo: rgba(127, 209, 255, 0.14);
    --zombie: #3ddc97;
    --zombie-tlo: rgba(61, 220, 151, 0.14);
    --czerwony: #ff4d5e;
    --czerwony-tlo: rgba(255, 77, 94, 0.14);
    --tekst: #f4fbf7;
    --tekst-drugi: #a9c2b8;
    --tekst-trzeci: #5d7a6f;
    --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --font-tytul: 'Segoe UI Black', 'Arial Black', 'Segoe UI', system-ui, sans-serif;
    --k0: #ff4d5e; --k1: #ffd166; --k2: #3ddc97; --k3: #7fd1ff; --k4: #f472b6; --k5: #c084fc;
    --k6: #fb923c; --k7: #2dd4bf; --k8: #a3e635; --k9: #60a5fa; --k10: #fda4af; --k11: #e5e7eb;
    --k12: #facc15; --k13: #34d399; --k14: #f87171; --k15: #93c5fd;
    --o0: #e63946; --o1: #2a9d8f; --o2: #e9a23b; --o3: #3a86ff;
}

html, body { margin: 0; padding: 0; }

body {
    background: radial-gradient(ellipse at 50% -10%, #12384a 0%, #0a2230 30%, #071a14 62%, var(--tlo) 100%) 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); }
.k12 { --kg: var(--k12); } .k13 { --kg: var(--k13); } .k14 { --kg: var(--k14); } .k15 { --kg: var(--k15); }

.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%, #10261f), #0a1a14 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: #fff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    background: linear-gradient(180deg, #ff6b75, var(--akcent) 60%, #c22735);
    box-shadow: 0 0.25em 0 #7a1520, 0 0.4em 1.2em rgba(230, 57, 70, 0.3), inset 0 0.08em 0 rgba(255, 255, 255, 0.35);
    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 #7a1520; }
.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 #04100c;
    border: 1px solid var(--obramowanie-jasne);
}
.przycisk.drugi:active { box-shadow: 0 0.07em 0 #04100c; }
.przycisk.drugi { text-shadow: none; }
.przycisk.maly { padding: 0.45em 0.9em; font-size: 0.85em; border-radius: 0.6em; }

.karta {
    background: linear-gradient(180deg, rgba(23, 51, 42, 0.95), rgba(14, 34, 28, 0.95));
    position: relative;
    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, #fffbe9 0%, var(--zloto) 50%, #d99a1b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0.07em 0 #7a1520) drop-shadow(0 0 0.45em rgba(255, 209, 102, 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: repeating-linear-gradient(-45deg, #e63946 0 0.7em, #fff 0.7em 1.4em);
    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(230, 57, 70, 0.35);
}
.plakietka.fiolet { background: var(--fiolet-tlo); color: #bfe7ff; border-color: rgba(127, 209, 255, 0.4); }
.plakietka.zielona { background: var(--zombie-tlo); color: var(--zombie); border-color: rgba(61, 220, 151, 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; }
canvas.snieg { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
body.efekty-wylaczone canvas.snieg { display: none; }
.dekoracje .zorza {
    position: absolute; left: -20%; right: -20%; top: -10vh; height: 55vh; opacity: 0.35;
    background: radial-gradient(ellipse 40% 60% at 30% 40%, rgba(61, 220, 151, 0.35), transparent 70%),
                radial-gradient(ellipse 35% 50% at 70% 30%, rgba(127, 209, 255, 0.25), transparent 70%);
    animation: zorza 26s ease-in-out infinite alternate;
}
.dekoracje .gwiazdy { position: absolute; inset: 0; }
.dekoracje .gwiazdy i { position: absolute; width: 0.35vmin; height: 0.35vmin; border-radius: 50%; background: #fff; box-shadow: 0 0 0.6vmin #fff; animation: migotanie-gwiazdy 3s ease-in-out infinite; animation-delay: var(--opozn); }
.dekoracje .ksiezyc {
    position: absolute; top: 5vh; right: 36vw; width: 11vmin; height: 11vmin; border-radius: 50%;
    background: radial-gradient(circle at 38% 38%, #ffffff, #fdf6dc 55%, #e9dcb0 100%);
    box-shadow: 0 0 5vmin rgba(255, 248, 220, 0.4), 0 0 14vmin rgba(127, 209, 255, 0.15);
    opacity: 0.55;
}
.dekoracje .sanie { position: absolute; top: 14vh; left: 0; display: flex; gap: 0.2em; font-size: 4vmin; white-space: nowrap; animation: sanie 38s linear infinite; animation-delay: -6s; opacity: 0.85; filter: drop-shadow(0 0 0.6vmin rgba(255, 209, 102, 0.6)); }
.dekoracje .sanie span:last-child { transform: scaleX(-1); display: inline-block; }
.dekoracje .lampki { position: absolute; left: -1vw; right: -1vw; top: -0.6vmin; height: 5vmin; display: flex; justify-content: space-between; border-top: 0.35vmin solid #0d2e22; border-radius: 0 0 50% 50% / 0 0 1.2vmin 1.2vmin; }
.dekoracje .lampki i { position: relative; width: 1.3vmin; height: 2.1vmin; margin-top: 0.4vmin; border-radius: 50% 50% 45% 45%; background: var(--lk); }
.dekoracje .lampki i:nth-child(even) { margin-top: 1.4vmin; }
.dekoracje .lampki i::before { content: ''; position: absolute; left: 25%; right: 25%; top: -0.6vmin; height: 0.7vmin; background: #3a4a42; border-radius: 0.2vmin; }
.dekoracje .lampki i::after { content: ''; position: absolute; inset: -1.6vmin; border-radius: 50%; background: radial-gradient(circle, var(--lk) 0%, transparent 65%); opacity: 0.55; animation: lampka 2.2s ease-in-out infinite; animation-delay: var(--opozn); }
.dekoracje .lampki .l0 { --lk: #ff4d5e; } .dekoracje .lampki .l1 { --lk: #ffd166; } .dekoracje .lampki .l2 { --lk: #3ddc97; }
.dekoracje .lampki .l3 { --lk: #7fd1ff; } .dekoracje .lampki .l4 { --lk: #f472b6; }
.dekoracje .zaspa {
    position: absolute; left: 0; right: 0; bottom: 0; height: 13vh; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4vw 4vh;
    font-size: 7vmin; opacity: 0.5;
    background: radial-gradient(ellipse 30% 70% at 10% 100%, #dfeef5 60%, transparent 61%),
                radial-gradient(ellipse 35% 60% at 50% 105%, #e8f4fa 60%, transparent 61%),
                radial-gradient(ellipse 30% 75% at 92% 100%, #dfeef5 60%, transparent 61%);
}
.dekoracje .zaspa .c2, .dekoracje .zaspa .c4 { font-size: 0.75em; }
.dekoracje .zaspa .dom { font-size: 0.8em; }
body.efekty-lekkie .dekoracje .zorza, body.efekty-wylaczone .dekoracje .zorza,
body.efekty-wylaczone .dekoracje .sanie, body.efekty-wylaczone .dekoracje .lampki i::after,
body.efekty-wylaczone .dekoracje .gwiazdy i { animation: none; }
body.efekty-lekkie .dekoracje .lampki i::after { animation-duration: 4s; }
@keyframes zorza { 0% { transform: translateX(-4%) skewX(-4deg); } 100% { transform: translateX(4%) skewX(4deg); } }
@keyframes migotanie-gwiazdy { 0%, 100% { opacity: 0.25; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes lampka { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
@keyframes sanie { 0% { transform: translate(-25vw, 4vh) rotate(-4deg); } 45% { transform: translate(55vw, -3vh) rotate(3deg); } 70%, 100% { transform: translate(125vw, -8vh) rotate(-2deg); } }

.karta::before {
    content: ''; position: absolute; left: 0.6em; right: 0.6em; top: -0.32em; height: 0.75em; pointer-events: none;
    background: radial-gradient(ellipse 18% 100% at 12% 100%, #f2f8fb 55%, transparent 58%),
                radial-gradient(ellipse 26% 100% at 42% 100%, #ffffff 55%, transparent 58%),
                radial-gradient(ellipse 20% 100% at 70% 100%, #eef6fa 55%, transparent 58%),
                radial-gradient(ellipse 16% 100% at 92% 100%, #ffffff 55%, transparent 58%);
    filter: drop-shadow(0 0.08em 0.1em rgba(0, 0, 0, 0.25));
    opacity: 0.92;
}
body.telefon .tel-reakcje.karta::before, .odp-przycisk::before { display: none; }

/* ================= 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: 2.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(230, 57, 70, 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(230,57,70,0.18), rgba(230,57,70,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(230,57,70,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: #3a0a10; 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: #3a0a10; 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(230,57,70,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 { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--wiersze, 8), auto); grid-auto-flow: column; align-content: start; gap: 0.45em 1.4em; max-width: 100em; }
.tabela-wynikow.gesta .wiersz-wyniku { padding: 0.3em 0.9em; grid-template-columns: 2.4em auto 1fr auto 5em; gap: 0.7em; }
.tabela-wynikow.gesta .wiersz-wyniku .nick { font-size: 1.15em; }
.tabela-wynikow.gesta .wiersz-wyniku .razem { font-size: 1.3em; }
.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(--zloto-jasne), var(--zloto) 55%, #c58a10); }
.podium-miejsce.m2 .blok { height: 3.8em; background: linear-gradient(180deg, #f1f5f9, #a8b8c4); }
.podium-miejsce.m3 .blok { height: 2.6em; background: linear-gradient(180deg, #ff8a93, #b8212f); }
.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: #0f2a36; border-color: var(--fiolet); color: #e0f4ff; }
.rozlaczony { position: fixed; inset: 0; z-index: 90; background: rgba(3, 11, 8, 0.82); 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(230,57,70,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: 1.4rem 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; }

/* ================= ŚWIĄTECZNE PARTY: ZDALNA GRA ================= */

.tv-sterowanie.stale { opacity: 0.55; pointer-events: auto; }
.tv-sterowanie.stale:hover, body.mysz-aktywna .tv-sterowanie.stale { opacity: 1; }
.tv-sterowanie { flex-wrap: wrap; justify-content: flex-end; max-width: 60vw; }
.tv-start .kod-start { font-family: var(--font-tytul); color: var(--zloto); letter-spacing: 0.12em; }
.formularz-kodu { display: flex; gap: 0.8em; align-items: center; }
.formularz-kodu input { font-family: var(--font-tytul); font-size: 2.6em; width: 5.2em; text-align: center; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.15em 0.3em; border-radius: 0.3em; border: 2px solid var(--obramowanie-jasne); background: var(--wglebienie); color: var(--tekst); outline: none; }
.formularz-kodu input:focus { border-color: var(--zloto); }
.formularz-kodu .przycisk { font-size: 1.5em; }
.lobby-zaproszenie { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: 0.9em 1.2em; }
.lobby-zaproszenie div { display: flex; flex-direction: column; gap: 0.2em; min-width: 0; }
.lobby-zaproszenie span { color: var(--zloto); font-weight: 800; font-size: 1.1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-jak { padding: 1.2em 1.6em; display: flex; flex-direction: column; gap: 0.6em; }
.lobby-jak h3 { margin: 0; font-size: 1.4em; }
.lobby-jak ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 0.4em; font-size: 1.25em; color: var(--tekst-drugi); }
.lobby-jak .czekamy { font-size: 1.5em; font-weight: 900; color: var(--zloto); text-align: center; margin-top: 0.4em; }
.siatka-graczy.gesta { grid-template-columns: repeat(auto-fill, minmax(10em, 1fr)); gap: 0.5em; }
.siatka-graczy.gesta .kafel-gracza { padding: 0.4em 0.6em; }
.siatka-graczy.gesta .awatar { font-size: 0.85em; }
.okno-tla { position: fixed; inset: 0; z-index: 120; background: rgba(3, 11, 8, 0.8); display: flex; align-items: center; justify-content: center; }
.okno { padding: 1.8em; display: flex; flex-direction: column; align-items: center; gap: 1em; max-width: 34em; text-align: center; }
.okno h2 { margin: 0; font-size: 1.6em; }
.okno p { margin: 0; color: var(--tekst-drugi); font-size: 1.1em; line-height: 1.4; }
.okno .qr { width: 16em; height: 16em; background: #fff; border-radius: 0.8em; padding: 0.6em; }
.okno .qr img { width: 100%; height: 100%; display: block; }
.adres-ekranu { font-weight: 900; color: var(--zloto); font-size: 1.05rem; word-break: break-all; background: var(--wglebienie); border: 1px dashed var(--obramowanie-jasne); border-radius: 0.6rem; padding: 0.45rem 0.7rem; user-select: text; -webkit-user-select: text; }
.wybor-startu.trzy { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .wybor-startu.trzy { grid-template-columns: 1fr; } }
.lobby-dolacz .qr { box-shadow: 0 0 0 0.35em var(--zloto), 0 0 3em rgba(255, 209, 102, 0.35); }
.wiersz-wyniku.pierwszy { border-color: var(--zloto); background: linear-gradient(90deg, rgba(255, 209, 102, 0.2), var(--karta) 60%); }
.wiersz-wyniku.pierwszy .miejsce { color: var(--zloto); }
.licznik-duzy, .plansza-gora .czas, .tv-kod-maly b, .tel-kod b, .licznik-tel { color: var(--zloto); }
.zapowiedz li::before { background: var(--zloto); color: #3a2600; }
.zapowiedz .ikona-gry { filter: drop-shadow(0 0 0.3em rgba(255, 209, 102, 0.45)); }
.podwojne-baner { color: #3a2600; background: linear-gradient(90deg, var(--zloto-jasne), var(--zloto)); }
.zestaw.wybrany { background: rgba(255, 209, 102, 0.14); border-color: var(--zloto); color: var(--zloto); }
.gra-wybor.wybrana { border-color: var(--zloto); background: linear-gradient(90deg, rgba(255, 209, 102, 0.16), rgba(255, 209, 102, 0.03)); }
.wybor-awatara button.wybrany { border-color: var(--zloto); background: rgba(255, 209, 102, 0.15); }
.formularz input:focus { border-color: var(--zloto); box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.2); }
.bombka { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--kb, #e63946) 35%, color-mix(in srgb, var(--kb, #e63946) 55%, #000) 100%); position: relative; vertical-align: middle; }
.bombka::before { content: ''; position: absolute; left: 38%; right: 38%; top: -0.14em; height: 0.18em; background: #d9b44a; border-radius: 0.05em; }
@media (prefers-reduced-motion: reduce) {
    .kolysanie, .unoszenie, .puls, .dekoracje .sanie, .dekoracje .zorza { animation: none !important; }
}
