:root {
    --bg-dark: #0a0b10;
    --panel-bg: rgba(20, 22, 30, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-main: #e2e8f0;
    --text-muted: #64748b;
    
    --neon-green: #00ff88;
    --neon-orange: #ffaa00;
    --neon-purple: #b026ff;
    --blue: #00d0ff;
    --red: #ff3366;
    
    --grid-bg: #11131a;
    --grid-line: #1e222d;

    /* Układ PC: stała „plansza” — pasek przewijania poziomego zamiast ściskania UI na wąskich ekranach */
    --game-layout-min-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; font-family: 'Segoe UI', system-ui, sans-serif; }

html {
    height: 100%;
    /* Mniejszy skok szerokości przy pojawieniu się paska przewijania */
    scrollbar-gutter: stable;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(176, 38, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0, 255, 136, 0.05) 0%, transparent 50%);
    color: var(--text-main);
    display: flex; flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Podczas gry: nie przewijaj całej strony (HUD + siatka z vh wyglądały jak „powiększone” / layout się rwał) */
body.game-ui-active {
    overflow-y: hidden;
    overflow-x: auto;
    overscroll-behavior-y: none;
}

/* Układ gry — pełna wysokość kolumny (display ustawia script.js) */
#game-ui {
    flex: 1;
    min-height: 0;
    min-width: var(--game-layout-min-width);
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

/* Blokada: tylko PC — sztywny lock przewijania (iOS / Chrome mobile) */
html.pc-only-block-active {
    overflow: hidden !important;
    width: 100%;
    height: 100%;
}

body.pc-only-block-active {
    overflow: hidden !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    max-height: -webkit-fill-available !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    overscroll-behavior: none !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: auto;
}

.pc-only-block {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    z-index: 2147483647;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    text-align: center;
    background:
        radial-gradient(ellipse 70% 50% at 50% 20%, rgba(176, 38, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0, 208, 255, 0.08), transparent 50%),
        rgba(6, 8, 14, 0.98);
    backdrop-filter: blur(12px);
    isolation: isolate;
    pointer-events: auto;
}

body.pc-only-block-active .pc-only-block {
    display: flex !important;
}

.pc-only-block-inner {
    max-width: 420px;
    padding: 36px 32px;
    border: 1px solid rgba(255, 51, 102, 0.45);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 24px 64px rgba(0, 0, 0, 0.65),
        0 0 60px rgba(255, 51, 102, 0.12);
}

.pc-only-icon {
    font-size: 3.5rem;
    color: var(--red);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.4));
}

.pc-only-title {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fecaca;
    line-height: 1.3;
}

.pc-only-desc {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.glass-panel {
    background: var(--panel-bg); backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border); border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.panel-header {
    font-size: 1.2rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-main);
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 15px; margin-bottom: 20px; text-align: center;
}

/* TOPBAR — jedna stała linia (bez zawijania = nie „puchnie” na 2 rzędy przy scrollbarze / resize) */
.topbar {
    background: rgba(10, 11, 16, 0.8); backdrop-filter: blur(20px);
    padding: 10px 16px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 12px;
    border-bottom: 1px solid var(--panel-border);
    z-index: 10;
    flex-shrink: 0;
    min-height: 52px;
    box-sizing: border-box;
    overflow: hidden;
    contain: layout style;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px 14px;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    flex: 0 1 auto;
    min-width: 0;
    /* Logo + nick osobno — bez … na całym bloku (nick był ucinany) */
}
.brand-logo {
    flex-shrink: 0;
    white-space: nowrap;
}
.brand-os {
    color: var(--neon-orange);
}
.brand-nick {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.stats-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px 12px;
    flex: 1 1 0;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}
.stats-container::-webkit-scrollbar {
    height: 5px;
}
.stats-container::-webkit-scrollbar-thumb {
    background: rgba(0, 208, 255, 0.28);
    border-radius: 6px;
}
.stat-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    flex: 0 0 auto;
    flex-shrink: 0;
}
.stat-coins i { color: var(--neon-green); filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.5)); }
.stat-oil i { color: var(--neon-orange); filter: drop-shadow(0 0 8px rgba(255, 170, 0, 0.5)); }
.stat-rps i { color: var(--blue); }
.max-value { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.btn-logout {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--red);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.1rem;
    flex: 0 0 auto;
    flex-shrink: 0;
}
.btn-logout:hover { background: var(--red); color: white; box-shadow: 0 0 15px var(--red); }

/* TABS */
.tabs { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 16px 12px; flex-wrap: nowrap; flex-shrink: 0; }
.tabs-viewport {
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(1080px, calc(100% - 110px));
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}
.tabs-viewport.tabs-viewport--center {
    justify-content: center;
}
.tabs-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 10px;
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
    will-change: transform;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.tab-nav-btn {
    width: 42px; height: 42px; border-radius: 8px;
    flex: 0 0 42px;
    border: 1px solid var(--panel-border);
    background: rgba(10, 11, 16, 0.8); color: var(--text-main);
    cursor: pointer; transition: all 0.2s ease;
}
.tab-nav-btn:hover { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 12px rgba(0,208,255,0.25); }
.tab-nav-btn[disabled] { opacity: 0.35; pointer-events: none; }
.tab-btn {
    background: transparent; color: var(--text-muted); border: none;
    padding: 10px 10px; font-size: 0.98rem; font-weight: 600; border-radius: 8px;
    cursor: pointer; transition: all 0.3s; display: inline-flex; gap: 6px; align-items: center;
    justify-content: center;
    position: relative; overflow: hidden;
    flex: 0 0 10.75rem;
    width: 10.75rem;
    box-sizing: border-box;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.tab-btn--lab { color: #ffd700 !important; }
.tab-btn--lab:hover { color: #ffe566 !important; }
.tab-btn--lab.active { color: #fff8d0 !important; }
.tab-btn--admin { color: #f0abfc !important; }
.tab-btn--admin:hover { color: #f5d0fe !important; }
.tab-btn--admin.active { color: #fdf4ff !important; text-shadow: 0 0 12px rgba(232, 121, 249, 0.35); }
.tab-btn::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 2px; background: var(--neon-purple); transition: width 0.3s; }
.tab-btn:hover { color: var(--text-main); }
.tab-btn.active { color: var(--text-main); background: rgba(255,255,255,0.03); }
.tab-btn.active::after { width: 100%; box-shadow: 0 0 10px var(--neon-purple); }

/* MAIN CONTAINER & GENERIC VIEWS — przewijanie tylko tu, nie na body (stabilny HUD) */
.main-container {
    display: flex;
    flex: 1 1 0%;
    min-height: 0;
    padding: 16px 20px;
    justify-content: center;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.view { display: none; width: 100%; min-height: 0; flex: 1 1 auto; flex-direction: column; align-items: center; }
.view.active-view { display: flex; animation: fadeIn 0.4s ease; min-height: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================
   --- ZIEMIA: BAZA / SIATKA TAKTYCZNA --- 
   ========================================== */

/* Siatka + moduł totemów w jednej ramce taktycznej */
.base-map-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
}

/* HUD + pasek budowy + mapa — jedna szerokość (jak ramka taktyczna, z totemami) */
.base-map-tactical-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    min-width: 0;
}

/* Rząd: powierzchnia siatki | totemy (wewnątrz .tactical-map-wrapper) */
.base-map-main-totem {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.totem-sanctuary-wrap {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-shrink: 0;
    margin-left: -1px;
    border-left: 1px solid rgba(0, 208, 255, 0.12);
}

/* Wysuwany moduł — ten sam język co .base-map-surface (siatka), bez „osobnego panelu” */
.totem-sanctuary-drawer {
    position: relative;
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 10px 10px 0;
    background:
        linear-gradient(180deg, rgba(0, 208, 255, 0.05) 0%, transparent 42%),
        repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0, 208, 255, 0.04) 1px, rgba(0, 208, 255, 0.04) 2px),
        repeating-linear-gradient(90deg, transparent, transparent 1px, rgba(0, 208, 255, 0.04) 1px, rgba(0, 208, 255, 0.04) 2px);
    background-size: 100% 100%, 24px 24px, 24px 24px;
    box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.4);
}

.totem-sanctuary-wrap.totem-drawer-open .totem-sanctuary-drawer {
    width: 158px;
    min-width: 158px;
}

.totem-sanctuary-inner {
    position: relative;
    z-index: 1;
    padding: 10px 10px 12px;
    width: 158px;
    box-sizing: border-box;
}

.totem-sanctuary-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.totem-sanctuary-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--blue);
    flex-shrink: 0;
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.18), rgba(0, 208, 255, 0.04));
    border: 1px solid rgba(0, 208, 255, 0.35);
    box-shadow: 0 0 18px rgba(0, 208, 255, 0.12);
}

.totem-sanctuary-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.totem-sanctuary-kicker {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.2;
}

.totem-sanctuary-title {
    font-size: clamp(0.78rem, 2vw, 0.88rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #e0f7ff;
    text-shadow: 0 0 18px rgba(0, 208, 255, 0.25);
    line-height: 1.15;
}

.totem-sanctuary-hint {
    margin: 0 0 10px;
    font-size: 0.6rem;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.95);
}

.totem-sanctuary-hint strong {
    color: rgba(226, 232, 240, 0.98);
    font-weight: 700;
}

.totem-sanctuary-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Zakładka — kontynuacja obudowy mapy (jak brzeg ramy), nie osobny element */
.totem-sanctuary-toggle {
    flex-shrink: 0;
    width: 40px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 6px;
    font-size: 1rem;
    color: var(--blue);
    cursor: pointer;
    border: none;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.55) 0%, rgba(6, 10, 16, 0.75) 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 208, 255, 0.1);
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.totem-sanctuary-toggle:hover {
    background: rgba(0, 208, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 208, 255, 0.28);
    color: #e0f7ff;
}

.totem-sanctuary-toggle-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.totem-sanctuary-wrap.totem-drawer-open .totem-sanctuary-toggle {
    border-radius: 0 10px 10px 0;
    background: rgba(0, 208, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(0, 208, 255, 0.22);
}

.totem-sanctuary-wrap.totem-drawer-open .totem-sanctuary-toggle-label {
    color: #e0f7ff;
}

/* Komórki sanktuarium — karta w ramce */
.cell.cell-totem-slot {
    position: relative;
    min-height: 54px;
    padding: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: clamp(1rem, 2.8vmin, 1.65rem);
}

.cell.cell-totem-slot::before {
    display: none !important;
}

.cell.cell-totem-slot:hover {
    transform: translateY(-2px);
}

.totem-slot-num {
    position: absolute;
    top: 4px;
    left: 6px;
    z-index: 5;
    font-size: 0.52rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.9);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.totem-slot-card {
    position: relative;
    width: 100%;
    min-height: 52px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}

/* Zablokowane — ten sam rytm co .cell.locked na siatce (czerwień + pasy) */
.totem-slot-card--locked {
    background: repeating-linear-gradient(
        45deg,
        rgba(18, 20, 28, 0.95),
        rgba(18, 20, 28, 0.95) 8px,
        rgba(255, 51, 102, 0.04) 8px,
        rgba(255, 51, 102, 0.04) 16px
    ) !important;
    border: 1px solid rgba(255, 51, 102, 0.15);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
}

.totem-slot-card--locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(0, 208, 255, 0.06);
}

.totem-slot-card--locked:hover {
    border-color: rgba(0, 208, 255, 0.35);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45), 0 0 12px rgba(0, 208, 255, 0.08);
}

.totem-slot-lock-wrap {
    font-size: 0.95rem;
    color: rgba(255, 51, 102, 0.5);
}

.totem-slot-card--locked:hover .totem-slot-lock-wrap {
    color: var(--red);
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.35);
}

.totem-slot-buy {
    font-size: 0.56rem;
    font-weight: 800;
    color: rgba(226, 232, 240, 0.95);
    text-align: center;
    line-height: 1.2;
}

.totem-slot-buy-price {
    font-weight: 900;
    font-size: 0.62rem;
}

.totem-slot-buy-hint {
    font-size: 0.48rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
}

/* Puste — jak wolna komórka siatki */
.totem-slot-card--empty {
    border: 1px solid rgba(0, 208, 255, 0.12);
    background: linear-gradient(165deg, rgba(22, 26, 36, 0.55) 0%, rgba(12, 14, 20, 0.75) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.totem-slot-card--empty::after {
    content: '+';
    position: absolute;
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(0, 208, 255, 0.22);
}

.totem-slot-card--empty:hover {
    border-color: rgba(0, 208, 255, 0.45);
    background: rgba(0, 208, 255, 0.1);
    box-shadow: inset 0 0 18px rgba(0, 208, 255, 0.12);
}

/* Zajęte — totem */
.totem-slot-card--occupied {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(12, 14, 22, 0.98) 0%, rgba(6, 8, 14, 0.99) 100%);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.totem-slot-card--occupied i {
    font-size: clamp(1.4rem, 4vmin, 2rem);
    filter: drop-shadow(0 0 12px currentColor);
    animation: floatBuilding 3s ease-in-out infinite;
}

.totem-slot-card--occupied .cell-building-visual--img img {
    max-height: clamp(1.4rem, 4vmin, 2rem);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--bv-color, var(--neon-orange)));
    animation: floatBuilding 3s ease-in-out infinite;
}

/* HUD nad mapą */
.tactical-hud-header.base-hud {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 16px;
    width: 100%;
    margin-bottom: 16px;
    padding: 14px 16px 14px;
    border-radius: 14px 14px 0 0;
    border: 1px solid rgba(0, 208, 255, 0.2);
    border-bottom: none;
    background: linear-gradient(180deg, rgba(8, 14, 22, 0.92) 0%, rgba(10, 11, 16, 0.88) 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(0, 208, 255, 0.12);
}

.base-hud-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.base-hud-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
    color: var(--blue);
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.18), rgba(0, 208, 255, 0.04));
    border: 1px solid rgba(0, 208, 255, 0.35);
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.15);
    animation: baseHudIconPulse 3s ease-in-out infinite;
}

@keyframes baseHudIconPulse {
    0%, 100% { box-shadow: 0 0 16px rgba(0, 208, 255, 0.12); }
    50% { box-shadow: 0 0 26px rgba(0, 208, 255, 0.28); }
}

.base-hud-titles { min-width: 0; }

.base-hud-h2,
.tactical-hud-header h2 {
    margin: 0;
    color: #e0f7ff;
    font-weight: 900;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-shadow: 0 0 20px rgba(0, 208, 255, 0.35);
}

.base-hud-tag {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(148, 163, 184, 0.9);
}

.base-hud-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.base-hud-status-label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
}

.base-hud-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--neon-green);
    font-family: ui-monospace, monospace;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.28);
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.1);
}

.base-hud-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: baseHudDot 1.5s ease-in-out infinite;
}

@keyframes baseHudDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.85); }
}

.hud-status { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; letter-spacing: 1px; }

/* Pasek budowy */
.tactical-build-auth.base-build-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 170, 0, 0.45);
    border-left: 4px solid var(--neon-orange);
    background: linear-gradient(95deg, rgba(255, 170, 0, 0.12) 0%, rgba(8, 8, 12, 0.92) 55%);
    box-shadow: 0 0 28px rgba(255, 170, 0, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    animation: baseBuildEnter 0.35s ease;
}

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

.base-build-bar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.base-build-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.base-build-kicker {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 200, 120, 0.75);
}

.base-build-target {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.95);
}

.base-build-target i {
    margin-right: 6px;
    color: var(--neon-orange);
}

#build-name-display {
    color: var(--neon-orange);
    text-shadow: 0 0 14px rgba(255, 170, 0, 0.45);
    word-break: break-word;
}

.pulse-ring { width: 12px; height: 12px; background: var(--blue); border-radius: 50%; animation: pulse 1.5s infinite; }
.pulse-orange { background: var(--neon-orange); animation: pulseOrange 1.5s infinite; }
@keyframes pulseOrange { 0% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(255, 170, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0); } }

.btn-cancel { background: rgba(255, 51, 102, 0.2); color: var(--red); border: 1px solid var(--red); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease; flex-shrink: 0; }
.btn-cancel:hover { background: var(--red); color: white; box-shadow: 0 0 18px var(--red); transform: scale(1.06); }

/* Ramka mapy (+ moduł totemów jako część tej samej obudowy) */
.tactical-map-wrapper.base-map-frame {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 16px;
    border-radius: 0 0 16px 16px;
    border: 1px solid rgba(0, 208, 255, 0.22);
    border-top: 1px solid rgba(0, 208, 255, 0.12);
    background:
        linear-gradient(145deg, rgba(6, 10, 18, 0.98) 0%, rgba(12, 14, 22, 0.96) 50%, rgba(8, 12, 20, 0.98) 100%);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.55),
        inset 0 0 60px rgba(0, 208, 255, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.base-map-glow {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse 70% 55% at 50% 40%, rgba(0, 208, 255, 0.09), transparent 65%);
    animation: baseMapGlow 6s ease-in-out infinite;
}

@keyframes baseMapGlow {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

.base-map-surface {
    position: relative;
    z-index: 1;
    padding: 6px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.06) 0%, transparent 40%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 1px,
            rgba(0, 208, 255, 0.04) 1px,
            rgba(0, 208, 255, 0.04) 2px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 1px,
            rgba(0, 208, 255, 0.04) 1px,
            rgba(0, 208, 255, 0.04) 2px
        );
    background-size: 100% 100%, 24px 24px, 24px 24px;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.base-map-main-totem .base-map-surface {
    flex: 1 1 auto;
    min-width: 0;
}

/* Cyberpunk Corner Accents */
.map-corner { position: absolute; width: 28px; height: 28px; border-color: rgba(0, 208, 255, 0.65); border-style: solid; z-index: 4; pointer-events: none; filter: drop-shadow(0 0 6px rgba(0, 208, 255, 0.35)); }
.map-corner.top-left { top: 8px; left: 8px; border-width: 3px 0 0 3px; border-top-left-radius: 10px; }
.map-corner.top-right { top: 8px; right: 8px; border-width: 3px 3px 0 0; border-top-right-radius: 10px; }
.map-corner.bottom-left { bottom: 8px; left: 8px; border-width: 0 0 3px 3px; border-bottom-left-radius: 10px; }
.map-corner.bottom-right { bottom: 8px; right: 8px; border-width: 0 3px 3px 0; border-bottom-right-radius: 10px; }

