.neon-page {
    padding-bottom: 28px;
}

.neon-page [hidden] {
    display: none !important;
}

.neon-gate {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 10px 0 8px;
}

.neon-hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(2.4rem, 9vw, 4.6rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.neon-hero h1 span {
    color: #ff4f9a;
    text-shadow: 0 0 28px rgba(255, 79, 154, 0.55);
}

.neon-gate-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 79, 154, 0.3);
    border-radius: 24px;
    background:
        radial-gradient(120% 110% at 100% 0%, rgba(255, 79, 154, 0.18), transparent 58%),
        radial-gradient(100% 100% at 0% 100%, rgba(52, 224, 255, 0.12), transparent 55%),
        rgba(7, 9, 20, 0.82);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    overflow: hidden;
}

.neon-gate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(52, 224, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(52, 224, 255, 0.06) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    opacity: 0.55;
}

.neon-gate-card > * {
    position: relative;
    z-index: 1;
}

.neon-gate-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.neon-gate-head h2 {
    margin: 2px 0 0;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.neon-kicker {
    color: #34e0ff;
    font-size: 0.55rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.neon-level {
    padding: 5px 10px;
    border: 1px solid rgba(255, 212, 121, 0.42);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.62rem;
    font-weight: 900;
}

.neon-gate-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.neon-gate-stats > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.neon-gate-stats span {
    color: var(--muted);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.neon-gate-stats strong {
    font-size: 0.76rem;
    line-height: 1.25;
}

.neon-preview {
    padding: 12px;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 16px;
    background: rgba(52, 224, 255, 0.05);
}

.neon-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.neon-preview-head strong {
    color: #34e0ff;
    font-size: 0.64rem;
    font-weight: 900;
}

.neon-preview-intro {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.4;
}

.neon-gate-links {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0 0;
}

.neon-gate-links a {
    padding: 4px 7px;
    border: 1px solid rgba(52, 224, 255, 0.25);
    border-radius: 999px;
    background: rgba(52, 224, 255, 0.06);
    color: #b9f3ff;
    font-size: 0.56rem;
    font-weight: 800;
    text-decoration: none;
}

.neon-gate-links a:hover {
    border-color: rgba(52, 224, 255, 0.65);
    color: #fff;
}

.neon-gate-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.neon-gate-footer .neon-gate-links {
    flex: 1 1 280px;
}

.neon-level-tiles-wrap {
    position: relative;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-top: 8px;
}

.neon-level-tiles-label {
    color: var(--muted);
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.neon-level-tiles {
    display: grid;
    grid-template-columns: repeat(15, 20px);
    gap: 3px;
}

.neon-level-tile {
    width: 20px;
    height: 18px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 4px;
    background: rgba(52, 224, 255, 0.06);
    color: #8cecff;
    font: inherit;
    font-size: 0.44rem;
    font-weight: 900;
    line-height: 1;
    cursor: help;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.neon-level-tile.neg {
    border-color: rgba(255, 79, 154, 0.32);
    background: rgba(255, 79, 154, 0.07);
    color: #ff9ad5;
}

.neon-level-tile.pos {
    border-color: rgba(67, 255, 176, 0.3);
    background: rgba(67, 255, 176, 0.06);
    color: #9bffd1;
}

.neon-level-tile:hover,
.neon-level-tile:focus-visible,
.neon-level-tile.active {
    transform: translateY(-2px) scale(1.15);
    border-color: #fff;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    z-index: 2;
    outline: none;
}

@media (max-width: 620px) {
    .neon-level-tiles {
        grid-template-columns: repeat(10, 20px);
    }
}

.neon-lore-open {
    padding: 4px 7px;
    border: 1px solid rgba(255, 212, 121, 0.4);
    border-radius: 999px;
    background: rgba(255, 212, 121, 0.08);
    color: #ffe9bb;
    font: inherit;
    font-size: 0.56rem;
    font-weight: 800;
    cursor: pointer;
}

.neon-lore-open:hover {
    border-color: rgba(255, 212, 121, 0.85);
    color: #fff;
}

.neon-lore-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(2, 4, 10, 0.88);
    backdrop-filter: blur(5px);
}

.neon-lore-card {
    position: relative;
    width: min(1000px, 96vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid rgba(52, 224, 255, 0.4);
    border-radius: 20px;
    background:
        radial-gradient(110% 90% at 100% 0%, rgba(255, 79, 154, 0.13), transparent 60%),
        radial-gradient(90% 80% at 0% 100%, rgba(52, 224, 255, 0.1), transparent 55%),
        rgba(6, 8, 18, 0.98);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.neon-lore-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.neon-lore-card h2 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
}

.neon-lore-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.62rem;
}

.neon-lore-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.neon-lore-tabs button {
    padding: 5px 9px;
    border: 1px solid rgba(52, 224, 255, 0.25);
    border-radius: 999px;
    background: rgba(52, 224, 255, 0.05);
    color: #b9f3ff;
    font: inherit;
    font-size: 0.58rem;
    font-weight: 800;
    cursor: pointer;
}

.neon-lore-tabs button.active {
    border-color: rgba(255, 212, 121, 0.7);
    background: rgba(255, 212, 121, 0.14);
    color: #ffe9bb;
}

.neon-lore-body {
    overflow: auto;
    padding-right: 4px;
    color: #d7e6ee;
    font-size: 0.62rem;
    line-height: 1.5;
}

.neon-lore-section {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.18);
}

.neon-lore-section h3 {
    margin: 0 0 5px;
    color: #8cecff;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.neon-lore-section p {
    margin: 0 0 5px;
}

.neon-lore-section ul {
    margin: 4px 0 0;
    padding-left: 16px;
}

.neon-lore-section li {
    margin-bottom: 3px;
}

.neon-lore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 8px;
}

.neon-lore-mob {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.2);
}

.neon-lore-mob-head {
    display: flex;
    align-items: center;
    gap: 7px;
}

.neon-lore-mob-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(52, 224, 255, 0.08);
    font-size: 1.25rem;
}

.neon-lore-mob-head strong {
    color: #fff;
    font-size: 0.68rem;
}

.neon-lore-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(52, 224, 255, 0.1);
    color: #8cecff;
    font-size: 0.5rem;
    font-weight: 800;
}

.neon-lore-badge.neg {
    background: rgba(255, 79, 154, 0.12);
    color: #ff9ad5;
}

.neon-lore-badge.pos {
    background: rgba(67, 255, 176, 0.1);
    color: #9bffd1;
}

.neon-lore-mob-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.neon-lore-mob-stats span {
    padding: 3px 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: #b9cbd6;
    font-size: 0.53rem;
}

.neon-lore-mob-stats strong {
    color: #fff;
}

.neon-lore-mob p {
    margin: 0;
    color: rgba(215, 230, 238, 0.68);
    font-size: 0.55rem;
}

.neon-lore-tile {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.neon-lore-tile-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.neon-lore-tile strong {
    display: block;
    color: #fff;
    font-size: 0.62rem;
}

.neon-lore-tile span {
    color: rgba(215, 230, 238, 0.7);
    font-size: 0.55rem;
}

.neon-lore-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.58rem;
}

.neon-lore-table th,
.neon-lore-table td {
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
}

.neon-lore-table th {
    color: #8cecff;
    font-size: 0.52rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 700px) {
    .neon-lore-modal {
        padding: 8px;
    }

    .neon-lore-card {
        padding: 14px 11px;
        max-height: 94vh;
    }

    .neon-lore-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.neon-preview-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.neon-preview-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

.neon-preview-row span {
    color: var(--muted);
    font-size: 0.52rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.neon-preview-row strong {
    color: #e9f9ff;
    font-size: 0.88rem;
    font-weight: 900;
}

.neon-preview-row small {
    color: rgba(233, 249, 255, 0.46);
    font-size: 0.54rem;
    line-height: 1.25;
}

@media (max-width: 420px) {
    .neon-preview-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

.neon-spec-panel {
    padding: 12px;
    border: 1px solid rgba(52, 224, 255, 0.26);
    border-radius: 14px;
    background: rgba(52, 224, 255, 0.05);
}

.neon-spec-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.neon-spec-head strong {
    font-size: 0.76rem;
}

.neon-spec-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.62rem;
    line-height: 1.35;
}

.neon-spec-note {
    margin-top: 8px;
    color: #b9b2ff;
    font-size: 0.62rem;
    line-height: 1.35;
}

.neon-gate-error {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid rgba(255, 100, 100, 0.35);
    border-radius: 10px;
    background: rgba(255, 70, 70, 0.1);
    color: #ffb3b3;
    font-size: 0.68rem;
}

.neon-enter {
    justify-content: center;
    padding: 13px 18px;
    font-size: 0.82rem;
}

.neon-gate-foot {
    margin: 0;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.4;
}

.neon-gate-warning {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid rgba(255, 95, 158, 0.35);
    border-radius: 12px;
    background: rgba(255, 95, 158, 0.08);
    color: #ffbdd5;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.4;
}

.neon-challenges {
    padding: 10px 11px;
    border: 1px solid rgba(255, 184, 77, 0.36);
    border-radius: 12px;
    background: rgba(255, 184, 77, 0.07);
}

.neon-challenges > strong {
    display: block;
    margin-bottom: 6px;
    color: #ffd479;
    font-size: 0.68rem;
    font-weight: 900;
}

.neon-challenge-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 235, 205, 0.8);
    font-size: 0.64rem;
    line-height: 1.4;
}

.neon-challenge-row:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.neon-challenge-row strong {
    color: #fff;
}

/* ===== Świat ===== */
.neon-world {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
}

.neon-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(6, 8, 18, 0.86);
}