/* GRID — rozmiar od vh/vw z podłogą; unika mikroskopijnej siatki przy niskim oknie (stary samo vmin było zbyt agresywne) */
.grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    gap: 5px;
    width: min(650px, max(280px, min(68vh, 88vw, 720px)));
    height: min(650px, max(280px, min(68vh, 88vw, 720px)));
    max-width: 100%;
    aspect-ratio: 1;
    padding: 6px;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0, 208, 255, 0.04), transparent 70%),
        rgba(4, 6, 12, 0.5) !important;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 208, 255, 0.1);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.grid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(0, 208, 255, 0.85), transparent);
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.5);
    animation: gridScan 4s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes gridScan { 0% { top: -10px; opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* Komórki */
.cell {
    background: linear-gradient(165deg, rgba(22, 26, 36, 0.55) 0%, rgba(12, 14, 20, 0.75) 100%) !important;
    border: 1px solid rgba(0, 208, 255, 0.12);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(0.95rem, 2.8vmin, 2.2rem);
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.cell::before {
    content: '+';
    position: absolute;
    font-size: clamp(0.5rem, 1.5vmin, 0.65rem);
    font-weight: 800;
    color: rgba(0, 208, 255, 0.22);
    pointer-events: none;
    transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
}

.cell:hover {
    background: rgba(0, 208, 255, 0.12) !important;
    border-color: rgba(0, 208, 255, 0.45);
    box-shadow: inset 0 0 18px rgba(0, 208, 255, 0.2);
    transform: translateY(-1px);
}

.cell:hover::before {
    color: var(--blue);
    transform: scale(1.35);
    text-shadow: 0 0 10px var(--blue);
}

.cell.occupied::before,
.cell.locked::before { display: none; }

.cell.locked {
    background: repeating-linear-gradient(
        45deg,
        rgba(18, 20, 28, 0.95),
        rgba(18, 20, 28, 0.95) 8px,
        rgba(255, 51, 102, 0.04) 8px,
        rgba(255, 51, 102, 0.04) 16px
    ) !important;
    border: 1px solid rgba(255, 51, 102, 0.12) !important;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.85);
}

.cell.locked i { color: rgba(255, 51, 102, 0.12) !important; text-shadow: none; font-size: 1rem; }
.cell.locked:hover { background: rgba(255, 51, 102, 0.12) !important; border-color: rgba(255, 51, 102, 0.35) !important; transform: none; }
.cell.locked:hover i { color: var(--red) !important; text-shadow: 0 0 10px var(--red); font-size: 1.5rem; }

.cell.occupied {
    background: linear-gradient(165deg, rgba(14, 16, 24, 0.95) 0%, rgba(8, 10, 16, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cell.occupied:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 16px rgba(255, 255, 255, 0.06);
}

.cell.occupied i {
    font-size: clamp(1.6rem, 4.5vmin, 2.6rem);
    filter: drop-shadow(0 0 12px currentColor);
    animation: floatBuilding 3s ease-in-out infinite;
}

.cell.occupied .cell-building-visual--img img {
    max-height: clamp(1.6rem, 4.5vmin, 2.6rem);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 12px var(--bv-color, var(--neon-orange)));
    animation: floatBuilding 3s ease-in-out infinite;
}

@keyframes floatBuilding { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
    .base-hud-icon,
    .base-hud-pulse,
    .base-map-glow,
    .grid::after {
        animation: none !important;
    }
    .cell:hover { transform: none; }
    .cell.cell-totem-slot:hover { transform: none; }
}

/* ETYKIETY NA BUDYNKACH */
.stat-label {
    position: absolute; top: 4px; right: 4px; font-size: 0.55rem; font-weight: 900;
    padding: 2px 5px; border-radius: 4px; letter-spacing: 0.5px; pointer-events: none; z-index: 2;
    background: rgba(10, 11, 16, 0.85); backdrop-filter: blur(2px);
}
.prod-label { color: var(--neon-green); border: 1px solid rgba(0, 255, 136, 0.3); box-shadow: 0 0 8px rgba(0, 255, 136, 0.2); }
.cap-label { color: var(--blue); border: 1px solid rgba(0, 208, 255, 0.3); box-shadow: 0 0 8px rgba(0, 208, 255, 0.2); }

/* Małe oznaczenia typu budynku (S = szyb, C = cysterna, T = totem) */
.cell-badge {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.42rem, 1.1vmin, 0.55rem);
    font-weight: 900;
    letter-spacing: 0.03em;
    padding: 1px 4px 2px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 3;
    line-height: 1;
    white-space: nowrap;
    background: rgba(10, 11, 16, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}
.cell-badge--refinery {
    color: var(--neon-orange);
    border-color: rgba(255, 170, 0, 0.4);
    text-shadow: 0 0 6px rgba(255, 170, 0, 0.35);
}
.cell-badge--tank {
    color: var(--blue);
    border-color: rgba(0, 208, 255, 0.4);
    text-shadow: 0 0 6px rgba(0, 208, 255, 0.25);
}
.cell-badge--totem {
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.4);
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
}

/* Tactical Expand Button */
.tactical-expand-btn {
    background: rgba(176, 38, 255, 0.1); border: 1px solid var(--neon-purple); color: var(--neon-purple);
    width: 100%; padding: 15px; border-radius: 8px; font-size: 1rem; font-weight: 800; letter-spacing: 1px;
    cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s; text-transform: uppercase; box-shadow: inset 0 0 15px rgba(176, 38, 255, 0.1);
}
.tactical-expand-btn::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(176, 38, 255, 0.3) 0%, transparent 60%);
    transform: scale(0); transition: transform 0.5s; z-index: 1; pointer-events: none;
}
.tactical-expand-btn:hover { background: rgba(176, 38, 255, 0.2); box-shadow: 0 0 25px rgba(176, 38, 255, 0.4), inset 0 0 20px rgba(176, 38, 255, 0.2); text-shadow: 0 0 10px var(--neon-purple); border-color: #d88eff; }
.tactical-expand-btn:hover::before { transform: scale(1); }

/* --- PANEL DOWÓDZTWA (rozbudowa sektora) --- */
.command-panel.command-panel--map {
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(280px, 28vw, 340px);
    max-width: calc(100vw - 16px);
    height: 100%;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 10;
    overflow: hidden;
    border-radius: 0 0 18px 0;
    border: 1px solid rgba(176, 38, 255, 0.28);
    border-left: none;
    box-sizing: border-box;
    background:
        linear-gradient(165deg, rgba(18, 12, 28, 0.97) 0%, rgba(10, 11, 16, 0.96) 45%, rgba(14, 10, 22, 0.98) 100%);
    box-shadow:
        12px 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(176, 38, 255, 0.08),
        0 0 50px rgba(176, 38, 255, 0.07);
}

.command-panel.command-panel--map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 45% at 0% 0%, rgba(176, 38, 255, 0.14), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.command-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
    border-bottom: 1px solid rgba(176, 38, 255, 0.22);
    background: linear-gradient(100deg, rgba(176, 38, 255, 0.12) 0%, transparent 70%);
}

.command-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-purple), transparent 65%);
    opacity: 0.6;
    animation: commandHeaderShimmer 4s ease-in-out infinite;
}

@keyframes commandHeaderShimmer {
    0%, 100% { opacity: 0.45; transform: scaleX(1); }
    50% { opacity: 0.9; transform: scaleX(1.02); }
}

.command-icon-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.command-icon-ring {
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    border: 1px solid rgba(176, 38, 255, 0.45);
    animation: commandRingPulse 2.5s ease-in-out infinite;
}

@keyframes commandRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.04); opacity: 1; }
}

.command-icon {
    font-size: 1.35rem;
    color: var(--neon-purple);
    filter: drop-shadow(0 0 10px rgba(176, 38, 255, 0.5));
    animation: commandIconFloat 4s ease-in-out infinite;
}

@keyframes commandIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.command-header-text { min-width: 0; }

.command-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f0e8ff;
    text-shadow: 0 0 18px rgba(176, 38, 255, 0.35);
}

.command-subtitle {
    margin: 4px 0 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(196, 181, 220, 0.85);
    letter-spacing: 0.04em;
}

.command-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.command-desc {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
    color: rgba(203, 213, 225, 0.88);
}

.command-desc strong {
    color: var(--text-main);
    font-weight: 800;
}

.command-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-progress-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(176, 38, 255, 0.75);
}

.command-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(176, 38, 255, 0.2);
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
}

.command-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, var(--neon-purple), #e879f9);
    box-shadow: 0 0 14px rgba(176, 38, 255, 0.5);
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.command-progress-meta {
    font-size: 0.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(226, 232, 240, 0.9);
    font-family: ui-monospace, monospace;
}

.command-footer {
    position: relative;
    z-index: 2;
    padding: 0 14px 16px;
    margin-top: auto;
    flex-shrink: 0;
}

.command-expand-btn {
    position: relative;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
    text-align: left;
}

.command-expand-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(120deg, var(--neon-purple), #e879f9, var(--neon-purple));
    opacity: 0.35;
    filter: blur(14px);
    transition: opacity 0.35s ease;
}

.command-expand-btn:hover .command-expand-glow {
    opacity: 0.55;
}

.command-expand-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(176, 38, 255, 0.14) 0%, rgba(12, 8, 20, 0.96) 100%);
    border: 1px solid rgba(176, 38, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.command-expand-btn:hover .command-expand-inner {
    transform: translateY(-2px);
    border-color: rgba(232, 121, 249, 0.75);
    box-shadow: 0 0 28px rgba(176, 38, 255, 0.2), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.command-expand-btn:active .command-expand-inner {
    transform: translateY(0);
}

.command-expand-title {
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f5e9ff;
}

.command-expand-title i {
    margin-right: 6px;
    color: #e9d5ff;
}

.command-expand-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--neon-green);
    text-shadow: 0 0 18px rgba(0, 255, 136, 0.35);
}

.command-max-notice {
    margin: 12px 0 0;
    padding: 12px 12px;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.85);
    background: rgba(0, 255, 136, 0.06);
    border: 1px dashed rgba(0, 255, 136, 0.35);
    border-radius: 10px;
    animation: commandMaxFade 0.5s ease;
}

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

.command-max-notice i {
    margin-right: 6px;
    color: var(--neon-green);
}

@media (prefers-reduced-motion: reduce) {
    .command-header::after,
    .command-icon-ring,
    .command-icon,
    .command-max-notice {
        animation: none !important;
    }
    .command-progress-fill {
        transition: none;
    }
}

/* ==========================================
   --- SKLEP V2 --- 
   ========================================== */

.expanded-shop { width: 800px; max-height: 650px; padding: 30px; display: flex; flex-direction: column; }

/* --- TECHNOLOGIE (sklep) — terminal --- */
.tech-shop-panel.expanded-shop {
    width: min(920px, calc(100vw - 48px));
    max-height: min(720px, calc(100vh - 160px));
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(176, 38, 255, 0.14);
    background:
        linear-gradient(168deg, rgba(18, 16, 28, 0.95) 0%, rgba(8, 9, 14, 0.98) 50%, rgba(12, 14, 22, 0.96) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(176, 38, 255, 0.07);
}

.tech-shop-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 15% 0%, rgba(176, 38, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 35% at 100% 80%, rgba(0, 208, 255, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.tech-shop-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(176, 38, 255, 0.07) 0%, transparent 100%);
}

.tech-shop-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tech-shop-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--neon-purple);
    background: linear-gradient(145deg, rgba(176, 38, 255, 0.25), rgba(176, 38, 255, 0.06));
    border: 1px solid rgba(176, 38, 255, 0.4);
    box-shadow: 0 0 28px rgba(176, 38, 255, 0.2);
}

.tech-shop-h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-main);
    text-shadow: 0 0 18px rgba(176, 38, 255, 0.2);
}

.tech-shop-sub {
    margin: 5px 0 0;
    max-width: 420px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    letter-spacing: 0.03em;
}

.tech-shop-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tech-shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(0, 208, 255, 0.1);
    border: 1px solid rgba(0, 208, 255, 0.35);
}

.tech-shop-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
}

.tech-shop-hint i {
    margin-right: 6px;
    color: var(--text-muted);
}

.tech-shop-filters-wrap {
    position: relative;
    z-index: 1;
    padding: 16px 26px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.tech-shop-filters-kicker {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.75);
    margin-bottom: 12px;
}

.tech-shop-filters.shop-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0;
}

.tech-shop-filters .filter-btn {
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 11, 16, 0.85);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.tech-shop-filters .filter-btn:hover {
    transform: translateY(-1px);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.tech-shop-filters .filter-btn.active {
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
}

.tech-shop-filters .filter-btn[data-filter="refinery"].active {
    color: var(--neon-orange);
    border-color: rgba(255, 170, 0, 0.55);
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 170, 0, 0.04));
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.12);
}

.tech-shop-filters .filter-btn[data-filter="tank"].active {
    color: var(--blue);
    border-color: rgba(0, 208, 255, 0.5);
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.15), rgba(0, 208, 255, 0.03));
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.12);
}

.tech-shop-filters .filter-btn[data-filter="totem"].active {
    color: #e9d5ff;
    border-color: rgba(176, 38, 255, 0.55);
    background: linear-gradient(135deg, rgba(176, 38, 255, 0.2), rgba(176, 38, 255, 0.05));
    box-shadow: 0 0 22px rgba(176, 38, 255, 0.15);
}

.tech-shop-grid-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    margin: 0 18px;
    padding: 4px 4px 8px;
    border-radius: 0 0 14px 14px;
    overflow-y: auto;
    overflow-x: hidden;
}

.tech-shop-grid-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background-image:
        linear-gradient(rgba(176, 38, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(176, 38, 255, 0.04) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    opacity: 0.6;
    mask-image: linear-gradient(180deg, transparent, black 12%);
}

.tech-shop-grid.shop-grid {
    margin: 0;
    padding: 18px 14px 22px;
    overflow: visible;
    max-height: none;
    gap: 20px;
}

.tech-shop-panel .tech-shop-grid .shop-card {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(165deg, rgba(28, 32, 42, 0.95) 0%, rgba(12, 14, 20, 0.98) 100%);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tech-shop-panel .tech-shop-grid .shop-card:hover {
    border-color: rgba(176, 38, 255, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 40px rgba(176, 38, 255, 0.08);
}

/* Sklep — grafiki budynków (PNG) muszą być wyraźnie większe niż ikony FA */
.tech-shop-panel .tech-shop-grid .shop-card .card-icon--image {
    min-height: clamp(6rem, 18vmin, 9rem);
    width: 100%;
}

.tech-shop-panel .tech-shop-grid .shop-card .shop-item-icon-img--card {
    max-height: clamp(5.5rem, 20vmin, 10rem);
    width: auto;
    max-width: min(100%, 260px);
    min-height: 5rem;
}

.tech-shop-pagination {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

.tech-pager-btn {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
    background: rgba(10, 11, 16, 0.9);
    border: 1px solid rgba(176, 38, 255, 0.25);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.tech-pager-btn:hover:not(:disabled) {
    border-color: var(--neon-purple);
    color: var(--neon-purple);
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.2);
    transform: translateY(-2px);
}

.tech-pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.tech-page-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 100px;
}

.tech-page-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.7);
}

.tech-page-numbers {
    font-size: 1.25rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--text-main);
    text-shadow: 0 0 14px rgba(176, 38, 255, 0.25);
}

.shop-filters { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.filter-btn {
    background: rgba(10, 11, 16, 0.8); border: 1px solid var(--panel-border); color: var(--text-muted); padding: 12px 30px; border-radius: 8px; cursor: pointer; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s; display: flex; gap: 10px; align-items: center;
}
.filter-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.filter-btn.active { background: rgba(0, 208, 255, 0.15); color: var(--blue); border-color: var(--blue); box-shadow: 0 0 15px rgba(0, 208, 255, 0.4); }

.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; overflow-y: auto; padding: 20px; align-content: start; margin: -20px; }
.shop-grid::-webkit-scrollbar { width: 6px; }
.shop-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 10px; margin: 20px 0; }
.shop-grid::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 10px; }

.tech-shop-grid-wrap::-webkit-scrollbar { width: 8px; }
.tech-shop-grid-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(176, 38, 255, 0.5), rgba(0, 208, 255, 0.35));
    border-radius: 10px;
}
.tech-shop-grid-wrap::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 10px; }

@media (max-width: 700px) {
.tech-shop-grid.shop-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   --- LABORATORIUM (prestiż / RP) ---
   ========================================== */

.lab-terminal-panel.expanded-shop {
    width: min(1040px, calc(100vw - 40px));
    max-height: min(920px, calc(100vh - 96px));
    min-height: min(820px, calc(100vh - 120px));
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.18);
    background:
        linear-gradient(168deg, rgba(28, 22, 12, 0.96) 0%, rgba(8, 9, 14, 0.98) 45%, rgba(14, 12, 8, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(255, 200, 80, 0.06);
}

.lab-terminal-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 40% at 50% -15%, rgba(255, 215, 0, 0.14), transparent 55%),
        radial-gradient(ellipse 45% 30% at 0% 100%, rgba(255, 100, 50, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.lab-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.12);
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.08) 0%, transparent 100%);
}

.lab-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lab-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffd700;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.22), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.45);
    box-shadow: 0 0 28px rgba(255, 215, 0, 0.18);
}

.lab-h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff8e8;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
}

.lab-sub {
    margin: 5px 0 0;
    max-width: 400px;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.lab-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.lab-badge-arcane {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.35);
}

.lab-meta-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    max-width: 280px;
    text-align: right;
    line-height: 1.35;
}

.lab-meta-hint i { margin-right: 6px; color: rgba(255, 215, 0, 0.5); }

.lab-prestige-section {
    position: relative;
    z-index: 1;
    margin: 18px 22px 0;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.lab-prestige-glow {
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 50% 30%, rgba(255, 215, 0, 0.12), transparent 55%);
    pointer-events: none;
}

.lab-prestige-inner {
    position: relative;
    padding: 22px 24px 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 215, 0, 0.22);
    background:
        linear-gradient(135deg, rgba(40, 32, 18, 0.6) 0%, rgba(12, 11, 8, 0.92) 100%);
    box-shadow: inset 0 0 60px rgba(255, 215, 0, 0.04);
}

.lab-prestige-head {
    text-align: center;
    margin-bottom: 20px;
}

.lab-prestige-kicker {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.65);
    margin-bottom: 8px;
}

.lab-prestige-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 900;
    color: #ffeaa7;
    text-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
}

.lab-prestige-title i {
    margin-right: 8px;
    color: #ff9f43;
}

.lab-prestige-desc {
    margin: 0 auto;
    max-width: 560px;
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.75);
}

.lab-prestige-desc strong { color: #fff; }

.lab-rp-word {
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.lab-prestige-btn {
    position: relative;
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
}

.lab-prestige-btn-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(120deg, #ffd700, #ff9f43, #ffd700);
    opacity: 0.35;
    filter: blur(14px);
    transition: opacity 0.35s ease;
}

.lab-prestige-btn:hover .lab-prestige-btn-glow {
    opacity: 0.55;
}

.lab-prestige-btn-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.16) 0%, rgba(20, 16, 8, 0.98) 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.lab-prestige-btn:hover .lab-prestige-btn-inner {
    transform: translateY(-2px);
    border-color: rgba(255, 236, 160, 0.75);
}

.lab-prestige-btn:active .lab-prestige-btn-inner {
    transform: translateY(0);
}

.lab-prestige-btn-main {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fffef5;
}

.lab-prestige-btn-sub {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 236, 180, 0.9);
}

.lab-cost-pill {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #1a1408;
    background: linear-gradient(180deg, #ffe082 0%, #ffd700 100%);
    box-shadow: 0 2px 12px rgba(255, 215, 0, 0.35);
}

.lab-upgrades-section {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 18px 0 0;
}

.lab-upgrades-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lab-upgrades-pagination {
    flex-shrink: 0;
}

.lab-upgrades-pagination.tech-shop-pagination {
    padding: 12px 18px 18px;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
}

.lab-upgrades-pagination .tech-pager-btn {
    border-color: rgba(255, 215, 0, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.lab-upgrades-pagination .tech-pager-btn:hover:not(:disabled) {
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.2);
}

.lab-upgrades-page-numbers {
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.35);
}

.lab-section-head {
    flex-shrink: 0;
    padding: 0 26px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lab-section-kicker {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(0, 208, 255, 0.55);
    margin-bottom: 8px;
}

.lab-section-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-main);
}

.lab-section-title i {
    margin-right: 8px;
    color: var(--blue);
}

.lab-section-desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lab-upgrades-grid.shop-grid {
    flex: 1;
    min-height: 0;
    margin: 0 18px 0;
    padding: 12px 12px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 12px;
    align-content: start;
    grid-template-columns: 1fr;
}

.lab-upgrades-grid::-webkit-scrollbar { width: 8px; }
.lab-upgrades-grid::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 10px; }
.lab-upgrades-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.45), rgba(255, 140, 50, 0.35));
    border-radius: 10px;
}

.lab-upgrade-card.shop-card {
    /* Wyższa specyficzność niż .shop-card — nie ucinać opisów (globalny .shop-card ma overflow:hidden) */
    overflow: visible;
    min-height: auto;
    padding: 16px 18px;
    border-radius: 14px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 14px 18px;
    border: 1px solid rgba(255, 215, 0, 0.18);
    background: linear-gradient(95deg, rgba(32, 28, 22, 0.95) 0%, rgba(10, 11, 14, 0.98) 100%);
    cursor: default;
}

.lab-upgrade-card.shop-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 215, 0, 0.06);
}

.lab-upgrade-icon-box {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin-top: 2px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lab-upgrade-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1;
    overflow: visible;
}

.lab-upgrade-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    justify-content: space-between;
}

.lab-upgrade-name {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.02em;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.lab-upgrade-lvl-badge {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffd700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.25);
}

.lab-upgrade-meta {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-muted);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.lab-meta-strong { color: rgba(226, 232, 240, 0.75); font-weight: 600; }
.lab-meta-mult { color: var(--neon-green); font-weight: 800; margin-left: 4px; }
.lab-meta-arrow { color: var(--text-muted); margin: 0 2px; }
.lab-meta-next { color: rgba(148, 163, 184, 0.95); font-weight: 700; }

.lab-upgrade-cta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 124px;
    padding-top: 2px;
    z-index: 1;
}

.lab-upgrade-price {
    font-size: 0.95rem !important;
    white-space: nowrap;
}

.lab-upgrade-btn {
    min-width: 112px;
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 10px 14px !important;
}

.lab-level-track {
    display: flex;
    gap: 5px;
    max-width: 220px;
    margin-top: 0;
}

.lab-level-dot {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.lab-level-dot.is-lit {
    background: linear-gradient(90deg, #ffd700, #ffb347);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.lab-upgrade-card .card-buy-btn {
    border-radius: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lab-upgrade-card:not(.is-maxed) .card-buy-btn {
    cursor: pointer;
}

.lab-upgrade-card:not(.is-maxed) .card-buy-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
}

.lab-upgrade-card.is-maxed .card-buy-btn {
    cursor: not-allowed;
}

@media (max-width: 960px) {
    .lab-upgrade-card.shop-card {
        flex-wrap: wrap;
    }
    .lab-upgrade-cta {
        flex-direction: row;
        width: 100%;
        min-width: 0;
        justify-content: space-between;
        align-items: center;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    .lab-level-track {
        max-width: none;
    }
}

.shop-card {
    background: linear-gradient(160deg, rgba(30, 34, 45, 0.8) 0%, rgba(15, 17, 21, 0.95) 100%);
    border: 2px solid rgba(255,255,255,0.03); border-radius: 16px; padding: 25px; display: flex; flex-direction: column; gap: 15px; cursor: pointer; position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.card-glow { position: absolute; width: 150px; height: 150px; top: -75px; right: -75px; filter: blur(60px); opacity: 0.15; transition: opacity 0.3s; z-index: 0; pointer-events: none; }
.shop-card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.25); box-shadow: 0 15px 35px rgba(0,0,0,0.7); }
.shop-card:hover .card-glow { opacity: 0.4; }

.card-icon { font-size: 3rem; color: var(--neon-orange); text-shadow: 0 0 20px rgba(255, 170, 0, 0.3); z-index: 1; transition: transform 0.3s; display: flex; align-items: center; justify-content: center; }
.card-icon--image { font-size: unset; min-height: 3rem; }
.shop-item-icon-img--card {
    max-height: 3.2rem;
    width: auto;
    max-width: min(100%, 140px);
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 14px rgba(255, 170, 0, 0.4));
}

.shop-item-icon-img--ghost {
    height: 1.15em;
    width: auto;
    max-width: 48px;
    vertical-align: -0.12em;
    object-fit: contain;
    display: inline-block;
    filter: drop-shadow(0 0 6px rgba(255, 170, 0, 0.45));
}
.shop-card:hover .card-icon { transform: scale(1.1) rotate(-5deg); }

.card-content { flex: 1; z-index: 1; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 15px; }
.card-title { font-size: 1.4rem; font-weight: 900; color: var(--text-main); margin-bottom: 5px; }
.card-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.highlight-text { color: var(--text-main); font-weight: bold; }

.card-action { display: flex; justify-content: space-between; align-items: center; z-index: 1; margin-top: 5px; }
.card-price { font-size: 1.3rem; font-weight: 900; color: var(--neon-green); text-shadow: 0 0 10px rgba(0,255,136,0.3); }
.card-buy-btn { background: rgba(0, 255, 136, 0.1); color: var(--neon-green); border: 1px solid var(--neon-green); padding: 8px 20px; border-radius: 8px; font-weight: 800; font-size: 0.9rem; letter-spacing: 1px; transition: all 0.3s; cursor: pointer; }
.card-buy-btn:hover { background: var(--neon-green); color: var(--bg-dark); box-shadow: 0 0 15px var(--neon-green); }

.btn-equip { background: rgba(0, 208, 255, 0.15); color: white; border-color: var(--blue); }
.btn-equip:hover { background: var(--blue); color: var(--bg-dark); box-shadow: 0 0 15px var(--blue); }
.btn-equip:hover i { color: var(--bg-dark) !important; }

.btn-sell-inv { background: rgba(255, 51, 102, 0.15); color: white; border-color: var(--red); }
.btn-sell-inv:hover { background: var(--red); color: white; box-shadow: 0 0 15px var(--red); }
.btn-sell-inv:hover i { color: white !important; }

/* ==========================================
   --- GIEŁDA (RYNEK) — terminal premium --- 
   ========================================== */

.expanded-market {
    width: min(980px, calc(100vw - 48px));
    max-height: min(760px, calc(100vh - 160px));
    padding: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(0, 208, 255, 0.12);
    background:
        linear-gradient(165deg, rgba(15, 17, 26, 0.92) 0%, rgba(8, 9, 14, 0.98) 45%, rgba(12, 14, 22, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(0, 208, 255, 0.06);
}

.expanded-market::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(176, 38, 255, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(0, 255, 136, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.market-terminal-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 28px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.06) 0%, transparent 100%);
}

.market-terminal-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.market-terminal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--blue);
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.2), rgba(0, 208, 255, 0.05));
    border: 1px solid rgba(0, 208, 255, 0.35);
    box-shadow: 0 0 24px rgba(0, 208, 255, 0.15);
}

.market-terminal-h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.12);
}

.market-terminal-sub {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.market-live-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.market-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--neon-green);
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.12);
}

.market-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 12px var(--neon-green);
    animation: marketPulse 1.4s ease-in-out infinite;
}

@keyframes marketPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.85); }
}

.market-session-tag {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.market-session-tag i { margin-right: 6px; color: var(--blue); }

.market-layout {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 24px;
    flex: 1;
    min-height: 0;
    padding: 22px 26px 26px;
}

.market-left {
    flex: 1.25;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.market-price-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    position: relative;
    padding: 22px 22px 20px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(22, 24, 34, 0.95) 0%, rgba(10, 11, 16, 0.98) 100%);
    border: 1px solid rgba(176, 38, 255, 0.22);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 60px rgba(176, 38, 255, 0.08);
    overflow: hidden;
}

.market-price-corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.market-price-corners span {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: rgba(0, 208, 255, 0.45);
    border-style: solid;
    opacity: 0.7;
}

.market-price-corners span:nth-child(1) { top: 10px; left: 10px; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.market-price-corners span:nth-child(2) { top: 10px; right: 10px; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.market-price-corners span:nth-child(3) { bottom: 10px; left: 10px; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.market-price-corners span:nth-child(4) { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

.market-price-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 208, 255, 0.02) 2px,
        rgba(0, 208, 255, 0.02) 4px
    );
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    mask-image: linear-gradient(180deg, transparent, black 30%, black 70%, transparent);
}

.market-price-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.market-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(0, 208, 255, 0.75);
}

.market-ticker-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.market-ticker-label i { margin-right: 8px; color: var(--neon-purple); }

.market-price-hero {
    position: relative;
    z-index: 1;
    margin-bottom: 12px;
    padding: 14px 0 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.market-price-value {
    font-weight: 900;
    color: var(--neon-purple);
    transition: color 0.35s ease, text-shadow 0.35s ease;
}

.market-price-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.market-price-num {
    font-size: clamp(3.2rem, 8vw, 4.75rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: 0 0 40px rgba(176, 38, 255, 0.45);
}

.market-price-currency {
    font-size: 2rem;
    color: rgba(255, 215, 0, 0.95);
    filter: drop-shadow(0 0 12px rgba(255, 200, 0, 0.35));
}

.market-price-per {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.market-fluctuation {
    position: relative;
    z-index: 1;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.market-fluctuation i {
    margin-right: 8px;
    color: var(--blue);
}

.market-fluctuation strong {
    color: var(--text-main);
    font-weight: 800;
}

.market-chart-shell {
    position: relative;
    z-index: 1;
    margin-top: auto;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(8, 9, 14, 0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.market-chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 0;
    flex-wrap: wrap;
}

.market-chart-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.market-chart-title i {
    margin-right: 6px;
    color: var(--neon-purple);
}

.market-chart-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: ui-monospace, 'Cascadia Code', monospace;
}

.market-chart-inner {
    height: 200px;
    padding: 8px 10px 12px;
    position: relative;
}

.market-chart-inner canvas {
    filter: drop-shadow(0 4px 20px rgba(176, 38, 255, 0.12));
}

.market-right {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
}

.market-side-stack {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: stretch;
}

.market-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 18px 18px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.25) 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.market-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 208, 255, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.market-card-icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.market-card-icon-oil {
    color: var(--neon-orange);
    background: linear-gradient(145deg, rgba(255, 170, 0, 0.2), rgba(255, 170, 0, 0.05));
    border: 1px solid rgba(255, 170, 0, 0.35);
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.12);
}

.market-card-icon-profit {
    color: var(--neon-green);
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.18), rgba(0, 255, 136, 0.04));
    border: 1px solid rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

.market-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.market-card-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.market-card-value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
}

.oil-value {
    color: var(--neon-orange);
    text-shadow: 0 0 20px rgba(255, 170, 0, 0.35);
}

.market-card-foot {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

.market-card-profit .market-card-foot { color: rgba(0, 255, 136, 0.45); }

.profit-amount {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--neon-green);
    text-shadow: 0 0 18px rgba(0, 255, 136, 0.35);
}

.market-profit-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.market-sell-cta {
    position: relative;
    margin-top: auto;
    padding: 0;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    text-align: left;
}

.market-sell-cta-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(120deg, var(--neon-green), var(--blue), var(--neon-purple));
    opacity: 0.45;
    filter: blur(12px);
    transition: opacity 0.35s ease;
}

.market-sell-cta:hover .market-sell-cta-glow {
    opacity: 0.75;
}

.market-sell-cta-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.14) 0%, rgba(0, 20, 14, 0.95) 100%);
    border: 1px solid rgba(0, 255, 136, 0.45);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4) inset,
        0 12px 32px rgba(0, 0, 0, 0.4);
    color: var(--neon-green);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.market-sell-cta:hover .market-sell-cta-inner {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 136, 0.75);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4) inset,
        0 18px 40px rgba(0, 255, 136, 0.15);
}

.market-sell-cta:active .market-sell-cta-inner {
    transform: translateY(0);
}

.market-sell-cta-inner > i:first-child {
    font-size: 1.25rem;
    margin-bottom: 2px;
    color: var(--neon-green);
}

.market-sell-cta-text {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e8fff4;
}

.market-sell-cta-sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(0, 255, 136, 0.65);
    line-height: 1.4;
}

.fake-chart-bg { display: none; }
.chart-bar { display: none; }

@media (max-width: 900px) {
.market-layout {
        flex-direction: column;
        padding: 18px;
    }
.market-right { min-width: unset; }
.market-chart-inner { height: 180px; }
}

/* AUTH — terminal logowania / rejestracji */
.auth-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 24px 16px;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 208, 255, 0.14), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(255, 170, 0, 0.06), transparent 50%),
        radial-gradient(ellipse 40% 35% at 0% 80%, rgba(176, 38, 255, 0.08), transparent 50%),
        rgba(6, 8, 14, 0.94);
    backdrop-filter: blur(24px);
}

.auth-overlay.active-view {
    display: flex;
    animation: fadeIn 0.55s ease;
}

/* --- Samouczek — czytelny układ, spójne z UI gry --- */
.tutorial-overlay {
    z-index: 1100;
}

.tutorial-panel {
    position: relative;
    width: min(680px, calc(100vw - 28px));
    max-height: min(90vh, 760px);
    padding: 26px 26px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    border: 1px solid rgba(0, 208, 255, 0.28);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 28px 64px rgba(0, 0, 0, 0.6),
        0 0 64px rgba(0, 208, 255, 0.1);
    overflow: hidden;
}

.tutorial-panel-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00d0ff, #b026ff 55%, #ff6b35);
    opacity: 0.85;
    pointer-events: none;
}

.tutorial-header {
    position: relative;
    z-index: 1;
    padding-right: 40px;
}

.tutorial-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tutorial-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 208, 255, 0.85);
    font-family: ui-monospace, monospace;
}

.tutorial-step-badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 208, 255, 0.35);
    background: rgba(0, 208, 255, 0.1);
    color: #b8f0ff;
    font-family: ui-monospace, monospace;
}

.tutorial-close-x {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 18, 0.92);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tutorial-close-x:hover {
    color: var(--neon-orange);
    border-color: rgba(255, 170, 0, 0.35);
    background: rgba(255, 100, 50, 0.08);
}

.tutorial-h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2.8vw, 1.45rem);
    font-weight: 800;
    color: #f0f7ff;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.tutorial-body {
    font-size: 0.94rem;
    line-height: 1.6;
    color: rgba(225, 232, 245, 0.95);
    max-height: min(52vh, 440px);
    overflow-x: hidden;
    padding-right: 4px;
    position: relative;
    z-index: 1;
}

.tutorial-body p {
    margin: 0 0 14px;
}

.tutorial-body p:last-child {
    margin-bottom: 0;
}

.tutorial-lead {
    font-size: 1.02rem;
    line-height: 1.55;
    color: rgba(240, 245, 255, 0.98);
    margin-bottom: 16px !important;
}

.tutorial-p {
    margin-top: 4px;
    color: rgba(215, 225, 240, 0.92);
}

.tutorial-body strong {
    color: #ffc266;
    font-weight: 600;
}

.tutorial-body em {
    color: rgba(180, 230, 255, 0.95);
    font-style: normal;
    font-weight: 500;
}

/* Schemat: Technologie → Baza → Rynek */
.tutorial-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    margin: 16px 0 18px;
    padding: 16px 14px;
    border-radius: 14px;
    border: 1px solid rgba(176, 38, 255, 0.22);
    background: linear-gradient(145deg, rgba(10, 18, 28, 0.95), rgba(18, 12, 32, 0.88));
}

.tutorial-flow-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e8f4ff;
    border: 1px solid rgba(0, 208, 255, 0.25);
    background: rgba(0, 208, 255, 0.08);
}

.tutorial-flow-item i {
    color: var(--blue);
    opacity: 0.95;
}

.tutorial-flow-arrow {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
}

/* Lista definicji — górny pasek */
.tutorial-dl {
    margin: 0 0 14px;
    padding: 0;
}

.tutorial-dl-row {
    display: grid;
    grid-template-columns: minmax(100px, 120px) 1fr;
    gap: 10px 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: start;
}

.tutorial-dl-row:last-child {
    border-bottom: none;
}

.tutorial-dl dt {
    margin: 0;
    font-weight: 700;
    font-size: 0.82rem;
    color: #9ee8ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-dl dt i {
    width: 1.1em;
    text-align: center;
    opacity: 0.9;
}

.tutorial-dl dd {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(220, 228, 240, 0.92);
    line-height: 1.5;
}

@media (max-width: 520px) {
    .tutorial-dl-row {
        grid-template-columns: 1fr;
    }
}

.tutorial-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 170, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 120, 40, 0.12), rgba(255, 50, 80, 0.06));
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 235, 220, 0.96);
}

.tutorial-warning > i {
    flex-shrink: 0;
    margin-top: 2px;
    color: #ffb020;
    font-size: 1.1rem;
}

.tutorial-warning strong {
    color: #ffd28a;
}

/* Karty planu zakupów */
.tutorial-plan {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 14px;
}

.tutorial-plan-plus {
    align-self: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 4px;
}

.tutorial-plan-card {
    flex: 1 1 200px;
    max-width: 260px;
    min-width: 160px;
    padding: 16px 14px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(8, 14, 22, 0.75);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.tutorial-plan-card--refinery {
    border-color: rgba(255, 140, 60, 0.35);
    background: linear-gradient(165deg, rgba(255, 100, 40, 0.12), rgba(10, 14, 22, 0.9));
}

.tutorial-plan-card--tank {
    border-color: rgba(0, 208, 255, 0.35);
    background: linear-gradient(165deg, rgba(0, 120, 200, 0.15), rgba(10, 14, 22, 0.9));
}

.tutorial-plan-icon {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.tutorial-plan-card--refinery .tutorial-plan-icon {
    color: var(--neon-orange);
}

.tutorial-plan-card--tank .tutorial-plan-icon {
    color: var(--blue);
}

.tutorial-plan-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #f2f8ff;
    margin-bottom: 4px;
}

.tutorial-plan-meta {
    font-size: 0.75rem;
    color: rgba(200, 210, 225, 0.75);
    margin-bottom: 10px;
}

.tutorial-plan-price {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: ui-monospace, monospace;
    color: #ffd700;
}

.tutorial-plan-price i {
    margin-left: 4px;
    opacity: 0.9;
}

.tutorial-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    margin: 8px 0 16px;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 215, 0, 0.35);
    background: rgba(255, 215, 0, 0.06);
    font-family: ui-monospace, monospace;
}

.tutorial-sum span:first-child {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.75);
}

.tutorial-sum strong {
    font-size: 1.2rem;
    color: #ffe066;
}

.tutorial-sum-note {
    font-size: 0.8rem;
    color: rgba(200, 210, 220, 0.7);
    font-family: inherit;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.tutorial-hint {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 160, 0.22);
    background: rgba(0, 255, 160, 0.07);
    font-size: 0.88rem;
    line-height: 1.55;
    color: rgba(210, 255, 230, 0.95);
}

.tutorial-hint i {
    margin-right: 8px;
    color: #5effb0;
}

.tutorial-hint strong {
    color: #b8ffd9;
}

.tutorial-hint--muted {
    border-color: rgba(0, 208, 255, 0.2);
    background: rgba(0, 208, 255, 0.06);
    color: rgba(215, 235, 255, 0.92);
}

.tutorial-hint--muted i {
    color: var(--blue);
}

.tutorial-hint--muted strong {
    color: #8ad8ff;
}

/* Lista numerowana — budowa */
.tutorial-ol {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.tutorial-ol li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tutorial-ol li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tutorial-ol-n {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    background: rgba(0, 208, 255, 0.15);
    border: 1px solid rgba(0, 208, 255, 0.35);
    color: #9ef0ff;
}

.tutorial-tabs-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tutorial-tabs-list li {
    position: relative;
    padding: 12px 12px 12px 44px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 10, 18, 0.55);
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(220, 228, 240, 0.95);
}

.tutorial-tabs-list li > i {
    position: absolute;
    left: 14px;
    top: 14px;
    color: rgba(0, 208, 255, 0.75);
    width: 1.25rem;
    text-align: center;
}

.tutorial-tabs-list strong {
    color: #ffd4a8;
}

.tutorial-close-line {
    margin-top: 16px !important;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.08);
    font-size: 0.92rem;
    color: rgba(220, 255, 235, 0.98);
}

.tutorial-close-line i {
    color: #5eff9a;
    margin-right: 8px;
}

.tutorial-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 4px;
}