.neon-hud-left,
.neon-hud-right {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.neon-hud-left {
    flex: 1 1 520px;
    flex-wrap: wrap;
}

.neon-hud-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.neon-status-badges {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 4px;
}

.neon-hp {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: clamp(110px, 32vw, 220px);
}

.neon-hp-label {
    color: var(--muted);
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.neon-hp-label strong {
    color: var(--text);
    font-size: 0.68rem;
}

.neon-hp-track {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.neon-hp-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #43ffb0, #34e0ff);
    transition: width 160ms linear;
}

.neon-badge {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 0.48rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.neon-badge.skull { border-color: rgba(255, 70, 70, 0.5); color: #ff8c8c; }
.neon-badge.invis { border-color: rgba(185, 178, 255, 0.5); color: #d6d2ff; }
.neon-badge.terrain { border-color: rgba(67, 255, 176, 0.5); color: #87ffd0; }
.neon-badge.drone { border-color: rgba(52, 224, 255, 0.5); color: #8cecff; }
.neon-badge.attack { border-color: rgba(255, 95, 158, 0.55); color: #ffb8d2; }
.neon-badge.crit { border-color: rgba(255, 212, 121, 0.7); color: #ffe3a3; }
.neon-badge.defense { border-color: rgba(52, 224, 255, 0.55); color: #9aeaff; }
.neon-badge.range { border-color: rgba(255, 212, 121, 0.5); color: #ffd479; }
.neon-badge.parry { border-color: rgba(67, 255, 176, 0.5); color: #87ffd0; }
.neon-badge.speed { border-color: rgba(185, 178, 255, 0.5); color: #d6d2ff; }
.neon-badge.down { border-color: rgba(255, 70, 70, 0.5); color: #ff8c8c; }
.neon-badge.level { border-color: rgba(255, 212, 121, 0.6); color: #ffe3a3; }

.neon-skillbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 2px;
}

.neon-skill-fixed {
    padding: 7px 10px;
    border: 1px solid rgba(255, 95, 158, 0.32);
    border-radius: 12px;
    background: rgba(6, 8, 18, 0.86);
}

.neon-skill-fixed.defense {
    border-color: rgba(52, 224, 255, 0.34);
}

.neon-skill-fixed-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: rgba(238, 240, 255, 0.78);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.neon-skill-fixed-top strong {
    color: #fff;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.neon-skill-fixed-track {
    display: block;
    height: 5px;
    margin-top: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.neon-skill-fixed-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff5f9e, #ff9ec4);
    transition: width 140ms linear;
}

.neon-skill-fixed.defense .neon-skill-fixed-track span {
    background: linear-gradient(90deg, #34e0ff, #87ffd0);
}

.neon-skill-fixed-text {
    display: block;
    margin-top: 3px;
    color: rgba(238, 240, 255, 0.55);
    font-size: 0.46rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.neon-online {
    color: var(--muted);
    font-size: 0.58rem;
    font-weight: 800;
    white-space: nowrap;
}

.neon-void-tier {
    padding: 4px 8px;
    border: 1px solid rgba(254, 202, 87, 0.35);
    border-radius: 999px;
    background: rgba(254, 202, 87, 0.1);
    color: #feca57;
    font-size: 0.58rem;
    font-weight: 900;
    white-space: nowrap;
}

.neon-world-bits {
    padding: 4px 8px;
    border: 1px solid rgba(52, 224, 255, 0.32);
    border-radius: 999px;
    background: rgba(52, 224, 255, 0.09);
    color: #8cecff;
    font-size: 0.58rem;
    font-weight: 900;
    white-space: nowrap;
}

.neon-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 34%, rgba(52, 224, 255, 0.14), transparent 42%),
        radial-gradient(circle at 12% 82%, rgba(255, 79, 154, 0.12), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(124, 108, 255, 0.13), transparent 38%),
        linear-gradient(180deg, #070b18, #04050c 68%, #090510);
    box-shadow:
        0 0 0 1px rgba(255, 79, 154, 0.08) inset,
        0 20px 60px rgba(0, 0, 0, 0.45);
}

.neon-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
        radial-gradient(rgba(52, 224, 255, 0.18) 1px, transparent 1px);
    background-size: 118px 118px, 173px 173px;
    background-position: 0 0, 42px 66px;
    opacity: 0.35;
    pointer-events: none;
}

#neon-canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: min(58vh, 520px);
    touch-action: none;
}

.neon-map-hint {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    max-width: 52%;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(5, 7, 15, 0.72);
    color: rgba(238, 240, 255, 0.7);
    font-size: 0.55rem;
    line-height: 1.3;
    pointer-events: none;
}

/* Lista terminali po lewej stronie mapy. */
.neon-terminals {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    width: min(200px, 52%);
    max-height: 46%;
    overflow-y: auto;
    padding: 7px 9px;
    border: 1px solid rgba(52, 224, 255, 0.24);
    border-radius: 10px;
    background: rgba(5, 7, 15, 0.8);
    pointer-events: auto;
    scrollbar-width: thin;
}

.neon-terminal-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.neon-terminal-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.52rem;
    line-height: 1.25;
}

.neon-terminal-row strong {
    color: #fff;
    font-size: 0.54rem;
}

.neon-terminal-row span:last-child {
    margin-left: auto;
    color: rgba(238, 240, 255, 0.6);
    white-space: nowrap;
}

.neon-terminal-row.busy span:last-child {
    color: #ffd479;
}

.neon-terminal-row.free span:last-child {
    color: #87ffd0;
}

.neon-terminal-dot {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #87ffd0;
    box-shadow: 0 0 6px rgba(135, 255, 208, 0.8);
}

.neon-terminal-row.busy .neon-terminal-dot {
    background: #ffd479;
    box-shadow: 0 0 6px rgba(255, 212, 121, 0.85);
}

.neon-dead {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 70, 70, 0.18), transparent 55%),
        rgba(3, 4, 10, 0.74);
    text-align: center;
    backdrop-filter: blur(2px);
}

.neon-dead strong {
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}

.neon-dead p {
    margin: 0;
    max-width: 320px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.neon-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

.neon-bottom-stats {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.neon-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(6, 8, 18, 0.82);
}

.neon-joystick {
    display: none;
    position: relative;
    flex: 0 0 auto;
    width: 118px;
    height: 118px;
    border: 1px solid rgba(52, 224, 255, 0.32);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 46%, rgba(52, 224, 255, 0.16), rgba(5, 7, 15, 0.6) 72%);
    box-shadow:
        inset 0 0 22px rgba(52, 224, 255, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.35);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.neon-joystick.active {
    border-color: rgba(52, 224, 255, 0.65);
    box-shadow:
        inset 0 0 26px rgba(52, 224, 255, 0.22),
        0 0 18px rgba(52, 224, 255, 0.2);
}

.neon-joystick-ring {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    pointer-events: none;
}

.neon-joystick-knob {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    border: 1px solid rgba(52, 224, 255, 0.72);
    border-radius: 50%;
    background: radial-gradient(circle at 42% 38%, rgba(135, 255, 208, 0.92), rgba(52, 224, 255, 0.55) 46%, rgba(10, 20, 35, 0.92));
    box-shadow: 0 0 14px rgba(52, 224, 255, 0.35);
    pointer-events: none;
    transition: transform 60ms linear;
    will-change: transform;
}

@media (pointer: coarse), (max-width: 720px) {
    .neon-joystick {
        display: block;
    }

    .neon-controls .neon-dpad {
        display: none;
    }
}

.neon-dpad {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 34px);
    grid-template-rows: repeat(2, 34px);
    gap: 4px;
}

.neon-dpad-btn {
    display: grid;
    place-items: center;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 9px;
    background: rgba(52, 224, 255, 0.08);
    color: var(--text);
    font-family: inherit;
    font-size: 0.72rem;
    cursor: pointer;
    touch-action: manipulation;
}

.neon-dpad-btn:active {
    background: rgba(52, 224, 255, 0.22);
}

.neon-dpad-btn.up { grid-column: 2; grid-row: 1; }
.neon-dpad-btn.left { grid-column: 1; grid-row: 2; }
.neon-dpad-btn.right { grid-column: 3; grid-row: 2; }
.neon-dpad-btn.down { grid-column: 2; grid-row: 2; }

.neon-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.neon-mobile-actions {
    display: none;
    grid-template-columns: repeat(3, minmax(58px, 1fr));
    gap: 6px;
    width: 100%;
}

.neon-mobile-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 6px 4px;
    border: 1px solid rgba(52, 224, 255, 0.35);
    border-radius: 13px;
    background: rgba(8, 16, 28, 0.86);
    color: var(--text);
    font-family: inherit;
    font-size: 0.54rem;
    line-height: 1.1;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.neon-mobile-btn .neon-mobile-key {
    position: absolute;
    top: 3px;
    right: 5px;
    min-width: 14px;
    padding: 1px 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(238, 240, 255, 0.8);
    font-size: 0.45rem;
    line-height: 1.1;
}

.neon-mobile-btn.attack {
    border-color: rgba(255, 93, 93, 0.55);
    background: rgba(255, 48, 48, 0.16);
}

.neon-mobile-btn.heal {
    border-color: rgba(67, 255, 176, 0.5);
    background: rgba(67, 255, 176, 0.12);
}

.neon-mobile-btn.ally {
    border-color: rgba(52, 224, 255, 0.55);
    background: rgba(52, 224, 255, 0.13);
}

.neon-mobile-btn:active:not(:disabled) {
    filter: brightness(1.35);
}

.neon-mobile-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.neon-mobile-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (pointer: coarse), (max-width: 900px) {
    .neon-mobile-actions {
        display: grid;
    }

    #neon-attack,
    #neon-potion {
        display: none;
    }
}

.neon-panel-toggle {
    display: none;
}

.neon-side-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 0 8px auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}

#neon-potion.neon-potion-armed {
    border-color: rgba(255, 70, 70, 0.72);
    background: rgba(255, 48, 48, 0.18);
    color: #ffb3b3;
    box-shadow:
        0 0 0 1px rgba(255, 70, 70, 0.25),
        0 0 14px rgba(255, 70, 70, 0.3);
}

.neon-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.neon-target,
.neon-log-wrap {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(6, 8, 18, 0.82);
}

.neon-log-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.neon-log-filter {
    max-width: 110px;
    padding: 3px 5px;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 7px;
    background: rgba(6, 8, 18, 0.9);
    color: #b9f3ff;
    font: inherit;
    font-size: 0.52rem;
    font-weight: 700;
}

.neon-log-level {
    display: inline-block;
    min-width: 30px;
    margin-right: 4px;
    color: #8cecff;
    font-size: 0.5rem;
    font-weight: 900;
    opacity: 0.85;
}

.neon-target strong {
    display: block;
    margin-top: 3px;
    font-size: 0.76rem;
}

.neon-target p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.35;
}

.neon-loot {
    border-color: rgba(255, 212, 121, 0.42);
    background: rgba(24, 18, 6, 0.88);
}

.neon-loot-list {
    display: grid;
    gap: 5px;
    margin-top: 6px;
}

.neon-loot .neon-loot-head {
    margin: 0;
    color: #ffe3a3;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.3;
}

.neon-loot .neon-loot-lock {
    margin: 0;
    color: #ffb0c8;
    font-size: 0.58rem;
    line-height: 1.3;
}

.neon-loot-item {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(255, 212, 121, 0.34);
    border-radius: 9px;
    background: rgba(255, 212, 121, 0.1);
    color: #ffe9bb;
    font: inherit;
    font-size: 0.62rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.neon-loot-item:hover:not(:disabled) {
    background: rgba(255, 212, 121, 0.2);
    border-color: rgba(255, 212, 121, 0.7);
}

.neon-loot-item:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.neon-chronicle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 5px;
    max-height: 130px;
    overflow-y: auto;
    font-size: 0.56rem;
    line-height: 1.35;
}

.neon-chronicle p {
    margin: 0;
    color: var(--muted);
}

.neon-anomaly-counter {
    padding: 6px 8px;
    border: 1px solid rgba(185, 178, 255, 0.32);
    border-radius: 9px;
    background: rgba(124, 108, 255, 0.08);
    color: #d6d2ff;
    font-size: 0.55rem;
    font-weight: 800;
    line-height: 1.4;
}

.neon-anomaly-counter b {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.neon-anomaly-counter.ready {
    border-color: rgba(255, 212, 121, 0.5);
    color: #ffe3a3;
    background: rgba(255, 212, 121, 0.08);
}

.neon-chronicle strong {
    display: block;
    color: var(--gold);
    font-size: 0.58rem;
    font-weight: 900;
}

.neon-chronicle span {
    display: block;
    color: var(--muted);
}

.neon-build-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(2, 4, 10, 0.78);
    backdrop-filter: blur(6px);
}

.neon-build-card {
    position: relative;
    width: min(100%, 460px);
    max-height: 86vh;
    overflow-y: auto;
    padding: 20px;
    border: 1px solid rgba(52, 224, 255, 0.32);
    border-radius: 20px;
    background:
        radial-gradient(120% 110% at 100% 0%, rgba(255, 79, 154, 0.16), transparent 58%),
        radial-gradient(100% 100% at 0% 100%, rgba(52, 224, 255, 0.12), transparent 50%),
        #080b16;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.neon-build-card h2 {
    margin: 6px 0 6px;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

.neon-build-card > p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.neon-build-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
}

.neon-build-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.neon-build-mob-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.neon-build-mob-trigger {
    border-color: rgba(255, 79, 154, 0.35);
    background: rgba(255, 79, 154, 0.06);
}

.neon-build-submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0 2px 12px;
    border-left: 2px solid rgba(255, 79, 154, 0.28);
}

.neon-build-submenu[hidden] {
    display: none;
}

.neon-build-submenu .neon-build-option {
    padding: 7px 9px;
}

.neon-build-submenu .neon-build-option-icon {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

.neon-build-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.neon-build-option:active {
    background: rgba(52, 224, 255, 0.12);
}

.neon-build-option-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(52, 224, 255, 0.25);
    border-radius: 10px;
    background: rgba(52, 224, 255, 0.08);
    font-size: 1rem;
}

.neon-build-option-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.neon-build-option-body strong {
    font-size: 0.72rem;
}

.neon-build-option-body span {
    color: var(--muted);
    font-size: 0.58rem;
    line-height: 1.3;
}

.neon-build-error {
    color: #ff9f9f !important;
}

.summon-card {
    max-width: 520px;
}

/* Monit o nowym summencie — nie blokuje gry, wisi z boku */
.neon-summon-toast {
    position: fixed;
    top: 86px;
    right: 18px;
    z-index: 70;
    width: min(320px, calc(100vw - 24px));
    padding: 14px 16px;
    border: 1px solid rgba(255, 79, 154, 0.45);
    border-radius: 16px;
    background:
        radial-gradient(120% 110% at 100% 0%, rgba(255, 79, 154, 0.18), transparent 58%),
        #080b16;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    animation: summonToastIn 0.22s ease-out;
}

.neon-summon-toast[hidden] {
    display: none !important;
}

.neon-summon-toast h3 {
    margin: 4px 0 6px;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.neon-summon-toast-text {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.66rem;
    line-height: 1.4;
}

.neon-summon-toast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.neon-summon-toast-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.55rem;
    line-height: 1.35;
    opacity: 0.8;
}

.neon-summon-toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
}

.neon-summon-toast-close:active {
    background: rgba(255, 255, 255, 0.08);
}

@keyframes summonToastIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
    .neon-summon-toast {
        top: auto;
        right: 10px;
        bottom: calc(140px + env(safe-area-inset-bottom));
        width: min(300px, calc(100vw - 20px));
        padding: 12px;
    }
}

.summon-card-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 8px 0;
}

.summon-card-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.8rem;
}

.summon-card-line span {
    color: var(--muted);
}

.summon-skill-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.summon-skill-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff4f9a, #ffd479);
}