.tutorial-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.25s, transform 0.25s;
}
.tutorial-dot.is-active {
    background: linear-gradient(135deg, #00d0ff, #b026ff);
    transform: scale(1.2);
    box-shadow: 0 0 12px rgba(0, 208, 255, 0.5);
}

.tutorial-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tutorial-btn-skip {
    align-self: flex-start;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 4px 0;
}
.tutorial-btn-skip:hover {
    color: var(--neon-orange);
}

.tutorial-actions-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tutorial-nav-btn {
    min-width: 118px;
}

.tutorial-nav-btn--primary {
    margin-left: auto;
}

.btn-tutorial-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 208, 255, 0.28);
    background: rgba(0, 208, 255, 0.08);
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-tutorial-top:hover {
    background: rgba(0, 208, 255, 0.16);
    border-color: rgba(0, 208, 255, 0.45);
    box-shadow: 0 0 16px rgba(0, 208, 255, 0.15);
    color: #9ef0ff;
}

@media (max-width: 900px) {
    .btn-tutorial-top span {
        display: none;
    }
    .btn-tutorial-top {
        padding: 8px 10px;
    }
    .btn-admin-broadcast-top span {
        display: none;
    }
    .btn-admin-broadcast-top {
        padding: 8px 10px;
    }
}

.topbar .btn-tutorial-top,
.topbar .btn-admin-broadcast-top {
    flex-shrink: 0;
}

.btn-admin-broadcast-top {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 80, 100, 0.45);
    background: rgba(255, 60, 80, 0.12);
    color: #ff8a9a;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-admin-broadcast-top:hover {
    background: rgba(255, 60, 80, 0.22);
    border-color: rgba(255, 120, 140, 0.65);
    box-shadow: 0 0 18px rgba(255, 80, 100, 0.25);
    color: #ffc0c8;
}

/* Modal admina — treść alertu globalnego */
.admin-broadcast-modal {
    z-index: 120000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.admin-broadcast-card {
    width: min(440px, 100%);
    padding: 22px 22px 18px;
}

.admin-broadcast-title {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f2f8ff;
}

.admin-broadcast-lead {
    margin: 0 0 14px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(180, 200, 230, 0.92);
}

.admin-broadcast-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(200, 215, 240, 0.9);
}

.admin-broadcast-textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.admin-broadcast-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* Komunikat globalny — czerwony fullscreen */
.global-broadcast-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(90, 0, 0, 0.94) 0%, rgba(40, 0, 0, 0.97) 50%, rgba(20, 0, 0, 0.98) 100%);
    border: 4px solid rgba(255, 60, 60, 0.65);
    box-shadow: inset 0 0 120px rgba(255, 0, 0, 0.25);
}

.global-broadcast-inner {
    max-width: min(920px, 100%);
    text-align: center;
}

.global-broadcast-line {
    margin: 0 0 28px;
    font-size: clamp(1.15rem, 3.5vw, 2rem);
    font-weight: 700;
    line-height: 1.45;
    color: #ff4d4d;
    text-shadow:
        0 0 20px rgba(255, 40, 40, 0.9),
        0 0 40px rgba(255, 0, 0, 0.45);
}

.global-broadcast-author {
    color: #ff9a9a;
    font-weight: 800;
}

.global-broadcast-msg {
    color: #ff6b6b;
    font-weight: 700;
}

.global-broadcast-timer-hint {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 180, 180, 0.75);
}

.auth-box {
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Modalne boxy (bez głównego panelu) — stary wygląd */
.auth-box:not(.auth-panel-main) {
    width: 450px;
    max-width: calc(100vw - 32px);
    padding: 40px;
}

.auth-box:not(.auth-panel-main)::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 208, 255, 0.1) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* ——— Główny panel logowania ——— */
.auth-panel-main {
    width: min(460px, calc(100vw - 32px));
    max-width: 100%;
    padding: 0;
    border-radius: 22px;
    border: 1px solid rgba(0, 208, 255, 0.28);
    background:
        linear-gradient(165deg, rgba(12, 16, 28, 0.97) 0%, rgba(8, 9, 14, 0.99) 45%, rgba(10, 12, 22, 0.96) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 28px 64px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(0, 208, 255, 0.08);
}

.auth-panel-glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 45% at 50% -5%, rgba(0, 208, 255, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 30% at 100% 100%, rgba(255, 170, 0, 0.05), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.auth-panel-scanlines {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.45) 2px,
        rgba(0, 0, 0, 0.45) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.auth-panel-inner {
    position: relative;
    z-index: 2;
    padding: 28px 28px 26px;
    text-align: left;
}

.auth-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 208, 255, 0.15);
}

.auth-head-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.auth-head-icon {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: var(--blue);
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.22), rgba(0, 208, 255, 0.05));
    border: 1px solid rgba(0, 208, 255, 0.45);
    border-radius: 16px;
    box-shadow: 0 0 28px rgba(0, 208, 255, 0.2);
}

.auth-head-icon-ring {
    position: absolute;
    inset: -4px;
    border-radius: 18px;
    border: 1px solid rgba(0, 208, 255, 0.25);
    animation: authIconPulse 3s ease-in-out infinite;
}

@keyframes authIconPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.auth-head-text {
    min-width: 0;
    text-align: left;
}

.auth-panel-main .auth-brand {
    font-size: 1.85rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin: 0;
    line-height: 1.15;
    text-shadow: 0 0 24px rgba(255, 170, 0, 0.35);
}

.auth-panel-main .auth-brand span {
    color: var(--neon-orange);
}

.auth-panel-main .auth-subtitle {
    margin: 6px 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.auth-head-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-chip i {
    color: var(--neon-green);
    font-size: 0.75rem;
}

.auth-chip--live {
    color: #a7f3d0;
    border-color: rgba(0, 255, 136, 0.35);
    background: rgba(0, 255, 136, 0.08);
}

.auth-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: authLiveBlink 1.8s ease-in-out infinite;
}

@keyframes authLiveBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-bottom: 22px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 208, 255, 0.12);
    box-shadow: inset 0 0 24px rgba(0, 208, 255, 0.04);
}

.auth-tab-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    padding: 12px 14px;
    border-radius: 11px;
}

.auth-tab-btn:hover {
    color: var(--text-main);
}

.auth-tab-btn.active {
    color: #ecfeff;
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.22) 0%, rgba(0, 208, 255, 0.08) 100%);
    box-shadow:
        0 0 0 1px rgba(0, 208, 255, 0.35),
        0 0 24px rgba(0, 208, 255, 0.15);
}

.auth-tab-btn.active::after {
    display: none;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 14px;
}

.auth-form.active-form {
    display: flex;
    animation: fadeIn 0.4s ease;
}

.auth-panel-main .input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-panel-main .input-group i {
    position: absolute;
    left: 16px;
    color: rgba(148, 163, 184, 0.85);
    font-size: 1.05rem;
    transition: color 0.25s ease, filter 0.25s ease;
    z-index: 1;
    pointer-events: none;
}

.auth-panel-main .input-group input {
    width: 100%;
    padding: 15px 16px 15px 48px;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid rgba(0, 208, 255, 0.25);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.auth-panel-main .input-group input::placeholder {
    color: rgba(148, 163, 184, 0.65);
}

.auth-panel-main .input-group input:hover {
    border-left-color: rgba(0, 208, 255, 0.45);
    background: rgba(0, 0, 0, 0.5);
}

.auth-panel-main .input-group:focus-within i {
    color: var(--blue);
    filter: drop-shadow(0 0 8px rgba(0, 208, 255, 0.4));
}

.auth-panel-main .input-group:focus-within input {
    border-color: rgba(0, 208, 255, 0.45);
    border-left-color: var(--blue);
    box-shadow:
        0 0 0 1px rgba(0, 208, 255, 0.15),
        0 0 22px rgba(0, 208, 255, 0.12),
        inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}

.auth-panel-main .input-group input:not(:placeholder-shown) {
    border-left-color: rgba(0, 208, 255, 0.45);
}

/* Przyciski główne — panel auth (nie psuje innych .btn-auth) */
.auth-panel-main .auth-submit-btn {
    position: relative;
    margin-top: 8px;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0a0b10;
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.95) 0%, rgba(0, 160, 200, 0.85) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12) inset,
        0 10px 32px rgba(0, 0, 0, 0.45),
        0 0 36px rgba(0, 208, 255, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-panel-main .auth-submit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18) inset,
        0 14px 40px rgba(0, 0, 0, 0.5),
        0 0 48px rgba(0, 208, 255, 0.45);
}

.auth-panel-main .auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.2) 50%, transparent 60%);
    transform: translateX(-100%);
    animation: authSubmitShine 4s ease-in-out infinite;
}

@keyframes authSubmitShine {
    0% { transform: translateX(-120%); opacity: 0; }
    15% { opacity: 0.35; }
    100% { transform: translateX(120%); opacity: 0; }
}

.auth-submit-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-panel-main .auth-error-msg {
    margin-top: 16px;
    padding: 12px 14px;
    min-height: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
    color: #fecaca;
    text-align: center;
    border-radius: 12px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.35);
}

.auth-panel-main .auth-error-msg:empty {
    display: none;
}

/* Globalne .btn-auth (modale, inne) */
.btn-auth {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 0 15px rgba(0, 208, 255, 0.1) inset;
}

.btn-auth:hover {
    background: var(--blue);
    color: var(--bg-dark);
    box-shadow: 0 0 25px rgba(0, 208, 255, 0.6);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .auth-head-icon-ring,
    .auth-chip-dot,
    .auth-submit-glow {
        animation: none !important;
    }
}

/* TOASTS — prawy dół, glass + akcent + pasek czasu (bez color-mix — starsze przeglądarki) */
.game-toast {
    --toast-accent: var(--red);
    position: fixed;
    z-index: 99990;
    bottom: 20px;
    right: 16px;
    width: min(420px, calc(100vw - 32px));
    max-width: min(420px, calc(100vw - 32px));
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 14px;
    overflow: hidden;
    pointer-events: none;
    color: #f1f5f9;
    font-family: inherit;
    background:
        linear-gradient(145deg, rgba(18, 20, 32, 0.97) 0%, rgba(8, 10, 18, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 4px 6px rgba(0, 0, 0, 0.35),
        0 24px 48px rgba(0, 0, 0, 0.55),
        0 0 48px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    opacity: 0;
    transform: translate3d(120%, 0, 0) scale(0.94);
    filter: blur(2px);
    transition:
        opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.35s ease;
}

.game-toast__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(255, 80, 120, 0.12), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(0, 208, 255, 0.06), transparent 50%);
    opacity: 0.85;
}

.game-toast__body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px 14px 16px;
    border-left: 4px solid var(--toast-accent);
}

.game-toast__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.15rem;
    color: var(--toast-accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.game-toast__msg {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.game-toast__progress {
    position: relative;
    z-index: 1;
    height: 3px;
    background: rgba(0, 0, 0, 0.45);
}

.game-toast__progress-fill {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(1);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), var(--toast-accent));
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.game-toast.show {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

.game-toast.show .game-toast__progress-fill {
    animation: gameToastProgress 2.5s linear forwards;
}

@keyframes gameToastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.game-toast[data-tone="success"] .game-toast__glow {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(34, 197, 94, 0.18), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(0, 208, 255, 0.06), transparent 50%);
}
.game-toast[data-tone="error"] .game-toast__glow {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(248, 113, 113, 0.2), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(0, 208, 255, 0.05), transparent 50%);
}
.game-toast[data-tone="warn"] .game-toast__glow {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(251, 191, 36, 0.16), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(0, 208, 255, 0.05), transparent 50%);
}
.game-toast[data-tone="info"] .game-toast__glow,
.game-toast[data-tone="gold"] .game-toast__glow,
.game-toast[data-tone="default"] .game-toast__glow {
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(56, 189, 248, 0.14), transparent 55%),
        radial-gradient(80% 60% at 100% 100%, rgba(0, 208, 255, 0.08), transparent 50%);
}

@media (prefers-reduced-motion: reduce) {
    .game-toast {
        transition: opacity 0.2s ease;
        transform: none !important;
        filter: none;
    }
    .game-toast.show {
        transform: none !important;
    }
    .game-toast.show .game-toast__progress-fill {
        animation: none !important;
        transform: scaleX(1) !important;
        opacity: 0.5;
    }
}

/* CHANGELOG & ADMIN — panel + karty */
.admin-input { width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.5); border: 1px solid var(--panel-border); border-radius: 8px; color: var(--text-main); font-size: 1rem; outline: none; transition: 0.3s; }
.admin-input:focus { border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(176, 38, 255, 0.2); }

.changelog-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Ranking globalny ─── */
.ranking-panel.expanded-shop {
    width: min(1100px, calc(100vw - 40px));
    max-height: min(780px, calc(100vh - 120px));
    min-height: 480px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(250, 204, 21, 0.22);
    background:
        linear-gradient(168deg, rgba(24, 20, 12, 0.97) 0%, rgba(8, 9, 14, 0.98) 50%, rgba(18, 14, 8, 0.96) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 64px rgba(250, 204, 21, 0.06);
}

.ranking-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% -15%, rgba(250, 204, 21, 0.12), transparent 55%),
        radial-gradient(ellipse 45% 35% at 100% 100%, rgba(234, 179, 8, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ranking-panel-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(250, 204, 21, 0.15);
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.08) 0%, transparent 100%);
}

.ranking-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.ranking-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #facc15;
    background: linear-gradient(145deg, rgba(250, 204, 21, 0.25), rgba(250, 204, 21, 0.06));
    border: 1px solid rgba(250, 204, 21, 0.45);
    box-shadow: 0 0 24px rgba(250, 204, 21, 0.2);
}

.ranking-h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: #fffbeb;
    text-shadow: 0 0 18px rgba(250, 204, 21, 0.25);
}

.ranking-lead {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 520px;
    line-height: 1.45;
}

.ranking-refresh-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    color: #fef08a;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(250, 204, 21, 0.35);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.ranking-refresh-btn:hover {
    border-color: #facc15;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.15);
    transform: translateY(-1px);
}

.ranking-grid {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 14px 18px 20px;
}

@media (max-width: 980px) {
    .ranking-grid {
        grid-template-columns: 1fr;
        max-height: none;
    }
}

.ranking-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 12px 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
}

.ranking-col-title {
    margin: 0 0 6px;
    font-size: 0.92rem;
    font-weight: 900;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ranking-col-title i {
    color: #facc15;
    opacity: 0.95;
}

.ranking-col-hint {
    margin: 0 0 10px;
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.35;
}

.ranking-list {
    flex: 1;
    min-height: 120px;
    max-height: min(420px, 42vh);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
}

.ranking-loading,
.ranking-empty,
.ranking-error {
    margin: 0;
    padding: 16px 10px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(148, 163, 184, 0.95);
}

.ranking-error {
    color: #fca5a5;
}

.ranking-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 17, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
}

.ranking-row--me {
    border-color: rgba(250, 204, 21, 0.45);
    background: linear-gradient(95deg, rgba(250, 204, 21, 0.12), rgba(15, 17, 22, 0.9));
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.08);
}

.ranking-rank {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #facc15;
    text-align: center;
}

.ranking-rank--1 { color: #fde047; text-shadow: 0 0 12px rgba(253, 224, 71, 0.35); }
.ranking-rank--2 { color: #e2e8f0; }
.ranking-rank--3 { color: #fdba74; }

.ranking-nick {
    font-weight: 700;
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-val {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #86efac;
    white-space: nowrap;
}

.ranking-val--cash {
    color: #fde047;
}

.changelog-panel.expanded-shop,
.admin-console-panel.expanded-shop {
    width: min(920px, calc(100vw - 48px));
    max-height: min(720px, calc(100vh - 160px));
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(176, 38, 255, 0.2);
    background:
        linear-gradient(168deg, rgba(16, 14, 28, 0.96) 0%, rgba(8, 9, 14, 0.98) 45%, rgba(12, 10, 22, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(176, 38, 255, 0.07);
}

.admin-console-panel.expanded-shop {
    border-color: rgba(192, 132, 252, 0.35);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(168, 85, 247, 0.12);
}

.changelog-panel::before,
.admin-console-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 45% at 50% -10%, rgba(176, 38, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 40% 30% at 100% 100%, rgba(0, 208, 255, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.changelog-panel-head,
.admin-console-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(176, 38, 255, 0.18);
    background: linear-gradient(180deg, rgba(176, 38, 255, 0.08) 0%, transparent 100%);
}

.admin-console-badge {
    border-color: rgba(232, 121, 249, 0.45) !important;
    color: #fae8ff !important;
    background: rgba(168, 85, 247, 0.12) !important;
}

.changelog-admin-panel.admin-console-inner {
    flex: 1 1 0%;
    min-height: 0;
    flex-shrink: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.changelog-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.changelog-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--neon-purple);
    background: linear-gradient(145deg, rgba(176, 38, 255, 0.22), rgba(176, 38, 255, 0.06));
    border: 1px solid rgba(176, 38, 255, 0.4);
    box-shadow: 0 0 26px rgba(176, 38, 255, 0.18);
    animation: changelogIconGlow 3.5s ease-in-out infinite;
}

@keyframes changelogIconGlow {
    0%, 100% { box-shadow: 0 0 18px rgba(176, 38, 255, 0.12); }
    50% { box-shadow: 0 0 32px rgba(176, 38, 255, 0.28); }
}

.changelog-h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f3e8ff;
    text-shadow: 0 0 20px rgba(176, 38, 255, 0.3);
}

.changelog-lead {
    margin: 6px 0 0;
    max-width: 480px;
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.88);
}

.changelog-head-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    background: rgba(0, 208, 255, 0.1);
    border: 1px solid rgba(0, 208, 255, 0.35);
}

.changelog-admin-panel {
    position: relative;
    z-index: 1;
    margin: 0 20px 16px;
    padding: 20px 20px 18px;
    border-radius: 16px;
    border: 1px dashed rgba(176, 38, 255, 0.35);
    background: linear-gradient(135deg, rgba(176, 38, 255, 0.08) 0%, rgba(0, 0, 0, 0.35) 100%);
    box-shadow: inset 0 0 40px rgba(176, 38, 255, 0.04);
    flex-shrink: 0;
}

.changelog-admin-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #e9d5ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.changelog-admin-title i {
    color: var(--neon-purple);
}

.changelog-field {
    margin-bottom: 12px;
    border-color: rgba(176, 38, 255, 0.28) !important;
    background: rgba(0, 0, 0, 0.45) !important;
}

.changelog-field--area {
    min-height: 100px;
    resize: vertical;
    margin-bottom: 14px;
}

.changelog-btn-publish {
    width: 100%;
    margin-top: 0 !important;
    border-color: var(--neon-purple) !important;
    color: #f3e8ff !important;
    background: rgba(176, 38, 255, 0.12) !important;
    box-shadow: 0 0 20px rgba(176, 38, 255, 0.12) inset;
}

.changelog-btn-publish:hover {
    background: var(--neon-purple) !important;
    color: var(--bg-dark) !important;
}

.changelog-admin-tools {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(176, 38, 255, 0.25);
}

.changelog-tools-title {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 900;
    color: rgba(254, 202, 202, 0.95);
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-tools-title i {
    color: var(--red);
}

.changelog-btn-danger {
    width: 100%;
    border-color: var(--red) !important;
    color: #fff !important;
    background: rgba(255, 51, 102, 0.12) !important;
    box-shadow: inset 0 0 18px rgba(255, 51, 102, 0.15);
}

.changelog-btn-danger:hover {
    background: var(--red) !important;
    color: #fff !important;
}

.changelog-list-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    margin: 0 16px 18px;
    padding: 4px 4px 8px;
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
}

.changelog-list-wrap::-webkit-scrollbar { width: 8px; }
.changelog-list-wrap::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 10px; }
.changelog-list-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(176, 38, 255, 0.55), rgba(0, 208, 255, 0.35));
    border-radius: 10px;
}

.changelog-list-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 8px 8px 12px;
}

.changelog-card {
    position: relative;
    background: linear-gradient(145deg, rgba(24, 22, 34, 0.92) 0%, rgba(10, 11, 16, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid var(--neon-purple);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    animation: changelogCardIn 0.45s ease both;
}

@keyframes changelogCardIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.changelog-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(176, 38, 255, 0.04));
    pointer-events: none;
}

.changelog-card:hover {
    transform: translateX(4px);
    border-left-color: var(--blue);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 30px rgba(176, 38, 255, 0.1);
}

/* nagłówek wewnątrz karty (tytuł + data) */
.changelog-card .changelog-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-bottom: 12px;
    margin: 0;
}

.changelog-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.changelog-title::before {
    content: '';
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-purple);
    box-shadow: 0 0 12px var(--neon-purple);
}

.changelog-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--blue);
    font-family: ui-monospace, monospace;
    background: rgba(0, 208, 255, 0.1);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 208, 255, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.changelog-body {
    font-size: 0.92rem;
    color: rgba(226, 232, 240, 0.82);
    line-height: 1.65;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
    .changelog-icon-wrap,
    .changelog-card {
        animation: none !important;
    }
    .changelog-card:hover {
        transform: none;
    }
}

/* SUPPORT — scroll + panel (motyw cyan / registry) */
.custom-scroll::-webkit-scrollbar { width: 8px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb { background: rgba(0, 208, 255, 0.22); border-radius: 10px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0, 208, 255, 0.45); }

.support-panel.expanded-shop {
    width: min(1100px, calc(100vw - 48px));
    max-height: min(720px, calc(100vh - 160px));
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(0, 208, 255, 0.22);
    background:
        linear-gradient(168deg, rgba(10, 18, 28, 0.96) 0%, rgba(8, 9, 14, 0.98) 45%, rgba(8, 14, 22, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(0, 208, 255, 0.08);
}

.support-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 40% at 0% 0%, rgba(0, 208, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 45% 35% at 100% 100%, rgba(0, 255, 136, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.support-sidebar {
    position: relative;
    z-index: 1;
    width: min(320px, 32%);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 14px 18px 20px;
    min-height: 0;
    border-right: 1px solid rgba(0, 208, 255, 0.16);
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.07) 0%, transparent 45%);
}

.support-sidebar-head {
    padding-bottom: 4px;
}

.support-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.support-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--blue);
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.22), rgba(0, 208, 255, 0.06));
    border: 1px solid rgba(0, 208, 255, 0.4);
    box-shadow: 0 0 24px rgba(0, 208, 255, 0.15);
    animation: supportIconPulse 3.2s ease-in-out infinite;
}

@keyframes supportIconPulse {
    0%, 100% { box-shadow: 0 0 16px rgba(0, 208, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 208, 255, 0.25); }
}

.support-h2 {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e0f2fe;
    text-shadow: 0 0 18px rgba(0, 208, 255, 0.25);
}

.support-lead {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(148, 163, 184, 0.95);
}

.support-btn-new {
    margin-top: 0 !important;
    width: 100%;
    padding: 14px 16px !important;
    font-size: 0.98rem !important;
    font-weight: 800;
    border-color: var(--neon-green) !important;
    color: #d1fae5 !important;
    background: rgba(0, 255, 136, 0.08) !important;
    box-shadow: 0 0 22px rgba(0, 255, 136, 0.12) inset;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-btn-new:hover {
    background: rgba(0, 255, 136, 0.18) !important;
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(0, 255, 136, 0.2);
}

.support-admin-filters {
    display: none;
    justify-content: stretch;
    gap: 8px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 208, 255, 0.15);
}

.support-admin-filters .filter-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.support-ticket-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px 8px 0;
}

.support-ticket-list::-webkit-scrollbar { width: 6px; }
.support-ticket-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.45), rgba(0, 255, 136, 0.2));
    border-radius: 10px;
}

.support-main {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 20px 22px 22px 18px;
}

.support-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

#support-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: 24px 16px;
}

.support-empty-icon {
    font-size: clamp(3.5rem, 12vw, 5rem);
    color: rgba(0, 208, 255, 0.12);
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 24px rgba(0, 208, 255, 0.15));
}

.support-empty-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: rgba(226, 232, 240, 0.92);
    max-width: 380px;
}

.support-empty-hint {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 360px;
    line-height: 1.5;
}

.support-new-ticket {
    justify-content: center;
    gap: 16px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.support-new-hero {
    text-align: center;
    margin-bottom: 8px;
}

.support-new-icon {
    font-size: 2.75rem;
    color: var(--neon-green);
    margin-bottom: 12px;
    text-shadow: 0 0 22px rgba(0, 255, 136, 0.45);
    line-height: 1;
}

.support-new-h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

.support-new-lead {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.support-field {
    border-color: rgba(0, 208, 255, 0.28) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
}

.support-field--area {
    min-height: 150px;
    max-height: 260px;
    resize: vertical;
}

.support-btn-submit {
    margin-top: 4px !important;
    border-radius: 12px !important;
    font-size: 1.05rem !important;
    padding: 16px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.support-active-chat {
    gap: 0;
}

.support-chat-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 208, 255, 0.14);
    flex-shrink: 0;
}

.support-chat-title-block {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-chat-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.support-chat-status-line {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.support-chat-status-line .support-status-open {
    color: var(--blue);
    font-weight: 800;
}

.support-chat-status-line .support-status-closed {
    color: var(--red);
    font-weight: 800;
}

.support-btn-close {
    display: none;
    margin: 0 !important;
    flex-shrink: 0;
    padding: 10px 18px !important;
    font-size: 0.88rem !important;
    border-color: var(--red) !important;
    color: #fecaca !important;
    background: rgba(255, 51, 102, 0.12) !important;
    border-radius: 10px;
}

.support-btn-close:hover {
    background: var(--red) !important;
    color: #fff !important;
}

.support-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 12px 16px 4px;
    margin-bottom: 12px;
}

.support-chat-input {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-shrink: 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(0, 208, 255, 0.18);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 208, 255, 0.04) 100%);
    box-shadow: inset 0 0 40px rgba(0, 208, 255, 0.03);
}

.support-chat-reply-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px 8px !important;
    font-size: 1rem !important;
}

.support-btn-send {
    margin: 0 !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    border-color: var(--blue) !important;
    color: #fff !important;
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.95), rgba(0, 160, 200, 0.85)) !important;
    box-shadow: 0 0 22px rgba(0, 208, 255, 0.35);
}

.support-btn-send:hover {
    filter: brightness(1.08);
}

.ticket-card {
    position: relative;
    background: linear-gradient(145deg, rgba(18, 24, 34, 0.92) 0%, rgba(10, 11, 16, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 4px solid rgba(100, 116, 139, 0.5);
    padding: 14px 14px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
    animation: supportTicketIn 0.4s ease both;
}

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

.ticket-card:hover {
    transform: translateX(4px);
    border-left-color: rgba(148, 163, 184, 0.7);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ticket-card.active {
    border-left-color: var(--blue);
    background: rgba(0, 208, 255, 0.09);
    box-shadow: 0 0 0 1px rgba(0, 208, 255, 0.15), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ticket-card.closed {
    border-left-color: var(--red);
    opacity: 0.55;
}

.ticket-card.closed:hover {
    opacity: 0.85;
}

.ticket-title {
    font-weight: 900;
    font-size: 0.98rem;
    color: var(--text-main);
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ticket-meta-nick {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}

.ticket-status {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 999px;
    display: inline-block;
    flex-shrink: 0;
}

.status-open {
    background: rgba(0, 208, 255, 0.14);
    color: var(--blue);
    border: 1px solid rgba(0, 208, 255, 0.35);
}

.status-closed {
    background: rgba(255, 51, 102, 0.14);
    color: var(--red);
    border: 1px solid rgba(255, 51, 102, 0.35);
}

.chat-bubble {
    max-width: min(80%, 560px);
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.55;
    position: relative;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.chat-bubble-user {
    background: rgba(0, 208, 255, 0.08);
    border: 1px solid rgba(0, 208, 255, 0.22);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-bubble-admin {
    background: linear-gradient(135deg, rgba(176, 38, 255, 0.22), rgba(176, 38, 255, 0.08));
    border: 1px solid rgba(176, 38, 255, 0.35);
    color: #f8fafc;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-bubble-info {
    font-size: 0.76rem;
    color: rgba(226, 232, 240, 0.55);
    margin-bottom: 10px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 820px) {
.support-panel.expanded-shop {
        flex-direction: column;
        max-height: none;
        width: min(100%, calc(100vw - 32px));
    }
.support-sidebar {
        width: 100%;
        max-height: 42vh;
        border-right: none;
        border-bottom: 1px solid rgba(0, 208, 255, 0.16);
    }
.support-ticket-list {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 8px;
    }
.ticket-card {
        min-width: 200px;
        flex-shrink: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .support-icon-wrap,
    .ticket-card {
        animation: none !important;
    }
    .support-btn-new:hover,
    .ticket-card:hover {
        transform: none;
    }
}

/* GLOBALNY REJESTR — terminal + płynne animacje */
.global-registry-panel.global-registry-panel--map {
    position: absolute;
    right: 0;
    top: 0;
    width: clamp(280px, 30vw, 400px);
    max-width: min(400px, calc(100vw - 16px));
    height: 100%;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    padding: 0;
    z-index: 10;
    overflow: hidden;
    border-radius: 0 0 0 18px;
    border: 1px solid rgba(0, 208, 255, 0.28);
    border-right: none;
    box-sizing: border-box;
    background:
        linear-gradient(165deg, rgba(8, 12, 20, 0.97) 0%, rgba(10, 11, 16, 0.96) 40%, rgba(6, 14, 22, 0.98) 100%);
    box-shadow:
        -12px 0 40px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(0, 208, 255, 0.06),
        0 0 60px rgba(0, 208, 255, 0.06);
}

.global-registry-panel.global-registry-panel--map::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(0, 208, 255, 0.1), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.registry-header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px 8px;
    padding: 12px 12px 12px 12px;
    background: linear-gradient(95deg, rgba(0, 208, 255, 0.12) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
    border-bottom: 1px solid rgba(0, 208, 255, 0.22);
    overflow: visible;
    flex-shrink: 0;
}

.registry-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--blue), rgba(0, 208, 255, 0.3), transparent);
    background-size: 200% 100%;
    animation: registryHeaderSweep 4s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes registryHeaderSweep {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.registry-globe-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.registry-globe-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(0, 208, 255, 0.35);
    animation: registryRingPulse 2.4s ease-in-out infinite;
}

@keyframes registryRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}

.registry-globe {
    font-size: 1.35rem;
    color: var(--blue);
    filter: drop-shadow(0 0 10px rgba(0, 208, 255, 0.5));
    animation: spinEarth 14s linear infinite;
}

@keyframes spinEarth { 100% { transform: rotate(360deg); } }

.registry-header-text {
    min-width: 0;
    overflow: hidden;
}

.registry-title {
    font-size: 0.78rem;
    font-weight: 900;
    color: var(--text-main);
    letter-spacing: 0.06em;
    text-transform: none;
    line-height: 1.25;
    text-shadow: 0 0 14px rgba(0, 208, 255, 0.25);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.registry-subtitle {
    margin-top: 2px;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.9);
    letter-spacing: 0.02em;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.registry-status {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--neon-green);
    font-family: ui-monospace, monospace;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.28);
    box-shadow: 0 0 18px rgba(0, 255, 136, 0.1);
    animation: registryStatusGlow 3s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes registryStatusGlow {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 136, 0.12); }
    50% { box-shadow: 0 0 22px rgba(0, 255, 136, 0.22); }
}

.registry-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 12px var(--neon-green);
    animation: registryDotPulse 1.6s ease-in-out infinite;
}

@keyframes registryDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.88); opacity: 0.75; }
}

.registry-tabs {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 6px;
    padding: 8px 10px 10px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(0, 208, 255, 0.12);
    background: rgba(0, 0, 0, 0.15);
}

.registry-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(180, 195, 220, 0.9);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.registry-tab-btn:hover {
    background: rgba(0, 208, 255, 0.08);
    border-color: rgba(0, 208, 255, 0.25);
    color: #e8f4ff;
}

.registry-tab-btn--active {
    border-color: rgba(0, 208, 255, 0.45);
    background: rgba(0, 208, 255, 0.12);
    color: #9ef0ff;
    box-shadow: 0 0 16px rgba(0, 208, 255, 0.12);
}

/* Jeden obszar treści — logi i czat NIE układają się obok siebie (nie zlewają się wizualnie) */
.registry-panes-stack {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    display: block;
}

.global-registry-panel .registry-panes-stack .registry-pane {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.98) 0%, rgba(6, 10, 16, 0.99) 100%);
}

.global-registry-panel .registry-panes-stack .registry-pane[hidden] {
    display: none !important;
    pointer-events: none;
}

.registry-pane--logs {
    border-top: 1px solid rgba(0, 208, 255, 0.12);
}

.registry-pane--logs .registry-body {
    flex: 1;
    min-height: 0;
}

.registry-pane--chat {
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid rgba(147, 197, 253, 0.14);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.06);
}

.registry-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overflow-anchor: none;
    scroll-behavior: auto;
    overscroll-behavior: contain;
    padding: 10px 10px 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-end;
    align-content: stretch;
    -webkit-overflow-scrolling: touch;
    background-image:
        linear-gradient(rgba(0, 208, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 208, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.registry-chat-empty {
    margin: 0;
    padding: 16px 8px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(180, 195, 220, 0.65);
}

.global-chat-msg {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 208, 255, 0.1);
}

.global-chat-msg-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.global-chat-msg-identity {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    min-width: 0;
    flex: 1;
}

.global-chat-msg-identity .global-log-clan-tag {
    margin-right: 0;
}

.global-chat-msg-dev {
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.2;
    padding: 1px 0;
    background: linear-gradient(90deg, #ff3355, #ffcc00, #22ff99, #22aaff, #d946ef, #ff3355);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: globalChatDevRgb 2.8s linear infinite;
}

.global-chat-msg--dev {
    border-color: rgba(168, 85, 247, 0.22);
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.07);
}

.global-chat-msg-beta {
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.2;
    padding: 2px 6px;
    border-radius: 6px;
    color: #0a1628;
    background: linear-gradient(135deg, #5eead4, #22d3ee);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
}

.global-chat-msg--beta {
    border-color: rgba(45, 212, 191, 0.28);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.08);
}

@keyframes globalChatDevRgb {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .global-chat-msg-dev {
        animation: none;
        background: linear-gradient(90deg, #f472b6, #c084fc, #22d3ee);
        background-size: 100% 100%;
    }
}

.global-chat-msg-nick {
    font-size: 0.72rem;
    font-weight: 800;
    color: #7dd3fc;
}

.global-chat-msg-time {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(160, 175, 200, 0.75);
    font-variant-numeric: tabular-nums;
}

.global-chat-msg-body {
    font-size: 0.78rem;
    line-height: 1.45;
    color: rgba(230, 238, 250, 0.95);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.registry-chat-compose {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: stretch;
    padding: 10px 10px 12px 12px;
    border-top: 1px solid rgba(0, 208, 255, 0.15);
    background: rgba(0, 8, 16, 0.5);
}

.registry-chat-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 208, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    font-size: 0.8rem;
}

.registry-chat-input::placeholder {
    color: rgba(160, 175, 200, 0.55);
}

.registry-chat-input:focus {
    outline: none;
    border-color: rgba(0, 208, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 208, 255, 0.12);
}

.registry-chat-send {
    border-radius: 10px;
    min-width: 52px;
    padding: 12px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.registry-chat-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.registry-body {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px 14px 12px;
    -webkit-overflow-scrolling: touch;
    background-image:
        linear-gradient(rgba(0, 208, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 208, 255, 0.04) 1px, transparent 1px);
    background-size: 22px 22px;
}

.registry-body::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.12) 3px,
        rgba(0, 0, 0, 0.12) 4px
    );
    opacity: 0.35;
    z-index: 0;
}

.registry-body::-webkit-scrollbar { width: 6px; }
.registry-body::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.25); border-radius: 10px; }
.registry-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--blue), rgba(0, 208, 255, 0.4));
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(0, 208, 255, 0.35);
}

.registry-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 48px 16px;
    text-align: center;
    color: rgba(0, 208, 255, 0.55);
    font-size: 0.82rem;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.06em;
    animation: registryPlaceholderFade 2s ease-in-out infinite;
}

@keyframes registryPlaceholderFade {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 0.95; }
}

.registry-placeholder-icon {
    font-size: 2.75rem;
    animation: registrySatelliteFloat 3.2s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(0, 208, 255, 0.35));
}

@keyframes registrySatelliteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.registry-footer-bar {
    position: relative;
    z-index: 2;
    height: 3px;
    flex-shrink: 0;
    background: linear-gradient(90deg, transparent 0%, var(--blue) 40%, rgba(176, 38, 255, 0.6) 70%, transparent 100%);
    background-size: 220% 100%;
    animation: registryFooterFlow 3.5s linear infinite;
    opacity: 0.85;
}

@keyframes registryFooterFlow {
    0% { background-position: 0% 0; }
    100% { background-position: 100% 0; }
}

.global-log-item {
    position: relative;
    z-index: 1;
    padding: 10px 10px 10px 12px;
    border-radius: 0 10px 10px 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.82);
    background: linear-gradient(100deg, rgba(0, 0, 0, 0.55) 0%, rgba(18, 22, 32, 0.92) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left-width: 4px;
    border-left-style: solid;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    overflow: visible;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    transform-origin: right center;
    animation: registryEntryIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease;
    will-change: transform, opacity;
}

.global-log-main {
    display: block;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

@keyframes registryEntryIn {
    from {
        opacity: 0;
        transform: translate3d(20px, 6px, 0) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.global-log-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 208, 255, 0.04));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.global-log-item:hover {
    transform: translate3d(-4px, 0, 0) scale(1.01);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 208, 255, 0.08);
    border-color: rgba(0, 208, 255, 0.18);
}

.global-log-item:hover::after {
    opacity: 1;
}