.neon-hotkey-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0 12px;
}

.neon-hotkey-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.neon-hotkey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.neon-hotkey-row span {
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
}

.neon-hotkey-key {
    min-width: 72px;
    padding: 4px 8px;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 7px;
    background: rgba(52, 224, 255, 0.08);
    color: var(--text);
    font-family: inherit;
    font-size: 0.64rem;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
}

.neon-hotkey-key.capturing {
    border-color: rgba(255, 212, 121, 0.7);
    color: var(--gold);
}

.neon-hotkey-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 2px 2px 4px;
}

.neon-hotkey-picker-label {
    flex: 1 0 100%;
    color: var(--muted);
    font-size: 0.56rem;
    font-weight: 700;
    line-height: 1.35;
}

.neon-hotkey-chip {
    min-width: 34px;
    padding: 5px 7px;
    border: 1px solid rgba(52, 224, 255, 0.28);
    border-radius: 7px;
    background: rgba(52, 224, 255, 0.08);
    color: var(--text);
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 900;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
}

.neon-hotkey-chip:active {
    background: rgba(52, 224, 255, 0.22);
}

.neon-hotkey-chip.current {
    border-color: rgba(255, 212, 121, 0.7);
    background: rgba(255, 212, 121, 0.12);
    color: var(--gold);
}