.global-log-user {
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.global-log-item-name {
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 0 12px currentColor;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.global-log-time {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.9);
    margin-top: 10px;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: ui-monospace, monospace;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.global-log-time i {
    color: var(--blue);
    opacity: 0.85;
}

@media (max-width: 1180px) {
.global-registry-panel.global-registry-panel--map {
        width: clamp(260px, 28vw, 340px);
    }
}

@media (max-width: 420px) {
.registry-header {
        grid-template-columns: auto 1fr;
        row-gap: 8px;
    }
.registry-status {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registry-header::after,
    .registry-globe-ring,
    .registry-status,
    .registry-status-dot,
    .registry-footer-bar,
    .registry-placeholder,
    .registry-placeholder-icon {
        animation: none !important;
    }
    .global-log-item {
        animation: none;
    }
    .registry-globe {
        animation: spinEarth 60s linear infinite;
    }
}
/* ==========================================
   --- CYBERPUNK CURSORS V3 (refinery / HUD) ---
   Hotspoty: strzałka ~2,2 | tekst środek 12,12
   ========================================== */

/* Domyślny: jasna strzałka + obrys + akcent cyan (jak celownik HUD) */
:root {
    --cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23e8f4ff' stroke='%23070d14' stroke-width='1.35' stroke-linejoin='round' d='M2 2v19l7.2-6.2L15 25.5l3.5-2.2-5-10.3h8.3L2 2z'/%3E%3Cpath fill='none' stroke='%2300d0ff' stroke-width='1.1' stroke-linejoin='round' opacity='.9' d='M3.5 4l11 11'/%3E%3C/svg%3E") 2 2, auto;
    --cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%2300ff88' stroke='%23050a08' stroke-width='1.35' stroke-linejoin='round' d='M2 2v19l7.2-6.2L15 25.5l3.5-2.2-5-10.3h8.3L2 2z'/%3E%3Cpath fill='%23bfffdb' opacity='.35' d='M4 5l8 8'/%3E%3Cpath fill='none' stroke='%2300ff88' stroke-width='.8' opacity='.6' d='M3 3.5L14 14'/%3E%3C/svg%3E") 2 2, pointer;
    --cursor-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%2300d0ff' stroke='%23070d14' stroke-width='1.1' d='M10 3h4v4h-4z'/%3E%3Cpath fill='%2300d0ff' stroke='%23070d14' stroke-width='1.1' d='M10 17h4v4h-4z'/%3E%3Crect x='11' y='6' width='2' height='12' fill='%23e8f4ff' stroke='%2300d0ff' stroke-width='1' rx='.5'/%3E%3C/svg%3E") 12 12, text;
    --cursor-not-allowed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath fill='%23ff4466' stroke='%230d0508' stroke-width='1.35' stroke-linejoin='round' d='M2 2v19l7.2-6.2L15 25.5l3.5-2.2-5-10.3h8.3L2 2z'/%3E%3Ccircle cx='20' cy='8' r='5' fill='none' stroke='%231a050a' stroke-width='1.1'/%3E%3Cpath stroke='%231a050a' stroke-width='1.4' stroke-linecap='round' d='M17.5 5.5l5 5'/%3E%3C/svg%3E") 2 2, not-allowed;
    --cursor-grab: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2300d0ff' stroke-width='1.5' stroke-linecap='round' d='M9 14V8m3 6V7m3 7v-6m3 6v-3'/%3E%3Cpath fill='%2300d0ff' stroke='%23070d14' stroke-width='1' d='M8 18c0-1 1-2 1-3h6s1 1 1 3v2H8z'/%3E%3C/svg%3E") 12 16, grab;
    --cursor-grabbing: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2300ff88' stroke-width='1.6' stroke-linecap='round' d='M8 12V7m4 11V8m4 8V9'/%3E%3Cpath fill='%2300ff88' stroke='%23050a08' stroke-width='1' d='M7 19c0-1.2 1-2.2 1-3.5h8s1 1 1 3.5v1.5H7z'/%3E%3C/svg%3E") 12 18, grabbing;
}

html, body {
    cursor: var(--cursor-default) !important;
}

*,
*::before,
*::after {
    cursor: inherit !important;
}

textarea,
input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="hidden"]):not([type="file"]),
[contenteditable="true"] {
    cursor: var(--cursor-text) !important;
}

select {
    cursor: var(--cursor-pointer) !important;
}

button:not(:disabled),
a[href],
label[for],
summary,
[role="button"],
[role="tab"],
[role="menuitem"],
[onclick],
.tab-btn,
.tab-nav-btn,
.auth-tab-btn,
.filter-btn,
.btn-auth,
.btn-sell-big,
.btn-logout,
.btn-cancel,
.btn-equip,
.btn-sell-inv,
.shop-card,
.ticket-card,
.cell:not(.locked),
.command-expand-btn,
.command-nav-btn,
.market-sell-cta,
.market-card,
.card-buy-btn,
.card-sell-btn,
.global-log-item,
.registry-placeholder,
input[type="checkbox"],
input[type="radio"],
input[type="file"],
input[type="color"],
.cursor-pointer {
    cursor: var(--cursor-pointer) !important;
}

button:disabled,
[disabled],
.disabled,
.cell.locked {
    cursor: var(--cursor-not-allowed) !important;
}

/* Suwaki — oś pozioma */
input[type="range"],
.cyber-slider {
    cursor: ew-resize !important;
}

/* Przenoszenie budowli (long-press na siatce) — „chwyt” na całej stronie */
body.build-move-drag,
body.build-move-drag * {
    cursor: var(--cursor-grabbing) !important;
}

@media (prefers-reduced-motion: reduce) {
    html, body, * {
        cursor: auto !important;
    }
    button:not(:disabled), a[href], .tab-btn, .cell:not(.locked), .shop-card, .ticket-card {
        cursor: pointer !important;
    }
    input:not([type="range"]), textarea {
        cursor: text !important;
    }
    input[type="range"], .cyber-slider {
        cursor: ew-resize !important;
    }
    .cell.locked {
        cursor: not-allowed !important;
    }
    body.build-move-drag,
    body.build-move-drag * {
        cursor: grabbing !important;
    }
}
/* ==========================================
   --- MAGAZYN (ekwipunek) — terminal logistyczny --- 
   ========================================== */

.warehouse-panel.expanded-shop {
    width: min(920px, calc(100vw - 48px));
    max-height: min(720px, calc(100vh - 160px));
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(255, 170, 0, 0.16);
    background:
        linear-gradient(168deg, rgba(22, 18, 12, 0.96) 0%, rgba(10, 11, 14, 0.98) 50%, rgba(16, 14, 10, 0.95) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 56px rgba(0, 0, 0, 0.55),
        0 0 72px rgba(255, 170, 0, 0.05);
}

.warehouse-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 65% 40% at 20% 0%, rgba(255, 170, 0, 0.1), transparent 55%),
        radial-gradient(ellipse 40% 30% at 100% 100%, rgba(0, 208, 255, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.warehouse-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.07) 0%, transparent 100%);
}

.warehouse-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.warehouse-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: var(--neon-orange);
    background: linear-gradient(145deg, rgba(255, 170, 0, 0.22), rgba(255, 170, 0, 0.06));
    border: 1px solid rgba(255, 170, 0, 0.4);
    box-shadow: 0 0 28px rgba(255, 170, 0, 0.15);
}

.warehouse-h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff4e6;
    text-shadow: 0 0 18px rgba(255, 170, 0, 0.25);
}

.warehouse-sub {
    margin: 6px 0 0;
    max-width: 460px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(203, 213, 225, 0.85);
}

.warehouse-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.85);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.warehouse-badge i {
    color: var(--neon-orange);
}

.warehouse-grid-wrap {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    margin: 0 16px 18px;
    padding: 4px 2px 8px;
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
}

.warehouse-grid-wrap::-webkit-scrollbar {
    width: 8px;
}
.warehouse-grid-wrap::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
}
.warehouse-grid-wrap::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 170, 0, 0.55), rgba(0, 208, 255, 0.35));
    border-radius: 10px;
}

.warehouse-grid.shop-grid {
    margin: 0;
    padding: 16px 12px 24px;
    gap: 18px;
    overflow: visible;
    align-content: flex-start;
}

#view-ekwipunek .warehouse-panel .inv-card.shop-card {
    min-height: 280px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(165deg, rgba(32, 28, 22, 0.95) 0%, rgba(12, 14, 18, 0.98) 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#view-ekwipunek .warehouse-panel .inv-card:hover {
    border-color: rgba(255, 170, 0, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 36px rgba(255, 170, 0, 0.08);
}

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

.inv-card-head .card-icon {
    font-size: 2.8rem;
}

.inv-card-head .card-icon--image {
    font-size: unset;
    min-height: 2.8rem;
}

.inv-card-head .shop-item-icon-img--card {
    max-height: 2.8rem;
}

.inv-stock-pill {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: #1a1408;
    background: linear-gradient(180deg, #ffe082 0%, #ffb347 100%);
    border: 1px solid rgba(255, 200, 100, 0.5);
    box-shadow: 0 2px 12px rgba(255, 170, 0, 0.25);
}

.inv-card-content {
    flex: 1;
}

.inv-card-desc {
    margin-top: 8px;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
}

.inv-card-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 12px !important;
}

.inv-card-actions .card-buy-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
}

.inv-card-actions .btn-equip i {
    color: var(--blue);
}

.inv-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px 48px;
    max-width: 420px;
    margin: 0 auto;
}

.inv-empty-icon {
    font-size: 4rem;
    color: rgba(255, 170, 0, 0.25);
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px rgba(255, 170, 0, 0.2));
}

.inv-empty-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 900;
    color: rgba(226, 232, 240, 0.9);
}

.inv-empty-hint {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.inv-empty-hint strong {
    color: var(--neon-orange);
}

@media (max-width: 700px) {
.warehouse-grid.shop-grid {
        grid-template-columns: 1fr;
    }
}

.cyber-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.cyber-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--neon-green);
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-green);
    transition: 0.2s;
}

.cyber-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}
/* ==========================================
   --- Wymuszone odświeżenie (broadcast) — prosty ekran ---
   ========================================== */

#update-overlay.dev-update-overlay {
    z-index: 99999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 20px;
    box-sizing: border-box;
    background: rgba(4, 8, 14, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dev-update-card {
    width: min(400px, 100%);
    padding: 32px 28px 28px;
    border-radius: 16px;
    text-align: center;
    background: rgba(12, 14, 22, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 1px rgba(0, 208, 255, 0.06) inset,
        0 24px 48px rgba(0, 0, 0, 0.45);
}

.dev-update-title {
    margin: 0 0 24px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    color: rgba(230, 238, 250, 0.95);
    letter-spacing: 0.02em;
}

.dev-update-progress {
    width: 100%;
}

.dev-update-progress-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.dev-update-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00b8d4, #00d0ff);
    box-shadow: 0 0 16px rgba(0, 208, 255, 0.35);
    transition: width 10s linear;
}

.dev-update-meta {
    margin: 16px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(160, 190, 220, 0.85);
    letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
    .dev-update-progress-fill {
        transition: none;
    }
}

/* Subtelne linie CRT */
.scanlines-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
}
/* ==========================================
   --- KARTA OBYWATELA & OSIĄGNIĘCIA (profil) --- 
   ========================================== */

/* Przycisk Profil (topbar) — wyraźnie klikalny zamiast surowego „[Konto: …]” */
#player-nick.btn-profile-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 7px 14px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 10px;
    border: 1px solid rgba(176, 38, 255, 0.45);
    background: linear-gradient(145deg, rgba(176, 38, 255, 0.18), rgba(0, 208, 255, 0.08));
    color: #e8d4ff;
    cursor: pointer;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06) inset,
        0 4px 18px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.15s;
}

#player-nick.btn-profile-top i {
    font-size: 0.95rem;
    opacity: 0.95;
    filter: drop-shadow(0 0 8px rgba(176, 38, 255, 0.45));
}

#player-nick.btn-profile-top:hover {
    color: #fff;
    border-color: rgba(200, 120, 255, 0.75);
    background: linear-gradient(145deg, rgba(176, 38, 255, 0.32), rgba(0, 208, 255, 0.16));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08) inset,
        0 0 22px rgba(176, 38, 255, 0.35);
}

#player-nick.btn-profile-top:active {
    transform: scale(0.97);
}

#player-nick.btn-profile-top:focus-visible {
    outline: 2px solid rgba(0, 208, 255, 0.75);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    #player-nick.btn-profile-top span {
        display: none;
    }
    #player-nick.btn-profile-top {
        padding: 8px 10px;
    }
}

.profile-modal-overlay {
    z-index: 1050;
    /* Centrowanie bez „ściskania” wysokości — panel ma realny max-height + wewnętrzny scroll */
    align-items: flex-start;
    justify-content: center;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overflow-x: hidden;
}

.profile-modal-panel {
    position: relative;
    width: min(820px, calc(100vw - 32px)) !important;
    max-width: 95vw !important;
    max-height: min(92vh, 880px);
    margin: auto 0;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    text-align: left;
    overflow: hidden;
    border: 1px solid rgba(176, 38, 255, 0.22) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 28px 72px rgba(0, 0, 0, 0.55),
        0 0 80px rgba(176, 38, 255, 0.08);
}

.profile-modal-panel.auth-box:not(.auth-panel-main) {
    padding: 0 !important;
}

/* Nadpisanie globalnego .auth-box — profil ma własny układ */
.profile-modal-panel.auth-box {
    text-align: left;
    overflow: hidden;
}

.profile-modal-panel.auth-box::before {
    display: none;
}

.profile-modal-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #b026ff, #00d0ff 45%, #00ff88);
    opacity: 0.9;
    pointer-events: none;
}

/* --- Nagłówek karty --- */
.profile-modal-panel > .profile-hero {
    flex-shrink: 0;
}

.profile-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px 24px;
    padding: 26px 28px 22px;
    padding-left: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(165deg, rgba(20, 14, 32, 0.95) 0%, rgba(10, 12, 22, 0.92) 100%);
}

.profile-hero-icon {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, rgba(176, 38, 255, 0.35), rgba(10, 12, 22, 0.9));
    border: 1px solid rgba(176, 38, 255, 0.35);
    box-shadow: 0 0 32px rgba(176, 38, 255, 0.2);
}

.profile-hero-icon > i {
    font-size: 1.85rem;
    color: #e8d4ff;
    text-shadow: 0 0 18px rgba(176, 38, 255, 0.6);
}

.profile-hero-ring {
    position: absolute;
    inset: -4px;
    border-radius: 22px;
    border: 1px solid rgba(0, 208, 255, 0.25);
    opacity: 0.7;
    pointer-events: none;
}

.profile-hero-text {
    flex: 1;
    min-width: 200px;
}

.profile-hero-kicker {
    margin: 0 0 4px;
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(0, 208, 255, 0.65);
    font-family: ui-monospace, monospace;
}

.profile-hero-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #f4f0ff;
    letter-spacing: -0.02em;
}

.profile-hero-nick {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(176, 38, 255, 0.35);
}

.profile-hero-chip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(180, 255, 200, 0.9);
    border: 1px solid rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.08);
}

.profile-hero-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    animation: profile-pulse-dot 2s ease-in-out infinite;
}

@keyframes profile-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.92); }
}

/* --- Sekcje --- */
.profile-section {
    padding: 20px 28px 22px;
    padding-left: 32px;
}

.profile-stats-section {
    flex-shrink: 0;
    background: rgba(0, 8, 16, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 16px;
}

.profile-section-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #9ee8ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section-title i {
    color: var(--blue);
    opacity: 0.9;
}

.profile-section-hint {
    font-size: 0.78rem;
    color: rgba(200, 210, 225, 0.45);
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 720px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
}

.profile-stat-box {
    position: relative;
    padding: 16px 14px;
    border-radius: 14px;
    text-align: left;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 12, 20, 0.75);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.profile-stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.85;
}

.profile-stat-box--oil::before {
    background: linear-gradient(90deg, #00d0ff, #0088cc);
}

.profile-stat-box--sold::before {
    background: linear-gradient(90deg, #ff9500, #ff3366);
}

.profile-stat-box--cash::before {
    background: linear-gradient(90deg, #ffd700, #66ff99);
}

.profile-stat-box:hover {
    border-color: rgba(0, 208, 255, 0.22);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.profile-stat-box__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(200, 215, 235, 0.55);
    margin-bottom: 8px;
}

.profile-stat-box__value {
    display: block;
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    font-family: ui-monospace, monospace;
    color: #f2f8ff;
    text-shadow: 0 0 24px rgba(0, 208, 255, 0.25);
    line-height: 1.2;
    word-break: break-word;
}

.profile-stat-box__unit {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: rgba(180, 195, 215, 0.45);
}

/* --- Osiągnięcia: nagłówek + pasek + przewijalna lista --- */
.profile-achievements-section {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
    overflow: visible;
}

.profile-achievements-section .profile-section-head--ach,
.profile-achievements-section .profile-ach-progress-bar,
.profile-achievements-section .profile-ach-scroll-hint {
    flex-shrink: 0;
}

/* Stała strefa przewijania — nie polega na flex-shrink (działa mimo align-items:center na overlay) */
.profile-ach-scroll-wrap {
    flex: 0 1 auto;
    min-height: 0;
    width: 100%;
    max-height: min(380px, 42vh, 52dvh);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
    padding: 10px 12px 14px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 0 0 1px rgba(0, 208, 255, 0.04);
}

.profile-section-head--ach {
    align-items: flex-start;
    margin-bottom: 12px;
}

.profile-section-title--ach {
    color: #b8ffd4;
}

.profile-section-title--ach i {
    color: #5eff9a;
}

.profile-ach-sub {
    margin: 6px 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(200, 210, 225, 0.55);
    max-width: 42ch;
}

.profile-ach-progress-wrap {
    display: flex;
    align-items: baseline;
    gap: 2px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
    background: rgba(0, 255, 136, 0.06);
    font-family: ui-monospace, monospace;
}

.profile-ach-count {
    font-size: 1.75rem;
    font-weight: 800;
    color: #7affb8;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
}

.profile-ach-sep {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.25);
    margin: 0 2px;
}

.profile-ach-total {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(200, 220, 210, 0.55);
}

.profile-ach-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-ach-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00c853, #00e676, #69f0ae);
    box-shadow: 0 0 16px rgba(0, 255, 136, 0.45);
    transition: width 0.45s ease;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.profile-ach-scroll-hint {
    margin: 0 0 8px;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: rgba(0, 208, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-ach-scroll-hint i {
    font-size: 0.65rem;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    .profile-ach-scroll-wrap {
        max-height: min(480px, 55vh, 60dvh);
    }
}

/* --- Karta osiągnięcia --- */
.achiev-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(6, 10, 18, 0.88);
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.achiev-card__strip {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.25s;
}

.achiev-card__inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 14px 14px 16px;
}

.achiev-card--locked {
    opacity: 0.72;
}

.achiev-card--locked .achiev-card__strip {
    background: rgba(120, 130, 150, 0.35);
}

.achiev-card--locked .achiev-icon {
    color: rgba(200, 210, 225, 0.35);
    filter: grayscale(1);
}

.achiev-card--unlocked {
    border-color: rgba(0, 255, 136, 0.22);
    background: linear-gradient(135deg, rgba(0, 40, 28, 0.5) 0%, rgba(8, 14, 22, 0.92) 55%);
    box-shadow: 0 0 0 1px rgba(0, 255, 136, 0.06) inset;
}

.achiev-card--unlocked .achiev-card__strip {
    background: linear-gradient(180deg, #00ff88, #00c853);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.achiev-card--unlocked:hover {
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4), 0 0 24px rgba(0, 255, 136, 0.12);
}

.achiev-card--locked:hover {
    opacity: 0.88;
}

.achiev-card__icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.achiev-card--unlocked .achiev-card__icon-wrap {
    border-color: rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.08);
}

.achiev-icon {
    font-size: 1.5rem;
    color: #e8f4ff;
}

.achiev-card--unlocked .achiev-icon {
    color: #7affb8;
    text-shadow: 0 0 14px rgba(0, 255, 136, 0.45);
}

.achiev-card__lock-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(4, 8, 14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.45);
}

.achiev-info {
    flex: 1;
    min-width: 0;
}

.achiev-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.achiev-card__idx {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: rgba(0, 208, 255, 0.45);
    font-family: ui-monospace, monospace;
}

.achiev-card__status {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
}

.achiev-card--unlocked .achiev-card__status {
    color: #8affc0;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.achiev-card--locked .achiev-card__status {
    color: rgba(200, 210, 225, 0.45);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.achiev-info__title {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f0f6ff;
    line-height: 1.25;
}

.achiev-card--locked .achiev-info__title {
    color: rgba(200, 210, 225, 0.65);
}

.achiev-info__desc {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(190, 200, 220, 0.7);
}

.achiev-card--locked .achiev-info__desc {
    color: rgba(160, 170, 190, 0.5);
}

.profile-modal-footer {
    flex-shrink: 0;
    padding: 16px 28px 24px;
    padding-left: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

.profile-modal-footer--split {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.profile-modal-footer--split .profile-close-btn,
.profile-modal-footer--split .profile-bonus-btn {
    flex: 1 1 160px;
    min-width: 0;
}

.profile-bonus-btn {
    justify-content: center;
    gap: 8px;
    border-color: rgba(0, 208, 255, 0.45) !important;
    color: #c8f4ff !important;
    background: rgba(0, 208, 255, 0.1) !important;
}

.profile-bonus-btn:hover {
    background: rgba(0, 208, 255, 0.2) !important;
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.2);
}

.bonus-code-overlay {
    z-index: 1060;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bonus-code-panel {
    width: min(420px, 100%);
    padding: 24px 22px 20px !important;
    text-align: left;
}

.bonus-code-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    color: var(--neon-orange);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bonus-code-desc {
    margin: 0 0 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(180, 195, 220, 0.88);
}

.bonus-code-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(160, 175, 200, 0.85);
    margin-bottom: 6px;
}

.bonus-code-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 208, 255, 0.35);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    font-family: ui-monospace, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.bonus-code-msg {
    min-height: 1.25em;
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: rgba(180, 195, 220, 0.9);
}

.bonus-code-msg.bonus-code-msg--ok {
    color: var(--neon-green);
}

.bonus-code-msg.bonus-code-msg--err {
    color: var(--red);
}

.bonus-code-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.bonus-code-actions .bonus-code-btn-primary {
    flex: 1 1 140px;
}

.changelog-admin-bonus {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-bonus-hint {
    margin: 0 0 12px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(180, 195, 220, 0.85);
}

.changelog-bonus-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 12px;
    align-items: center;
    margin-bottom: 14px;
}

.changelog-bonus-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(160, 175, 200, 0.9);
}

@media (max-width: 560px) {
    .changelog-bonus-grid {
        grid-template-columns: 1fr;
    }
}

.admin-bonus-result-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
}

.admin-bonus-result-row .admin-bonus-result {
    margin-top: 0;
    flex: 1 1 200px;
    min-width: 0;
}

.admin-bonus-result {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 208, 255, 0.2);
    font-family: ui-monospace, monospace;
    font-size: 0.88rem;
    word-break: break-all;
    color: rgba(220, 235, 255, 0.95);
}

.admin-bonus-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(0, 208, 255, 0.45);
    background: rgba(0, 208, 255, 0.12);
    color: #c8f4ff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.admin-bonus-copy-btn:hover {
    background: rgba(0, 208, 255, 0.22);
    box-shadow: 0 0 18px rgba(0, 208, 255, 0.2);
}

.admin-bonus-copy-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.profile-modal-footer--split .profile-close-btn {
    width: auto;
}

.profile-close-btn {
    width: 100%;
    justify-content: center;
    gap: 10px;
    border-color: rgba(176, 38, 255, 0.45) !important;
    color: #e8d4ff !important;
    background: rgba(176, 38, 255, 0.08) !important;
}

.profile-close-btn:hover {
    background: rgba(176, 38, 255, 0.16) !important;
    box-shadow: 0 0 24px rgba(176, 38, 255, 0.2);
}

/* ─── Klan — modal „tablet” (zakładka otwiera okno; scroll tylko w czacie) ─── */
.clan-view-placeholder {
    display: none !important;
}

body.clan-modal-open {
    overflow: hidden;
}

.clan-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(10px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px))
        max(14px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
}

.clan-modal-overlay--open {
    display: flex;
}

.clan-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.clan-modal-tablet {
    position: relative;
    z-index: 2;
    width: min(1080px, calc(100vw - 28px));
    height: min(82dvh, 800px);
    max-height: calc(100dvh - 24px);
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px;
    border-radius: 32px;
    background:
        linear-gradient(168deg, rgba(52, 58, 74, 0.95) 0%, rgba(22, 24, 32, 0.98) 45%, rgba(28, 30, 40, 0.96) 100%);
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 0 10px rgba(0, 0, 0, 0.35),
        0 28px 90px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.clan-modal-tablet-frame {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 76px;
    height: 9px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(40, 44, 56, 0.4));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.clan-modal-camera {
    display: none;
}

.clan-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 6;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 80, 120, 0.35);
    background: rgba(0, 0, 0, 0.45);
    color: #ffb8c8;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.clan-modal-close:hover {
    background: rgba(255, 80, 120, 0.2);
    box-shadow: 0 0 20px rgba(255, 80, 120, 0.25);
}

.clan-modal-screen {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 8px;
    border-radius: 18px;
    border: 1px solid rgba(0, 208, 255, 0.12);
    background: rgba(6, 8, 14, 0.65);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}

.clan-modal-screen > .glass-panel.clan-panel--modal {
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

.clan-panel--modal {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.clan-panel-body {
    flex: 1 1 0%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.clan-panel--modal .clan-panel-head {
    padding: 12px 16px 10px;
    flex-shrink: 0;
}

.clan-panel--modal #clan-no-clan {
    flex: 1;
    min-height: 0;
    overflow: auto;
    overflow-x: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 28px;
    align-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 12px 14px 16px;
}

@media (max-width: 760px) {
    .clan-panel--modal #clan-no-clan {
        grid-template-columns: 1fr;
    }
}

.clan-panel--modal #clan-in-clan.clan-section--in-clan {
    flex: 1 1 0%;
    min-height: 0;
    padding: 4px 8px 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Podzakładki klanu (Panel / Skarbiec / Sklep / Mapa) */
.clan-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 2px;
    flex-shrink: 0;
}

.clan-subnav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
    color: rgba(190, 200, 220, 0.9);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.clan-subnav-btn:hover {
    background: rgba(0, 208, 255, 0.08);
    border-color: rgba(0, 208, 255, 0.25);
    color: #e8f4ff;
}

.clan-subnav-btn--active {
    background: rgba(0, 208, 255, 0.12);
    border-color: rgba(0, 208, 255, 0.4);
    color: #b8f0ff;
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.12);
}

.clan-subnav-btn i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.clan-subview {
    flex: 1 1 0%;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.clan-subview--active {
    display: flex;
}

/* Sklep klanu */
.clan-shop-wrap {
    flex: 1 1 0%;
    min-height: 0;
    overflow: auto;
    overflow-x: hidden;
    padding: 4px 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.clan-shop-heading {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #e8f4ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clan-shop-heading i {
    color: #7dffb3;
    opacity: 0.95;
}

.clan-shop-intro {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(170, 185, 210, 0.92);
    max-width: 720px;
}

.clan-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.clan-shop-card {
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

.clan-shop-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6ee7ff;
    background: rgba(0, 208, 255, 0.1);
    border: 1px solid rgba(0, 208, 255, 0.22);
}

.clan-shop-card-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f2f8ff;
}

.clan-shop-card-desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(155, 175, 205, 0.88);
    flex: 1 1 auto;
}

.clan-shop-card-meta {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(130, 150, 180, 0.9);
}

.clan-shop-card-cost {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #8effd4;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.clan-shop-from {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(160, 200, 190, 0.75);
}

.clan-shop-buy {
    margin-top: 4px;
    width: 100%;
    justify-content: center;
}

.clan-shop-buy:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Mapa klanu */
.clan-map-wrap {
    flex: 1 1 0%;
    min-height: 0;
    overflow: auto;
    overflow-x: hidden;
    padding: 4px 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.clan-map-heading {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: #e8f4ff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.clan-map-heading i {
    color: #a78bfa;
}

.clan-map-intro {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(170, 185, 210, 0.92);
    max-width: 800px;
}

.clan-map-toolbar {
    flex-shrink: 0;
}

.clan-map-toolbar-title {
    margin: 0 0 8px;
    font-size: 0.8rem;
    color: rgba(180, 195, 220, 0.88);
}

.clan-map-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.clan-map-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(200, 210, 235, 0.95);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.clan-map-mode-btn:hover:not(:disabled) {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.35);
}

.clan-map-mode-btn--active {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.5);
    color: #ede9fe;
}

.clan-map-mode-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.clan-map-mode-clear {
    border-style: dashed;
    color: rgba(180, 190, 210, 0.75);
}

.clan-map-q {
    opacity: 0.85;
    font-variant-numeric: tabular-nums;
}

.clan-map-readonly {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(180, 195, 220, 0.9);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-map-readonly i {
    margin-right: 6px;
    color: #7dd3fc;
}

.clan-map-grid {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    width: 100%;
}

.clan-map-cells {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: min(100%, 440px);
    aspect-ratio: 1;
}

.clan-map-cell {
    min-width: 0;
    min-height: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
    color: rgba(220, 230, 250, 0.85);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    font-size: 0.65rem;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
}

.clan-map-cell:hover {
    background: rgba(0, 208, 255, 0.08);
    border-color: rgba(0, 208, 255, 0.25);
}

.clan-map-cell--built {
    background: rgba(110, 231, 255, 0.1);
    border-color: rgba(110, 231, 255, 0.28);
}

.clan-map-cell-ic {
    font-size: 1rem;
    line-height: 1;
    color: #a5f3fc;
}

.clan-map-cell-lv {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(230, 240, 255, 0.9);
}

.clan-map-detail {
    flex-shrink: 0;
}

.clan-map-legend {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(160, 175, 200, 0.88);
    text-align: center;
}

/* Karta podpowiedzi przy najechaniu na pole mapy */
.clan-map-hovercard {
    pointer-events: none;
    max-width: min(320px, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(12, 18, 32, 0.96);
    border: 1px solid rgba(0, 208, 255, 0.28);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: rgba(220, 230, 250, 0.95);
    font-size: 0.78rem;
    line-height: 1.45;
    z-index: 12050;
}

.clan-map-hovercard-title {
    margin: 0 0 6px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #e8f4ff;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.clan-map-hovercard-lv {
    font-size: 0.75rem;
    font-weight: 700;
    color: #7dd3fc;
    font-variant-numeric: tabular-nums;
}

.clan-map-hovercard-desc {
    margin: 0 0 8px;
    font-size: 0.76rem;
    color: rgba(165, 185, 215, 0.92);
}

.clan-map-hovercard-stats {
    margin: 0 0 8px;
    padding-left: 1.1em;
}

.clan-map-hovercard-stats li {
    margin-bottom: 4px;
}

.clan-map-hovercard-foot {
    margin: 0;
    font-size: 0.74rem;
    color: rgba(190, 210, 235, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

.clan-map-hovercard-foot--muted {
    color: rgba(150, 170, 200, 0.85);
}

.clan-map-hovercard-simple {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(180, 195, 220, 0.9);
}

.clan-map-cell--lab {
    background: rgba(167, 139, 250, 0.12);
    border-color: rgba(167, 139, 250, 0.35);
}

.clan-shop-card--solo {
    max-width: 420px;
    margin: 0 auto;
}

/* Zakładka ulepszenia klanu — laboratorium */
.clan-upgrades-wrap {
    flex: 1 1 0%;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px 18px;
    position: relative;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(110, 231, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 80% 50% at 100% 30%, rgba(167, 139, 250, 0.08), transparent 50%);
}

.clan-upgrades-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(15, 35, 55, 0.85), rgba(8, 22, 40, 0.92));
    border: 1px solid rgba(110, 231, 255, 0.22);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.clan-upgrades-header-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.35rem;
    color: #7dffb3;
    background: linear-gradient(145deg, rgba(125, 255, 179, 0.18), rgba(0, 180, 220, 0.12));
    border: 1px solid rgba(125, 255, 179, 0.35);
    box-shadow: 0 0 24px rgba(125, 255, 179, 0.15);
}

.clan-upgrades-header-text {
    min-width: 0;
}

.clan-upgrades-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f0f8ff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.clan-upgrades-subtitle {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(160, 195, 230, 0.88);
    line-height: 1.35;
}

.clan-upgrades-hero {
    margin-bottom: 14px;
}

.clan-upgrades-intro {
    margin: 0;
    padding: 12px 14px;
    font-size: 0.78rem;
    line-height: 1.55;
    color: rgba(175, 200, 230, 0.95);
    border-radius: 12px;
    background: rgba(0, 24, 48, 0.45);
    border: 1px solid rgba(100, 180, 255, 0.12);
    max-width: 100%;
}

.clan-upgrades-intro strong {
    color: #b8e8ff;
    font-weight: 700;
}

.clan-upgrades-pending {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 18px;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 160, 60, 0.15), rgba(255, 100, 80, 0.08));
    border: 1px solid rgba(255, 190, 100, 0.45);
    box-shadow: 0 0 28px rgba(255, 160, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: clan-upgrades-pending-pulse 2.5s ease-in-out infinite;
}

@keyframes clan-upgrades-pending-pulse {
    0%,
    100% {
        box-shadow: 0 0 28px rgba(255, 160, 80, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
    50% {
        box-shadow: 0 0 36px rgba(255, 180, 100, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

.clan-upgrades-pending-icon {
    flex-shrink: 0;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #ffd9a0;
    background: rgba(0, 0, 0, 0.25);
}

.clan-upgrades-pending-body {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clan-upgrades-pending-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 220, 180, 0.85);
}

.clan-upgrades-pending-track {
    font-size: 1rem;
    font-weight: 800;
    color: #fff5e6;
}

.clan-upgrades-pending-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 235, 200, 0.95);
}

.clan-upgrades-pending-time i {
    margin-right: 6px;
    opacity: 0.85;
}

.clan-upgrades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.clan-upgrade-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(6, 18, 35, 0.75);
    border: 1px solid rgba(100, 180, 255, 0.14);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clan-upgrade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.clan-upgrade-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    opacity: 0.95;
}

.clan-upgrade-card--cash .clan-upgrade-card-accent {
    background: linear-gradient(180deg, #ffd54f, #ff9800);
    box-shadow: 0 0 16px rgba(255, 180, 60, 0.5);
}

.clan-upgrade-card--cash {
    border-color: rgba(255, 200, 100, 0.28);
}

.clan-upgrade-card--cash:hover {
    border-color: rgba(255, 200, 100, 0.45);
}

.clan-upgrade-card--cash .clan-upgrade-card-icon {
    color: #ffd54f;
    background: rgba(255, 200, 80, 0.12);
    border-color: rgba(255, 200, 100, 0.35);
}

.clan-upgrade-card--warehouse .clan-upgrade-card-accent {
    background: linear-gradient(180deg, #4fc3f7, #0288d1);
    box-shadow: 0 0 16px rgba(79, 195, 247, 0.45);
}

.clan-upgrade-card--warehouse {
    border-color: rgba(79, 195, 247, 0.22);
}

.clan-upgrade-card--warehouse:hover {
    border-color: rgba(79, 195, 247, 0.4);
}

.clan-upgrade-card--warehouse .clan-upgrade-card-icon {
    color: #4fc3f7;
    background: rgba(79, 195, 247, 0.12);
    border-color: rgba(79, 195, 247, 0.35);
}

.clan-upgrade-card--oil .clan-upgrade-card-accent {
    background: linear-gradient(180deg, #b388ff, #7c4dff);
    box-shadow: 0 0 16px rgba(179, 136, 255, 0.45);
}

.clan-upgrade-card--oil {
    border-color: rgba(179, 136, 255, 0.22);
}

.clan-upgrade-card--oil:hover {
    border-color: rgba(179, 136, 255, 0.4);
}

.clan-upgrade-card--oil .clan-upgrade-card-icon {
    color: #b388ff;
    background: rgba(179, 136, 255, 0.12);
    border-color: rgba(179, 136, 255, 0.35);
}

.clan-upgrade-card--vault .clan-upgrade-card-accent {
    background: linear-gradient(180deg, #ffd54f, #c9a227);
    box-shadow: 0 0 16px rgba(255, 200, 80, 0.45);
}

.clan-upgrade-card--vault {
    border-color: rgba(255, 200, 100, 0.32);
}

.clan-upgrade-card--vault:hover {
    border-color: rgba(255, 200, 100, 0.48);
}

.clan-upgrade-card--vault .clan-upgrade-card-icon {
    color: #ffd54f;
    background: rgba(255, 200, 80, 0.12);
    border-color: rgba(255, 200, 100, 0.35);
}

.clan-upgrade-bonus-pill--cap {
    border-color: rgba(255, 200, 120, 0.45);
    color: #ffe6a8;
}

.clan-upgrade-card-inner {
    padding: 16px 16px 16px 18px;
}

.clan-upgrade-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.clan-upgrade-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.clan-upgrade-card-title {
    margin: 0 0 4px;
    font-size: 0.98rem;
    font-weight: 800;
    color: #f2f8ff;
    letter-spacing: -0.01em;
}

.clan-upgrade-card-desc {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: rgba(155, 180, 215, 0.92);
}

.clan-upgrade-lvblock {
    margin-bottom: 12px;
}

.clan-upgrade-lvhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.76rem;
    color: rgba(190, 210, 235, 0.95);
}

.clan-upgrade-lvmax {
    font-weight: 600;
    color: rgba(140, 165, 195, 0.75);
}

.clan-upgrade-bonus-pill {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(125, 255, 179, 0.35);
    color: #9fffc8;
}

.clan-upgrade-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-upgrade-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(110, 231, 255, 0.5), #6ee7ff);
    box-shadow: 0 0 12px rgba(110, 231, 255, 0.45);
    transition: width 0.35s ease;
}

.clan-upgrade-card--cash .clan-upgrade-progress > span {
    background: linear-gradient(90deg, rgba(255, 200, 80, 0.6), #ffd54f);
    box-shadow: 0 0 12px rgba(255, 200, 100, 0.4);
}

.clan-upgrade-card--warehouse .clan-upgrade-progress > span {
    background: linear-gradient(90deg, rgba(79, 195, 247, 0.5), #4fc3f7);
    box-shadow: 0 0 12px rgba(79, 195, 247, 0.4);
}

.clan-upgrade-card--oil .clan-upgrade-progress > span {
    background: linear-gradient(90deg, rgba(179, 136, 255, 0.55), #b388ff);
    box-shadow: 0 0 12px rgba(179, 136, 255, 0.4);
}

.clan-upgrade-card--vault .clan-upgrade-progress > span {
    background: linear-gradient(90deg, rgba(255, 200, 80, 0.55), #e6b422);
    box-shadow: 0 0 12px rgba(255, 200, 100, 0.4);
}

.clan-upgrade-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.clan-upgrade-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(220, 235, 255, 0.95);
}

.clan-upgrade-chip i {
    font-size: 0.7rem;
    opacity: 0.85;
}

.clan-upgrade-chip--time {
    border-color: rgba(110, 231, 255, 0.25);
    color: #a8e8ff;
}

.clan-upgrade-maxed {
    margin: 0 0 12px;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(160, 200, 160, 0.9);
}

.clan-upgrade-start {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.82rem;
    color: #0a1628;
    background: linear-gradient(180deg, #7dffb3, #3dd9a0);
    box-shadow: 0 4px 20px rgba(61, 217, 160, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.clan-upgrade-start:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: scale(1.01);
    box-shadow: 0 6px 24px rgba(61, 217, 160, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.clan-upgrade-start:active:not(:disabled) {
    transform: scale(0.99);
}

.clan-upgrade-start-label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.85;
}

.clan-upgrade-start-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.95rem;
}

.clan-upgrade-start--disabled,
.clan-upgrade-start:disabled {
    cursor: not-allowed;
    background: rgba(40, 55, 75, 0.85);
    color: rgba(180, 195, 215, 0.75);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.clan-upgrade-start--disabled span,
.clan-upgrade-start:disabled span {
    font-size: 0.8rem;
    font-weight: 700;
}

/* Modal drzewka laboratorium */
.clan-lab-tree-overlay {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
}

.clan-lab-tree-overlay[hidden] {
    display: none !important;
}

.clan-lab-tree-panel {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: min(88vh, 900px);
    padding: 18px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.clan-lab-tree-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #e8f4ff;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-lab-tree-title {
    margin: 0 44px 0 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #f0f6ff;
}

.clan-lab-tree-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
}

.clan-lab-tree-hint {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: rgba(170, 190, 220, 0.95);
}

.clan-lab-tree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.clan-lab-tree-card {
    padding: 14px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(0, 208, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.clan-lab-tree-card-head {
    font-weight: 800;
    font-size: 0.92rem;
    color: #e8f4ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-lab-tree-card-head i {
    color: #a78bfa;
}

.clan-lab-tree-card-desc {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgba(160, 180, 210, 0.9);
}

.clan-lab-tree-card-lv,
.clan-lab-tree-card-next {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(190, 210, 235, 0.95);
}

.clan-lab-up-btn {
    margin-top: 4px;
    width: 100%;
    justify-content: center;
    font-size: 0.82rem;
}

.clan-treasury-panel {
    flex: 1 1 0%;
    min-height: 0;
    overflow: auto;
    overflow-x: hidden;
    padding: 4px 6px 12px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.clan-treasury-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(125deg, rgba(255, 153, 0, 0.08), rgba(0, 208, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.clan-treasury-hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffb060;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 180, 80, 0.25);
    flex-shrink: 0;
}

.clan-treasury-heading {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #f0f6ff;
}

.clan-treasury-sub {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(160, 175, 200, 0.85);
    line-height: 1.35;
}

.clan-treasury-balance-card {
    text-align: center;
    padding: 22px 18px 18px;
    border-radius: 16px;
    background:
        radial-gradient(ellipse 80% 80% at 50% 0%, rgba(0, 208, 255, 0.12), transparent 55%),
        rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(0, 208, 255, 0.22);
    box-shadow: 0 0 32px rgba(0, 208, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.clan-treasury-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(140, 180, 210, 0.8);
    margin-bottom: 10px;
}

.clan-treasury-balance {
    margin: 0 0 10px;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    font-size: clamp(1.85rem, 4.5vw, 2.35rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #8effd4;
    text-shadow: 0 0 28px rgba(0, 255, 180, 0.2);
}

.clan-treasury-unit {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgba(160, 220, 200, 0.75);
}

.clan-treasury-your-oil {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(180, 195, 220, 0.75);
}

.clan-treasury-cap-hint {
    margin: 8px 0 0;
    font-size: 0.76rem;
    line-height: 1.4;
    color: rgba(255, 210, 160, 0.9);
}

.clan-treasury-deposit-card {
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.clan-treasury-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 0;
}

.clan-treasury-input-row .clan-input--treasury {
    flex: 1 1 140px;
    min-width: 0;
    margin-bottom: 0;
}

.clan-treasury-input-row .clan-btn-treasury-deposit {
    flex: 0 0 auto;
    min-width: 120px;
    margin-top: 0;
    white-space: nowrap;
}

.clan-treasury-hint {
    margin: 12px 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: rgba(160, 175, 200, 0.8);
    text-align: left;
}

.clan-treasury-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.clan-treasury-quick-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 10px;
    border: 1px solid rgba(0, 208, 255, 0.35);
    background: rgba(0, 208, 255, 0.1);
    color: rgba(220, 245, 255, 0.95);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.clan-treasury-quick-btn:hover {
    background: rgba(0, 208, 255, 0.2);
    border-color: rgba(0, 208, 255, 0.55);
}

.clan-treasury-quick-btn:active {
    transform: scale(0.97);
}

.clan-treasury-quick-btn--max {
    border-color: rgba(255, 210, 120, 0.45);
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.18), rgba(176, 38, 255, 0.12));
    color: #ffe8b8;
}

.clan-treasury-quick-btn--max:hover {
    border-color: rgba(255, 220, 140, 0.65);
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.28), rgba(176, 38, 255, 0.18));
}

.clan-input--treasury {
    max-width: 100%;
}

.clan-btn-treasury-deposit {
    justify-content: center;
    gap: 8px;
    padding-left: 18px;
    padding-right: 18px;
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.22), rgba(176, 38, 255, 0.12)) !important;
    border-color: rgba(0, 208, 255, 0.4) !important;
    font-weight: 700;
}

/* Wpis skarbca w czacie klanowym */
.clan-chat-line--treasury {
    background: rgba(255, 180, 60, 0.06) !important;
    border-left: 3px solid rgba(255, 180, 80, 0.55) !important;
    border-radius: 8px;
}

.clan-chat-line--treasury .clan-chat-nick {
    color: #ffd28a !important;
}

.clan-chat-line--treasury .clan-chat-text {
    color: rgba(240, 245, 255, 0.95) !important;
}

/* Grid musi mieć zdefiniowany wiersz 1fr — inaczej wiersz ma wysokość treści i zostaje puste miejsce pod spodem */
.clan-panel--modal .clan-in-layout {
    height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-content: stretch;
}

.clan-panel--modal .clan-in-column--main,
.clan-panel--modal .clan-in-column--chat {
    min-height: 0;
    height: auto;
    align-self: stretch;
}

.clan-panel--modal .clan-in-column--chat {
    gap: 10px;
}

.clan-panel--modal .clan-chat-messages {
    margin-bottom: 0;
}

.clan-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.clan-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.clan-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.2), rgba(176, 38, 255, 0.15));
    border: 1px solid rgba(0, 208, 255, 0.35);
    color: var(--neon-orange);
    font-size: 1.25rem;
}

.clan-h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.clan-lead {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.clan-head-badge {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 153, 0, 0.12);
    border: 1px solid rgba(255, 153, 0, 0.35);
    color: var(--neon-orange);
    white-space: nowrap;
}

.clan-section {
    padding: 22px 26px 28px;
}

.clan-section--split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 22px;
    align-items: start;
}

.clan-section--in-clan {
    padding-top: 12px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.clan-panel--modal .clan-section--split {
    padding: 8px 10px 12px;
    align-content: center;
}

.clan-in-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1 1 0%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (max-width: 900px) {
    .clan-in-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: min(85vh, 900px);
        overflow: visible;
    }

    .clan-in-column--chat {
        flex: 1 1 auto;
        min-height: min(52vh, 520px);
        display: flex;
        flex-direction: column;
    }

    .clan-chat-messages--scroll {
        flex: 1 1 auto;
        min-height: 280px;
    }
}

.clan-in-column--main {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.clan-in-column--chat {
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.clan-in-title-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    min-width: 0;
}

.clan-in-column--main .clan-in-header,
.clan-in-column--main .clan-invite-row,
.clan-in-column--main .clan-members-title,
.clan-in-column--main #clan-officer-hint,
.clan-in-column--main #clan-leader-actions {
    flex-shrink: 0;
}

.clan-chat-head {
    flex-shrink: 0;
    margin-bottom: 8px;
}

.clan-chat-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(160, 175, 200, 0.65);
    line-height: 1.3;
}

.clan-card {
    padding: 18px 20px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.clan-card-title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8f0ff;
}

.clan-hint {
    margin: 0 0 14px;
    font-size: 0.82rem;
    color: rgba(190, 200, 220, 0.85);
    line-height: 1.45;
}

.clan-hint--muted {
    color: rgba(160, 175, 200, 0.65);
}

.clan-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 208, 255, 0.75);
    margin-bottom: 6px;
}

.clan-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #f0f6ff;
    font-size: 0.95rem;
}