.neon-hotkey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.anomaly-card {
    border-color: rgba(255, 79, 154, 0.45);
    background:
        radial-gradient(120% 110% at 50% 0%, rgba(255, 79, 154, 0.2), transparent 60%),
        radial-gradient(100% 100% at 50% 100%, rgba(52, 224, 255, 0.1), transparent 55%),
        #080b16;
}

.neon-anomaly-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.neon-anomaly-directions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.65rem;
}

.neon-anomaly-directions > span {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
}

.neon-anomaly-directions > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.neon-anomaly-room {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 70;
    width: min(90vw, 360px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 13px 16px;
    border: 1px solid rgba(255, 79, 154, 0.45);
    border-radius: 16px;
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(255, 79, 154, 0.18), transparent 60%),
        rgba(8, 11, 22, 0.94);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.neon-anomaly-room strong {
    font-size: 0.92rem;
}

.neon-anomaly-room p {
    margin: 0;
    color: var(--muted);
    font-size: 0.62rem;
}

.neon-anomaly-btn {
    border-color: rgba(255, 212, 121, 0.55);
    background: rgba(255, 212, 121, 0.1);
    color: #ffe3a3;
}

.neon-anomaly-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.neon-anomaly-portal {
    margin-top: 12px;
    padding: 10px;
    border: 1px dashed rgba(135, 255, 208, 0.35);
    border-radius: 12px;
    background: rgba(67, 255, 176, 0.05);
}

.neon-anomaly-portal p {
    margin: 5px 0 8px;
    color: var(--muted);
    font-size: 0.6rem;
    line-height: 1.4;
}

.neon-anomaly-portal > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.neon-anomaly-counter-choose {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 212, 121, 0.5);
    border-radius: 8px;
    background: rgba(255, 212, 121, 0.1);
    color: #ffe3a3;
    font-family: inherit;
    font-size: 0.54rem;
    font-weight: 900;
    cursor: pointer;
}