.clan-input:focus {
    outline: none;
    border-color: rgba(0, 208, 255, 0.55);
    box-shadow: 0 0 0 2px rgba(0, 208, 255, 0.15);
}

.clan-btn-primary {
    width: 100%;
    margin-top: 0;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.25), rgba(176, 38, 255, 0.2)) !important;
    border-color: rgba(255, 153, 0, 0.45) !important;
}

.clan-btn-secondary {
    width: 100%;
    margin-top: 0;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 208, 255, 0.12) !important;
    border-color: rgba(0, 208, 255, 0.35) !important;
}

.clan-in-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
    max-width: 100%;
}

.clan-tag-pill {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--neon-green);
    margin-right: 10px;
    vertical-align: middle;
}

.clan-name-display {
    font-size: 1.25rem;
    font-weight: 800;
    vertical-align: middle;
}

.clan-in-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.clan-invite-row {
    margin: 0 0 16px;
    font-size: 0.9rem;
    color: rgba(190, 200, 220, 0.9);
}

.clan-code {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 208, 255, 0.35);
    font-family: ui-monospace, monospace;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    color: #b8f0ff;
}

.clan-leader-actions {
    min-height: 0;
}

.clan-members-title {
    margin: 18px 0 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(0, 208, 255, 0.75);
}

.clan-members-sub {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(160, 175, 200, 0.55);
}

/* Lista członków — zajmuje resztę kolumny, bez własnego scrolla (stały layout) */
.clan-members-list {
    flex: 1 1 0%;
    min-height: 0;
    padding: 10px 6px;
    overflow: hidden;
}

.clan-member-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
}

.clan-member-nick {
    font-weight: 700;
    color: rgba(230, 238, 250, 0.95);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clan-member-role {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 208, 255, 0.8);
}

.clan-member-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.btn-clan-mini {
    font-size: 0.68rem;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 208, 255, 0.35);
    background: rgba(0, 208, 255, 0.1);
    color: #e8f4ff;
    cursor: pointer;
}

.btn-clan-mini:hover {
    background: rgba(0, 208, 255, 0.2);
}

.btn-clan-mini--danger {
    border-color: rgba(255, 80, 100, 0.45);
    background: rgba(255, 80, 100, 0.12);
    color: #ffc8d0;
}

.btn-clan-mini--danger:hover {
    background: rgba(255, 80, 100, 0.22);
}

.clan-footer-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Nadpisanie .filter-btn — długi tekst musi się zawijać, nie wypychać panelu */
.clan-btn-leave.filter-btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    text-transform: none;
    letter-spacing: 0.04em;
    white-space: normal;
    flex-wrap: wrap;
    line-height: 1.35;
    padding: 12px 14px;
    word-break: break-word;
    hyphens: auto;
}

.clan-chat-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: rgba(0, 208, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-chat-messages {
    padding: 12px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 10px;
}

/* Jedyny scroll w widoku klanu — w historii wiadomości (np. 25 ostatnich z bazy).
   Jak .registry-chat-messages: treść przyklejona do dołu gdy mało wiadomości (nowe „na dole”). */
.clan-chat-messages--scroll {
    flex: 1 1 0%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-anchor: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
}

.clan-chat-line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px 10px;
    align-items: start;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.8rem;
    line-height: 1.35;
}

.clan-chat-line:last-child {
    border-bottom: none;
}

.clan-chat-nick {
    font-weight: 800;
    color: var(--neon-orange);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clan-chat-text {
    color: rgba(220, 228, 240, 0.92);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.clan-chat-time {
    font-size: 0.65rem;
    color: rgba(148, 163, 184, 0.75);
    white-space: nowrap;
}

.clan-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.clan-chat-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.4);
    color: #f0f6ff;
    font-size: 0.88rem;
}

.clan-chat-input:focus {
    outline: none;
    border-color: rgba(0, 208, 255, 0.45);
}

.clan-chat-send {
    flex-shrink: 0;
    padding: 0 14px;
    min-width: 48px;
    margin-top: 0;
}

.global-log-clan-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 900;
    color: #7dffcb;
    letter-spacing: 0.06em;
    margin-right: 6px;
    text-shadow: 0 0 10px rgba(0, 255, 180, 0.25);
}

/* ─── Klan — dopracowanie wizualne (tablet / neon) ─── */
@keyframes clan-tablet-in {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.clan-modal-overlay--open .clan-modal-tablet {
    animation: clan-tablet-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.clan-modal-backdrop {
    background:
        radial-gradient(ellipse 90% 70% at 50% 30%, rgba(0, 208, 255, 0.06), transparent 55%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(176, 38, 255, 0.12), transparent 50%),
        rgba(4, 8, 16, 0.82);
}

.clan-modal-tablet {
    background:
        linear-gradient(168deg, rgba(58, 64, 82, 0.98) 0%, rgba(28, 30, 42, 0.99) 42%, rgba(20, 22, 32, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 0 0 8px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 208, 255, 0.08),
        0 32px 100px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 24px rgba(0, 0, 0, 0.35);
}

.clan-modal-tablet-frame {
    width: 88px;
    height: 10px;
    background: linear-gradient(180deg, rgba(15, 17, 24, 0.95), rgba(45, 50, 64, 0.5));
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.45),
        inset 0 -1px 1px rgba(255, 255, 255, 0.05);
}

.clan-modal-close {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 14, 22, 0.75);
    backdrop-filter: blur(8px);
    color: rgba(240, 245, 255, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.clan-modal-close:hover {
    background: rgba(255, 80, 120, 0.18);
    border-color: rgba(255, 120, 150, 0.45);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 0 0 1px rgba(255, 120, 150, 0.25), 0 8px 28px rgba(255, 80, 120, 0.2);
}

.clan-modal-screen {
    position: relative;
    border: 1px solid rgba(0, 208, 255, 0.18);
    background:
        radial-gradient(ellipse 70% 45% at 50% -10%, rgba(0, 208, 255, 0.06), transparent 55%),
        linear-gradient(180deg, rgba(10, 12, 20, 0.92) 0%, rgba(6, 8, 14, 0.96) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        inset 0 1px 0 rgba(0, 208, 255, 0.15),
        inset 0 -40px 80px rgba(0, 0, 0, 0.35);
}

.clan-modal-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0.04;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 208, 255, 0.15) 2px,
        rgba(0, 208, 255, 0.15) 3px
    );
}

.clan-panel--modal .clan-panel-head {
    position: relative;
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(0, 208, 255, 0.12);
    background: linear-gradient(95deg, rgba(0, 208, 255, 0.06) 0%, transparent 45%, rgba(176, 38, 255, 0.05) 100%);
}

.clan-panel--modal .clan-panel-head::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 208, 255, 0.35), transparent);
    opacity: 0.85;
}

.clan-panel--modal .clan-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.22), rgba(176, 38, 255, 0.15));
    border: 1px solid rgba(0, 208, 255, 0.35);
    box-shadow:
        0 0 24px rgba(0, 208, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    color: #ffd28a;
}

.clan-panel--modal .clan-h2 {
    font-size: 1.42rem;
    letter-spacing: 0.04em;
    text-shadow: 0 0 28px rgba(0, 208, 255, 0.2);
}

.clan-panel--modal .clan-lead {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(160, 175, 200, 0.75);
}

.clan-panel--modal .clan-head-badge {
    padding: 9px 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.18), rgba(255, 120, 40, 0.08));
    border: 1px solid rgba(255, 180, 80, 0.35);
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.12);
}

/* Po wejściu do klanu ukryj „cennik” założenia w nagłówku */
.clan-panel--modal.clan-panel--member .clan-head-badge {
    display: none;
}

.clan-panel--modal .clan-panel-loading {
    flex: 1 1 0%;
    min-height: 160px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 16px;
    color: rgba(190, 210, 240, 0.9);
    letter-spacing: 0.04em;
}

.clan-panel--modal .clan-panel-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.clan-panel--modal .clan-panel-loading-inner i {
    font-size: 1.75rem;
    color: var(--blue);
    filter: drop-shadow(0 0 12px rgba(0, 208, 255, 0.45));
}

.clan-panel--modal .clan-panel-loading-inner p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.clan-panel--modal .clan-card {
    position: relative;
    padding: 20px 22px;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.clan-panel--modal .clan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    opacity: 0.9;
}

.clan-panel--modal .clan-card--create::before {
    background: linear-gradient(90deg, rgba(255, 153, 0, 0.9), rgba(255, 200, 100, 0.5));
}

.clan-panel--modal .clan-card--join::before {
    background: linear-gradient(90deg, rgba(0, 208, 255, 0.85), rgba(176, 38, 255, 0.45));
}

.clan-panel--modal .clan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.35);
}

.clan-panel--modal .clan-card--create {
    border-color: rgba(255, 153, 0, 0.2);
    background: linear-gradient(165deg, rgba(40, 32, 24, 0.55), rgba(12, 12, 18, 0.92));
}

.clan-panel--modal .clan-card--join {
    border-color: rgba(0, 208, 255, 0.18);
    background: linear-gradient(165deg, rgba(20, 28, 40, 0.65), rgba(12, 12, 18, 0.92));
}

.clan-panel--modal .clan-card-title {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.clan-panel--modal .clan-input {
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.clan-panel--modal .clan-input:focus {
    outline: none;
    border-color: rgba(0, 208, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.12);
}

.clan-panel--modal .clan-btn-primary {
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 20px rgba(255, 153, 0, 0.15);
}

.clan-panel--modal .clan-btn-secondary {
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 20px rgba(0, 208, 255, 0.1);
}

.clan-panel--modal .clan-in-header {
    padding: 12px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 208, 255, 0.06), rgba(176, 38, 255, 0.04));
    border: 1px solid rgba(0, 208, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.clan-panel--modal .clan-name-display {
    font-size: 1.15rem;
    text-shadow: 0 0 20px rgba(0, 208, 255, 0.15);
}

.clan-panel--modal .clan-in-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-panel--modal .clan-invite-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px dashed rgba(0, 208, 255, 0.2);
}

.clan-panel--modal .clan-invite-row i {
    color: rgba(0, 208, 255, 0.75);
}

.clan-panel--modal .clan-code {
    margin-left: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.95rem;
    letter-spacing: 0.14em;
}

.clan-panel--modal .clan-members-title {
    position: relative;
    margin: 12px 0 8px;
    padding: 0 0 8px 14px;
    border-bottom: 1px solid rgba(0, 208, 255, 0.12);
}

.clan-panel--modal .clan-members-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 10px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(0, 208, 255, 0.95), rgba(176, 38, 255, 0.55));
    box-shadow: 0 0 12px rgba(0, 208, 255, 0.35);
}

.clan-panel--modal .clan-member-row {
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.clan-panel--modal .clan-member-row:hover {
    background: rgba(0, 208, 255, 0.06);
    border-color: rgba(0, 208, 255, 0.18);
}

.clan-panel--modal .clan-in-column--main {
    padding: 4px 12px 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.clan-panel--modal .clan-in-column--chat {
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(0, 208, 255, 0.05) 0%, transparent 40%),
        rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(0, 208, 255, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 0 40px rgba(0, 208, 255, 0.04);
}

.clan-panel--modal .clan-chat-head {
    margin-bottom: 0;
}
.clan-panel--modal .clan-chat-title {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(200, 230, 255, 0.95);
    gap: 10px;
}

.clan-panel--modal .clan-chat-title i {
    font-size: 1rem;
    color: var(--blue);
    filter: drop-shadow(0 0 8px rgba(0, 208, 255, 0.45));
}

.clan-panel--modal .clan-chat-hint {
    margin-top: 6px;
    padding: 4px 0 0;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(140, 160, 190, 0.5);
}

.clan-panel--modal .clan-chat-messages {
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.35);
}

.clan-panel--modal .clan-chat-line {
    padding: 8px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    border-bottom: none;
}

.clan-panel--modal .clan-chat-line:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.clan-panel--modal .clan-chat-line--treasury {
    background: rgba(255, 180, 60, 0.08) !important;
}

.clan-panel--modal .clan-chat-line--treasury:nth-child(even) {
    background: rgba(255, 180, 60, 0.1) !important;
}

.clan-panel--modal .clan-chat-nick {
    color: #8ae8ff;
    text-shadow: 0 0 10px rgba(0, 208, 255, 0.2);
}

.clan-panel--modal .clan-chat-input {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.clan-panel--modal .clan-chat-input:focus {
    border-color: rgba(0, 208, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 208, 255, 0.1);
}

.clan-panel--modal .clan-chat-send {
    border-radius: 12px;
    min-width: 52px;
    border: 1px solid rgba(0, 208, 255, 0.35);
    background: linear-gradient(145deg, rgba(0, 208, 255, 0.2), rgba(0, 208, 255, 0.08));
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 208, 255, 0.15);
    transition: transform 0.15s, box-shadow 0.2s;
}

.clan-panel--modal .clan-chat-send:hover {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(0, 208, 255, 0.3);
}

.clan-panel--modal .clan-btn-leave.filter-btn {
    border-radius: 12px;
    border: 1px solid rgba(255, 120, 150, 0.35);
    background: rgba(255, 80, 100, 0.08);
    color: rgba(255, 210, 220, 0.95);
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: background 0.2s, box-shadow 0.2s;
}

.clan-panel--modal .clan-btn-leave.filter-btn:hover {
    background: rgba(255, 80, 100, 0.22);
    border-color: rgba(255, 120, 150, 0.55);
    box-shadow: 0 0 24px rgba(255, 80, 100, 0.15);
}

.clan-panel--modal .btn-clan-mini {
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 0.12s, box-shadow 0.2s;
}

.clan-panel--modal .btn-clan-mini:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 208, 255, 0.15);
}