.neon-badge.discover {
    border-color: rgba(255, 212, 121, 0.55);
    color: #ffd479;
}

.neon-log {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    max-height: 130px;
    margin-top: 5px;
    overflow-y: auto;
    font-size: 0.58rem;
    line-height: 1.35;
}

.neon-log div {
    color: var(--muted);
}

.neon-log div.hit { color: #ffd479; }
.neon-log div.kill { color: #ff8c8c; }
.neon-log div.crit { color: #ffd479; }
.neon-log div.hunt { color: #43ffb0; }
.neon-log div.revive { color: #8cecff; }
.neon-log div.parry { color: #43ffb0; }
.neon-log div.join { color: #b9b2ff; }
.neon-log div.terminal { color: #34e0ff; }
.neon-log div.error { color: #ff8c8c; }
.neon-log div.ok { color: #43ffb0; }

.field-auth-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 212, 121, 0.3);
    border-radius: 14px;
    background: rgba(255, 212, 121, 0.06);
    color: var(--muted);
    font-size: 0.68rem;
}

@media (max-width: 720px) {
    .neon-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .neon-stage {
        border-radius: 14px;
    }

    #neon-canvas {
        height: 52vh;
    }

    .neon-hud {
        flex-wrap: wrap;
    }

    .neon-gate-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== Pełnoekranowy układ mobilny ===== */
@media (max-width: 900px), (max-height: 560px) and (orientation: landscape) {
    body.neon-playing {
        overflow: hidden;
        overscroll-behavior: none;
        padding: 0;
    }

    body.neon-playing .topbar {
        display: none;
    }

    body.neon-playing .hub.neon-page {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    body.neon-playing #neon-world {
        position: fixed;
        inset: 0;
        z-index: 60;
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: auto;
        height: 100vh;
        height: 100dvh;
        box-sizing: border-box;
        padding:
            max(4px, env(safe-area-inset-top))
            max(4px, env(safe-area-inset-right))
            max(4px, env(safe-area-inset-bottom))
            max(4px, env(safe-area-inset-left));
        overflow: hidden;
        background: #04050c;
    }

    body.neon-playing #neon-world .neon-hud {
        flex: 0 0 auto;
        flex-wrap: wrap;
        gap: 6px;
        padding: 5px 7px;
        border-radius: 10px;
    }

    body.neon-playing #neon-world .neon-hud-left,
    body.neon-playing #neon-world .neon-hud-right {
        gap: 5px;
    }

    body.neon-playing #neon-world .neon-hud-right {
        margin-left: auto;
    }

    body.neon-playing #neon-world .neon-hp {
        width: clamp(92px, 28vw, 160px);
    }

    body.neon-playing #neon-world .neon-hp-label {
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-hp-label strong {
        font-size: 0.6rem;
    }

    body.neon-playing #neon-world .neon-status-badges {
        gap: 3px;
    }

    body.neon-playing #neon-world .neon-badge {
        padding: 2px 5px;
        font-size: 0.42rem;
    }

    body.neon-playing #neon-world .neon-online {
        display: none;
    }

    body.neon-playing #neon-world .neon-void-tier {
        padding: 3px 6px;
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-world-bits {
        padding: 3px 6px;
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-skillbar {
        flex: 0 0 auto;
        gap: 6px;
        padding: 0;
    }

    body.neon-playing #neon-world .neon-skill-fixed {
        padding: 5px 7px;
        border-radius: 9px;
    }

    body.neon-playing #neon-world .neon-skill-fixed-top {
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-skill-fixed-top strong {
        font-size: 0.62rem;
    }

    body.neon-playing #neon-world .neon-skill-fixed-track {
        height: 4px;
        margin-top: 3px;
    }

    body.neon-playing #neon-world .neon-skill-fixed-text {
        margin-top: 2px;
        font-size: 0.4rem;
    }

    body.neon-playing #neon-world .neon-stage {
        flex: 1 1 auto;
        min-height: 0;
        border-radius: 12px;
    }

    body.neon-playing #neon-world #neon-canvas {
        height: 100%;
    }

    body.neon-playing #neon-world .neon-map-hint {
        max-width: 46%;
        padding: 4px 6px;
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-terminals {
        top: 8px;
        right: 8px;
        bottom: auto;
        left: auto;
        width: min(148px, 40%);
        max-height: 32%;
        padding: 6px 7px;
    }

    body.neon-playing #neon-world .neon-terminal-row {
        font-size: 0.46rem;
    }

    body.neon-playing #neon-world .neon-terminal-row strong {
        font-size: 0.48rem;
    }

    body.neon-playing #neon-world .neon-bottom {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 5;
        display: block;
        padding: 0;
        pointer-events: none;
    }

    body.neon-playing #neon-world .neon-controls {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
        padding:
            0
            calc(8px + env(safe-area-inset-right))
            calc(8px + env(safe-area-inset-bottom))
            calc(8px + env(safe-area-inset-left));
        border: 0;
        border-radius: 0;
        background: transparent;
        pointer-events: none;
    }

    body.neon-playing #neon-world .neon-joystick {
        display: block;
        width: 110px;
        height: 110px;
        pointer-events: auto;
    }

    body.neon-playing #neon-world .neon-actions {
        max-width: 66%;
        margin-left: auto;
        justify-content: flex-end;
        padding: 5px;
        border: 1px solid rgba(52, 224, 255, 0.16);
        border-radius: 13px;
        background: rgba(5, 7, 15, 0.62);
        backdrop-filter: blur(6px);
        pointer-events: auto;
    }

    body.neon-playing #neon-world .neon-actions .btn {
        padding: 6px 7px;
        font-size: 0.54rem;
    }

    body.neon-playing #neon-world .neon-panel-toggle {
        display: inline-flex;
    }

    body.neon-playing #neon-world .neon-side {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        max-height: 64vh;
        max-height: 64dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding:
            14px
            calc(12px + env(safe-area-inset-right))
            calc(14px + env(safe-area-inset-bottom))
            calc(12px + env(safe-area-inset-left));
        border-top: 1px solid rgba(52, 224, 255, 0.28);
        border-radius: 16px 16px 0 0;
        background: rgba(4, 6, 14, 0.97);
        box-shadow: 0 -14px 42px rgba(0, 0, 0, 0.55);
        transform: translateY(110%);
        transition: transform 180ms ease;
        pointer-events: auto;
    }

    body.neon-playing #neon-world .neon-side.open {
        transform: translateY(0);
    }

    body.neon-playing #neon-world .neon-side-close {
        display: inline-flex;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    body.neon-playing .neon-build-modal {
        padding: 10px;
    }

    body.neon-playing .neon-build-card {
        max-height: 92vh;
        max-height: 92dvh;
        overflow-y: auto;
    }

    body.neon-playing .neon-anomaly-room {
        bottom: calc(140px + env(safe-area-inset-bottom));
        width: min(94vw, 360px);
    }
}

/* ===== Telefon w orientacji poziomej ===== */
@media (max-height: 560px) and (orientation: landscape) {
    body.neon-playing #neon-world {
        display: block;
        gap: 0;
        padding: 0;
    }

    /* Mapa zajmuje cały ekran, a HUD i sterowanie są lekkimi nakładkami. */
    body.neon-playing #neon-world .neon-hud {
        position: absolute;
        top: max(4px, env(safe-area-inset-top));
        left: max(4px, env(safe-area-inset-left));
        right: max(4px, env(safe-area-inset-right));
        z-index: 12;
        flex-wrap: wrap;
        gap: 6px;
        padding: 4px 6px;
        border-radius: 9px;
        background: rgba(5, 7, 15, 0.55);
        backdrop-filter: blur(4px);
        pointer-events: none;
    }

    body.neon-playing #neon-world .neon-hud-left,
    body.neon-playing #neon-world .neon-hud-right {
        flex-wrap: wrap;
        pointer-events: auto;
    }

    body.neon-playing #neon-world .neon-hp {
        width: clamp(80px, 18vw, 130px);
    }

    body.neon-playing #neon-world .neon-status-badges {
        flex: 0 1 auto;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    /* Paski umiejętności są zbędne w poziomie — zostały w pionie. */
    body.neon-playing #neon-world .neon-skillbar {
        display: none;
    }

    body.neon-playing #neon-world .neon-stage {
        position: absolute;
        inset: 0;
        border: 0;
        border-radius: 0;
    }

    body.neon-playing #neon-world .neon-map-hint {
        display: none;
    }

    body.neon-playing #neon-world .neon-terminals {
        top: 44px;
        right: max(8px, env(safe-area-inset-right));
        width: min(130px, 28vw);
        max-height: 30%;
    }

    body.neon-playing #neon-world .neon-controls {
        align-items: flex-end;
        padding:
            0
            max(10px, env(safe-area-inset-right))
            max(6px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
    }

    body.neon-playing #neon-world .neon-joystick {
        width: 88px;
        height: 88px;
    }

    body.neon-playing #neon-world .neon-actions {
        max-width: 58%;
        gap: 4px;
        padding: 4px;
    }

    body.neon-playing #neon-world .neon-actions .btn {
        padding: 4px 6px;
        font-size: 0.5rem;
    }

    body.neon-playing #neon-world .neon-mobile-btn {
        min-height: 44px;
        font-size: 0.46rem;
    }

    body.neon-playing #neon-world .neon-mobile-key {
        top: 2px;
        right: 3px;
        font-size: 0.4rem;
    }

    body.neon-playing #neon-world .neon-side {
        max-height: 78dvh;
    }

    body.neon-playing .neon-tutorial-card {
        top: max(6px, env(safe-area-inset-top));
        left: max(6px, env(safe-area-inset-left));
        right: auto;
        width: min(340px, 58vw);
        max-height: calc(100dvh - 12px);
        padding: 10px 12px;
    }

    body.neon-playing .neon-tutorial-text {
        font-size: 0.68rem;
    }
}

@media (max-width: 380px) {
    body.neon-playing #neon-world .neon-joystick {
        width: 96px;
        height: 96px;
    }

    body.neon-playing #neon-world .neon-actions {
        max-width: 70%;
    }

    body.neon-playing #neon-world .neon-actions .btn {
        padding: 5px 6px;
        font-size: 0.5rem;
    }

    .neon-mobile-actions {
        grid-template-columns: repeat(3, minmax(48px, 1fr));
    }

    .neon-mobile-btn {
        min-height: 52px;
        font-size: 0.48rem;
    }
}

/* === Samouczek Neonowej Dziczy === */
.neon-tutorial {
    position: fixed;
    inset: 0;
    z-index: 65;
    pointer-events: none;
}

.neon-tutorial-ring {
    position: fixed;
    z-index: 64;
    border: 3px solid #ffd479;
    border-radius: 16px;
    box-shadow:
        0 0 0 9999px rgba(2, 4, 10, 0.62),
        0 0 24px rgba(255, 212, 121, 0.9),
        inset 0 0 18px rgba(255, 212, 121, 0.25);
    pointer-events: none;
    transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

.neon-tutorial-ring.soft {
    box-shadow:
        0 0 0 9999px rgba(2, 4, 10, 0.28),
        0 0 22px rgba(255, 212, 121, 0.85),
        inset 0 0 18px rgba(255, 212, 121, 0.2);
}

.neon-tutorial-ring-label {
    position: absolute;
    top: -27px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 9px;
    border: 1px solid rgba(255, 212, 121, 0.7);
    border-radius: 999px;
    background: #1a1407;
    color: #ffd479;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    white-space: nowrap;
    animation: neon-tutorial-bounce 1.1s ease-in-out infinite;
}

@keyframes neon-tutorial-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -6px); }
}

.neon-tutorial-card {
    position: fixed;
    top: 96px;
    right: 16px;
    z-index: 66;
    width: min(390px, calc(100vw - 32px));
    max-height: min(58vh, 460px);
    overflow-y: auto;
    padding: 14px 16px 15px;
    border: 1px solid rgba(255, 212, 121, 0.5);
    border-radius: 16px;
    background:
        radial-gradient(120% 110% at 100% 0%, rgba(255, 212, 121, 0.16), transparent 56%),
        radial-gradient(100% 100% at 0% 100%, rgba(52, 224, 255, 0.12), transparent 52%),
        rgba(7, 10, 20, 0.96);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 212, 121, 0.08) inset;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

body.neon-playing .neon-tutorial-card {
    top: 82px;
}

.neon-tutorial-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.neon-tutorial-skip {
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.58rem;
    font-weight: 800;
    cursor: pointer;
}

.neon-tutorial-skip:hover {
    border-color: rgba(255, 212, 121, 0.6);
    color: #ffd479;
}

.neon-tutorial-card h2 {
    margin: 8px 0 6px;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.neon-tutorial-text {
    margin: 0 0 9px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.neon-tutorial-tip {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-left: 3px solid #ffd479;
    border-radius: 0 9px 9px 0;
    background: rgba(255, 212, 121, 0.08);
    color: #ffe3a8;
    font-size: 0.7rem;
    line-height: 1.45;
}

.neon-tutorial-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.neon-tutorial-progress {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.neon-tutorial-question {
    margin: 12px 0;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.4;
}

.neon-tutorial-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.neon-tutorial-answer {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(52, 224, 255, 0.26);
    border-radius: 12px;
    background: rgba(52, 224, 255, 0.07);
    color: var(--text);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.neon-tutorial-answer:hover:not(:disabled) {
    border-color: rgba(255, 212, 121, 0.7);
    background: rgba(255, 212, 121, 0.12);
    transform: translateX(2px);
}

.neon-tutorial-answer:disabled {
    opacity: 0.45;
    cursor: default;
}

@media (max-width: 720px) {
    .neon-tutorial-card {
        top: 132px;
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 46vh;
        padding: 12px 13px 13px;
    }

    body.neon-playing .neon-tutorial-card {
        top: 118px;
    }

    .neon-tutorial-text {
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .neon-tutorial-ring-label {
        animation: none;
    }
}
