/* =========================================
   1. ZMIENNE I FUNDAMENTY
   ========================================= */
:root {
    /* Paleta kolorów */
    --bg-dark: #0f0f12;           /* Główne ciemne tło */
    --text-main: #99844d;         /* Jasny beżowy kolor tekstu */
    --text-muted: #948c75;        /* Przygaszony tekst */
    --accent-gold: #c2b067;       /* Złoty akcent */
    --accent-glow: rgba(194, 176, 103, 0.3); /* Poświata złotego */
    
    /* Gradienty i tła */
    --btn-gradient: linear-gradient(135deg, #5a4a32 0%, #3e3221 100%);
    --card-bg: rgba(30, 30, 35, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

html { scroll-behavior: smooth; }

body.erngal-ui {
    margin: 0; 
    background: var(--bg-dark); 
    color: var(--text-main);    
    font-family: 'Cinzel', 'Garamond', serif; 
    overflow-x: hidden;         
    background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}

/* =========================================
   2. ANIMACJE
   ========================================= */
@keyframes fadeInMove { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes pulseGlow { 
    0% { box-shadow: 0 0 0 0 rgba(194, 176, 103, 0.4); } 
    70% { box-shadow: 0 0 0 10px rgba(194, 176, 103, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(194, 176, 103, 0); } 
}

@keyframes float { 
    0% { transform: translateY(0px); } 
    50% { transform: translateY(-5px); } 
    100% { transform: translateY(0px); } 
}

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

/* =========================================
   3. SIDEBAR (PANEL BOHATERA)
   ========================================= */
#world-container { display: flex; min-height: 100vh; }

.hero-panel {
    width: 320px;        
    background: linear-gradient(to right, #1a1a1d, #141417);
    border-right: 1px solid #333; 
    display: flex; flex-direction: column; 
    position: sticky; top: 0; height: 100vh; 
    z-index: 100;           
    box-shadow: 5px 0 30px rgba(0,0,0,0.5); 
    flex-shrink: 0;         
}

.char-section {
    padding: 30px 20px; text-align: center;     
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Avatar */
.avatar-container { position: relative; width: 100px; margin: 0 auto 15px; cursor: pointer; }
.avatar-frame {
    width: 100px; height: 100px; border-radius: 50%;  
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 20px var(--accent-glow); 
    overflow: hidden; transition: 0.3s;    
}
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); color: #fff; 
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; opacity: 0; transition: 0.3s; font-size: 0.8rem;
}
.avatar-container:hover .avatar-overlay { opacity: 1; }

.char-name { font-size: 1.4rem; color: var(--accent-gold); margin: 5px 0; letter-spacing: 1px; }
.char-level { color: #fff; font-size: 0.9rem; margin-bottom: 5px; font-family: 'Cinzel', serif; }

/* XP Bar */
.xp-bar-wrapper {
    width: 100%; height: 14px; background: #111; 
    border: 1px solid #444; border-radius: 7px;     
    position: relative; margin: 10px 0; overflow: hidden;       
}
.xp-bar-fill {
    height: 100%; background: linear-gradient(90deg, #c2b067, #e0d5b7); 
    box-shadow: 0 0 10px #c2b067; 
}
.xp-text {
    position: absolute; top: 0; left: 0; width: 100%; text-align: center;
    font-size: 0.65rem; color: #000; font-weight: bold; line-height: 14px;
    text-shadow: 0 0 2px rgba(255,255,255,0.5); 
}

/* Statystyki */
.stats-grid { 
    display: flex; justify-content: space-between; 
    gap: 5px; margin-top: 15px; 
    background: rgba(0,0,0,0.2); padding: 5px; border-radius: 5px; 
}
.stat-item { flex: 1; text-align: center; color: #fff; }
.stat-val { display: block; font-weight: bold; color: var(--accent-gold); font-size: 1.1rem; }
.motivation-text { margin-top: 10px; color: #777; font-size: 0.75rem; font-style: italic; }

/* Zakładki */
.sidebar-tabs { display: flex; background: rgba(0,0,0,0.3); }
.tab-btn {
    flex: 1; padding: 15px; 
    background: transparent; border: none;
    color: var(--text-muted); cursor: pointer; text-transform: uppercase;
    font-size: 0.85rem; letter-spacing: 1px; transition: 0.3s;
    border-bottom: 2px solid transparent; 
}
.tab-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.tab-btn.active { 
    color: var(--accent-gold); border-bottom-color: var(--accent-gold); 
    background: rgba(194, 176, 103, 0.05); 
}
.sidebar-content { padding: 20px; overflow-y: auto; flex-grow: 1; }
.tab-pane { display: none; animation: fadeInMove 0.4s ease-out; }
.tab-pane.active { display: block; }

/* Koszyk / Juki — pozycja produktu (miniatura + nazwa + stepper) */
.widget_shopping_cart_content ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.widget_shopping_cart_content li.woocommerce-mini-cart-item {
    display: block; width: 100%;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(194,176,103,0.12);
    border-radius: 5px; margin-bottom: 10px; padding: 12px 34px 12px 12px;
    position: relative; box-sizing: border-box;
}
/* Anchor produktu (miniatura + nazwa + badge) jako grid: [img] [tekst] */
.widget_shopping_cart_content .mini_cart_item a:not(.remove) {
    display: grid; grid-template-columns: 56px 1fr; align-items: start;
    column-gap: 12px; row-gap: 4px;
    color: #e0d5b7 !important; font-family: 'Cinzel', serif;
    font-size: 0.9rem; line-height: 1.35; text-decoration: none;
}
.widget_shopping_cart_content .mini_cart_item a:not(.remove) img {
    grid-column: 1; grid-row: 1 / span 2;
    width: 56px !important; height: 56px !important; object-fit: cover;
    margin: 0 !important; border: 1px solid rgba(194,176,103,0.3); border-radius: 4px;
    float: none !important;
}
/* Badge "z miasta: X" — mały, spójny, niezależnie od treści ikony.
   font-size na samym elemencie + wszystkich potomkach: gdy ikona to natywny glif emoji
   (tekst), skaluje się przez font-size; gdy to <img> (wpemoji/custom) — ograniczamy w px.
   Rozmiar zmniejszony o ~20% (14px → 11px). */
.erngal-mp-item-city, .erngal-mp-mini-city {
    grid-column: 2; margin: 2px 0 0;
    font-size: 13px !important; line-height: 1.3 !important; color: #9a8d6e !important;
}
.erngal-mp-item-city *, .erngal-mp-mini-city * { font-size: 13px !important; line-height: 1.3 !important; }
.erngal-mp-item-city small, .erngal-mp-mini-city small {
    display: inline-flex; align-items: center; gap: 3px;
    color: #9a8d6e !important; font-style: italic;
}
.erngal-mp-item-city strong, .erngal-mp-mini-city strong { color: var(--accent-gold) !important; font-style: normal; }
.erngal-mp-item-city img, .erngal-mp-mini-city img,
.erngal-mp-item-city img.emoji, .erngal-mp-mini-city img.emoji {
    width: 13px !important; height: 13px !important;
    max-width: 13px !important; max-height: 13px !important;
    margin: 0 2px 0 0 !important; vertical-align: middle !important;
}

/* Stepper ilości (− [input] +) — własny rząd pełnej szerokości pod nazwą */
.widget_shopping_cart_content .quantity,
.erngal-juki-qty {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    margin-top: 10px; font-size: 0.85rem; color: var(--accent-gold);
}
.erngal-juki-qty.is-loading { opacity: 0.5; pointer-events: none; }
.erngal-juki-qty .erngal-qty-controls { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.erngal-juki-qty .erngal-qty-btn {
    width: 26px; height: 26px; line-height: 1; padding: 0;
    background: rgba(194,176,103,0.12); color: var(--accent-gold);
    border: 1px solid rgba(194,176,103,0.45); border-radius: 3px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s; user-select: none;
}
.erngal-juki-qty .erngal-qty-btn:hover { background: var(--accent-gold); color: #1a1410; }
.erngal-juki-qty .erngal-qty-btn:active { transform: translateY(1px); }
.erngal-juki-qty .erngal-qty-input {
    width: 46px; height: 26px; text-align: center; padding: 0 2px;
    /* !important — w niektórych przeglądarkach input[type=number] ma domyślne białe tło;
       wymuszamy ciemne, półprzezroczyste tło pasujące do reszty + złoty tekst. */
    background: rgba(0,0,0,0.35) !important; color: #f3e3a4 !important;
    border: 1px solid rgba(194,176,103,0.4); border-radius: 3px;
    font-size: 0.85rem; font-weight: 700; -moz-appearance: textfield; flex: 0 0 auto;
}
.erngal-juki-qty .erngal-qty-input:focus {
    outline: none; border-color: var(--accent-gold);
    background: rgba(0,0,0,0.5) !important; box-shadow: 0 0 0 2px rgba(194,176,103,0.2);
}
.erngal-juki-qty .erngal-qty-input::-webkit-outer-spin-button,
.erngal-juki-qty .erngal-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.erngal-juki-qty.is-single .erngal-juki-qty-num {
    font-weight: 700; min-width: 26px; height: 26px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(194,176,103,0.1); border: 1px solid rgba(194,176,103,0.3); border-radius: 3px;
}
.erngal-juki-qty .erngal-juki-price { color: #b9a878; white-space: nowrap; }
.widget_shopping_cart_content a.remove {
    position: absolute !important; top: 8px; right: 8px; z-index: 2;
    line-height: 1; text-align: center;
    background: rgba(0,0,0,0.25) !important; color: #d45d5d !important;
    font-size: 1.1rem !important; width: 22px !important; height: 22px !important;
    border-radius: 50%; border: 1px solid rgba(212,93,93,0.4);
    display: flex !important; align-items: center; justify-content: center;
}
.widget_shopping_cart_content a.remove:hover { background: rgba(212,93,93,0.85) !important; color: #fff !important; }
.woocommerce-mini-cart__buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.woocommerce-mini-cart__buttons .button { 
    width: 100%; text-align: center; margin: 0 !important; 
    background: var(--btn-gradient) !important; color: #fff !important; text-transform: uppercase; 
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout){
  display: none !important;
}
.widget_shopping_cart_content ul.woocommerce-mini-cart{
  /* Nie ustawiamy max-height / overflow — outer .sidebar-content ma overflow-y:auto
     i robi za jeden wspólny scrollbar. Wewnętrzny powodował widoczny drugi pasek przewijania. */
  padding-right: 6px;
}

.widget_shopping_cart_content .woocommerce-mini-cart__buttons{
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: linear-gradient(to top, rgba(15,15,18,0.95), rgba(15,15,18,0));
}

/* =========================================
   4. OBSZAR MAPY (MODYFIKOWANY POD "GHOST ICONS")
   ========================================= */
.market-board { 
    flex-grow: 1; 
    background: radial-gradient(circle at center, #1b1b20 0%, #0f0f12 100%); 
    padding-bottom: 100px; 
}

.map-container-wrapper {
    position: relative; 
    border-bottom: 1px solid var(--accent-gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.rpg-map-image { 
    width: 100%; display: block; 
    filter: brightness(0.8) sepia(0.2); 
    transition: 0.5s; 
}
.map-container-wrapper:hover .rpg-map-image { 
    filter: brightness(1) sepia(0); 
}

/* --- PINEZKI (GHOST STYLE) --- */
/* --- PINEZKI (GHOST STYLE - FULL TRANSPARENT) --- */
.map-pin {
    position: absolute;
    width: 45px; height: 45px; /* Nieco większe, żeby łatwiej trafić */
    transform: translate(-50%, -50%); /* Środek pina = zapisana współrzędna */

    /* === STAN DOMYŚLNY: CZYSTA IKONA === */
    background: transparent !important;
    border: 2px solid transparent !important;
    box-shadow: none !important;
    /* =================================== */

    color: var(--text-main); /* Domyślny kolor (zostanie nadpisany niżej) */
    border-radius: 50%;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center;

    /* Animacja wybuchu koloru po najechaniu */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                filter 0.3s;

    z-index: 10; padding: 0;
}

/* Ikona w środku */
.pin-icon { 
    font-size: 1.8rem; /* Duże, wyraźne ikony */
    
    /* KLUCZOWE: Cień, który odrywa ikonę od mapy (Outline) */
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.9)) drop-shadow(0 0 10px rgba(0,0,0,0.5));
    
    transition: all 0.3s;
}

/* === STAN PO NAJECHANIU (ZAPŁON) === */
.map-pin:hover,
.map-pin.active {
    transform: translate(-50%, -50%) scale(1.25); /* Zachowaj centrowanie + powiększenie */
    z-index: 100;
    
    /* Po najechaniu dodajemy silną czerwoną poświatę WOKÓŁ SAMEJ IKONY (bez tła kółka) */
    /* Jeśli chcesz jednak kółko tła, odkomentuj background poniżej */
    /* background: radial-gradient(circle, rgba(255, 50, 0, 0.4) 0%, transparent 70%); */
}

/* Kiedy najeżdżamy, ikona zaczyna "płonąć" */
.map-pin:hover .pin-icon,
.map-pin.active .pin-icon {
    filter: drop-shadow(0 0 15px #ff3300) drop-shadow(0 0 5px #ff8800);
    color: #fff !important; /* Ikona robi się biała w środku ognia */
}

/* === PODPISY (UKRYTE DO HOVERA) === */
.pin-caption {
    position: absolute;
    top: 45px; left: 50%; transform: translateX(-50%);
    font-size: 0.75rem; color: #ffccaa; font-weight: bold;
    text-shadow: 0 2px 4px #000;
    pointer-events: none; opacity: 0; transition: opacity 0.3s;
    white-space: nowrap;
}
.map-pin:hover .pin-caption, .map-pin.active .pin-caption { opacity: 1; }

/* Opcjonalna animacja pulsowania dla questów (jeśli odkomentujesz wyżej) */
@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 50, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 50, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 50, 0, 0); }
}

/* =========================================
   5. DYMKI ROZMÓW
   ========================================= */
/* =========================================
   5. DYMKI ROZMÓW (POPRAWIONE ŁAMANIE TEKSTU)
   ========================================= */
.map-pin { overflow: visible; } 

.speech-bubble-pop {
  position: absolute; 
  left: 50%; 
  bottom: 15px;
  transform: translateX(-50%) translateY(4px); 

  display: inline-block;
  
  /* === ZMIANA: INTELIGENTNE SKALOWANIE === */
  width: max-content;       /* Dymek dopasowuje szerokość do tekstu */
  max-width: 300px;         /* ...ale nie szerszy niż 300px (zwiększyłem z 260) */
  min-width: 120px;         /* Minimalna szerokość, żeby nie był "paskiem" */
  /* ======================================= */

  background: rgba(0,0,0,0.85); 
  border: 1px solid rgba(194, 176, 103, 0.6); 
  padding: 8px 12px;        /* Nieco więcej oddechu w środku */
  border-radius: 10px;

  font-size: 0.75rem;       /* Troszkę większa czcionka dla czytelności */
  line-height: 1.3; 
  color: var(--text-main);
  
  /* === ZMIANA: ZASADY ŁAMANIA SŁÓW === */
  white-space: normal;          /* Normalne zawijanie wierszy */
  overflow-wrap: break-word;    /* Łam słowo TYLKO jeśli jest szersze niż max-width */
  word-break: normal;           /* Nigdy nie łam w środku wyrazu przy normalnym tekście */
  hyphens: none;                /* Wyłącz automatyczne dzielenie myślnikami */
  text-align: center;           /* Wyśrodkowanie tekstu wygląda lepiej w dymkach */
  /* =================================== */
  
  opacity: 0; 
  pointer-events: none; 
  transition: 0.25s; 
  z-index: 9999;
}

.speech-bubble-pop.show-bubble {
  opacity: 1; 
  bottom: 29px; /* Wyżej po pojawieniu się */
  transform: translateX(-50%) translateY(0);
}

.map-pin.bubble-front { z-index: 5000 !important; }

/* Pozycje NPC (fallback gdy admin nie ustawi inline style) */
/* Wartości przesunięte o +2.5% w prawo i w dół, bo .map-pin ma teraz translate(-50%,-50%) */
.pin-kowal     { top: 57.5%; left: 35.5%; }
.pin-zbroja    { top: 63.5%; left: 71.5%; }
.pin-zielarka  { top: 85.5%; left: 85.5%; }
.pin-skryba    { top: 50.5%; left: 68.5%; }
.pin-mag       { top: 32.5%; left: 60.5%; }
.pin-wedrowiec { top: 45.5%; left: 40.5%; }
.pin-rynek     { top: 57.5%; left: 54.5%; }
.pin-zamek     { top: 82.5%; left: 47.5%; }
.pin-noticeboard { top: 29%; left: 33%; }
.pin-karczma {top: 25%; left: 15%;}
.erngal-city-pin { top: 55%; left: 52%; }


/* =========================================
   6. SIATKA PRODUKTÓW & FLOATER
   ========================================= */

/* Zakładki podkategorii (nad produktami) */
.merchant-category-tabs{
    width: 100%;
    padding: 10px 18px;
    margin: 0 0 -10px 0;
    background: rgba(18, 12, 7, 0.72);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 10px 18px rgba(0,0,0,0.35);
}
.merchant-category-tabs .tabs-inner{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.merchant-category-tabs .mcat-tab{
    appearance: none;
    border: 1px solid rgba(194, 176, 103, 0.35);
    background: linear-gradient(to bottom, rgba(74, 59, 42, 0.92), rgba(42, 33, 24, 0.92));
    color: #f6e3b4;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 8px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}
.merchant-category-tabs .mcat-tab:hover{
    transform: translateY(-1px);
    border-color: rgba(255, 204, 0, 0.45);
}
.merchant-category-tabs .mcat-tab.active{
    background: linear-gradient(to bottom, rgba(138, 43, 226, 0.90), rgba(75, 0, 130, 0.90));
    border-color: rgba(166, 77, 255, 0.75);
    color: #fff;
}
.inventory-grid {
	box-shadow: 5px 0 30px rgb(0 218 255 / 20%);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 25px; padding: 40px; animation: fadeInMove 0.8s ease-out; 
}

.item-slot {
    background-color: #1a1512;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 1px, transparent 1px, transparent 10px);
    border: 1px solid #3e2f26; 
    box-shadow: 0 0 2px rgb(0 252 255 / 55%), 0 5px 5px rgba(0, 0, 0, 0.5);
    border-radius: 4px; padding: 10px;
}
.item-slot:hover {
    transform: translateY(-3px); border-color: #c2b067;       
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 10px 25px rgba(0,0,0,0.7);
}
.item-image {
    background: #000; border: 1px solid #333; box-shadow: inset 0 0 10px #000;
}
.btn-rpg {
    background: linear-gradient(to bottom, #4a3b2a, #2a2118); 
    border: 1px solid #5e4b35; color: #ccc; box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    font-family: 'Cinzel', serif; padding: 10px; border-radius: 6px; cursor: pointer;
    transition: 0.3s; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px;
}
.item-slot:hover .btn-rpg {
    background: linear-gradient(to bottom, #8a2be2, #4b0082); 
    color: #fff; border-color: #a64dff; font-weight: bold;
}
.item-details h4 { margin: 0 0 5px 0; height:50px; font-size: 1.1rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.price { font-size: 1.2rem; color: var(--accent-gold); font-weight: bold; margin-bottom: 15px; }
.item-slot.rarity-rare { border-color: rgba(74, 144, 226, 0.5); box-shadow: inset 0 0 200px rgb(0 185 255 / 37%), 0 0 9px 5px rgb(0 185 255);}
.item-slot.rarity-legendary { border-color: rgba(255, 204, 0, 0.5); box-shadow: inset 0px 0px 200px rgb(174 135 0 / 54%), 0 0 10px 6px rgb(255 198 0); }

/* Floater */
.merchant-floater {
    position: fixed; bottom: 30px; right: 30px; z-index: 900;
    display: flex; flex-direction: column; align-items: flex-end; animation: fadeInMove 1s ease-out;
}
.merchant-avatar-circle {
    width: 110px; height: 110px; border-radius: 50%;
    border: 4px solid var(--accent-gold); overflow: hidden;
    background: #ffffff8f; box-shadow: 0 5px 25px rgba(0,0,0,0.8);
    position: relative; z-index: 2; transition: 0.3s;
}
.merchant-avatar-circle:hover { transform: scale(1.5); border-color: #fff; }
.merchant-avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.merchant-bubble {
    background: #fdf6e3cf; color: #2b2b2b; padding: 15px 25px; 
    border-radius: 20px 20px 0 20px; margin-bottom: -5px; margin-right: 50px;
    position: relative; max-width: 280px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4); border: 2px solid #e0d5b7;
    z-index: 1; transform-origin: bottom right; animation: float 4s ease-in-out infinite; 
}
.merchant-bubble h4 { margin: 0 0 5px 0; padding-right: 18px; color: #8b0000; font-family: 'Cinzel', serif; font-weight: bold; }
.merchant-bubble p { margin: 0; font-style: italic; font-size: 1.3rem; line-height: 1.4; }

/* Zwijanie dymka do ikonki (gdy zasłania/przeszkadza) */
.merchant-bubble-collapse {
    position: absolute; top: 6px; right: 12px;
    width: 22px; height: 22px; padding: 0; line-height: 1;
    background: transparent; border: none; cursor: pointer;
    color: #8b0000; font-size: 1.25rem; opacity: .5;
    transition: opacity .15s ease;
}
.merchant-bubble-collapse:hover { opacity: 1; }
/* Ikonka rozwijania — domyślnie ukryta, pokazuje się gdy dymek zwinięty */
.merchant-bubble-reopen {
    display: none;
    width: 46px; height: 46px; border-radius: 50%;
    margin-bottom: 8px; margin-right: 50px;
    background: #fdf6e3cf; border: 2px solid #e0d5b7; color: #8b0000;
    font-size: 1.35rem; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    align-items: center; justify-content: center;
    transition: transform .15s ease, box-shadow .15s ease;
    animation: float 4s ease-in-out infinite;
}
.merchant-bubble-reopen:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }
/* Stan zwinięty: chowamy dymek, pokazujemy ikonkę */
.merchant-floater.bubble-collapsed .merchant-bubble { display: none; }
.merchant-floater.bubble-collapsed .merchant-bubble-reopen { display: flex; }

/* Pole zapytania wtopione w dymek kupca (desktop). Wygląda jak dopisek na pergaminie,
   nie jak osobny input. Submit otwiera modal rozmowy z wpisanym pytaniem. */
.mc-bubble-form {
    display: flex; align-items: center; gap: 6px;
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid #d8caa3;
}
.mc-bubble-input {
    flex: 1 1 auto; min-width: 0;
    background: transparent; border: none; border-bottom: 1px dashed #bbab82;
    color: #2b2b2b; font-family: inherit; font-style: italic; font-size: 1rem;
    padding: 3px 2px; outline: none;
}
.mc-bubble-input::placeholder { color: #9a8c63; opacity: 1; }
.mc-bubble-input:focus { border-bottom-style: solid; border-bottom-color: #8b0000; }
.mc-bubble-send {
    flex: 0 0 auto; cursor: pointer;
    background: transparent; border: none; color: #8b0000;
    font-size: 1.1rem; line-height: 1; padding: 2px 4px;
    transition: transform .15s ease, color .15s ease;
}
.mc-bubble-send:hover { transform: translateX(2px); color: #b00000; }
/* Zatrzymaj delikatne unoszenie dymka, gdy klient pisze — wygodniejsze pisanie */
.merchant-bubble:focus-within { animation-play-state: paused; }


/* =========================================
   7. MODAL PRODUKTU & TABLICA
   ========================================= */
.rpg-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 9999; backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}
.rpg-modal[style*="display: block"] { display: flex !important; }
.rpg-modal * { box-sizing: border-box; }

.modal-content.parchment-texture {
    width: 90%; max-width: 1000px; height: 85vh; margin: 0 auto;
    background-color: #141417; 
    background-image: radial-gradient(circle at top right, #1f1f25 0%, #141417 100%);
    border: 1px solid #444; border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,1), 0 0 0 1px rgba(194, 176, 103, 0.2);
    display: flex;flex-direction: column;
    flex-wrap: nowrap; align-items: center; position: relative; color: #e0d5b7; overflow: hidden;
}
.modal-product-wrapper { display: flex; width: 100%; height: 100%; }
.modal-visuals {
    flex: 0 0 40%; background: #0a0a0c; border-right: 1px solid #333;
    padding: 30px; overflow-y: auto; height: 100%;
}
.main-image-frame { width: 100%; margin-bottom: 20px; border: 1px solid #333; background: #000; }
.main-image-frame img { width: 100%; height: auto; display: block; }
.product-gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thumb-frame {
    cursor: pointer; border: 2px solid transparent; opacity: 0.5; transition: 0.2s;
    border-radius: 4px; overflow: hidden; height: 160px;
}
.thumb-frame img { width: 100%; height: 100%; object-fit: cover; }
.thumb-frame:hover, .thumb-frame.active { opacity: 1; border-color: #c2b067; }

.modal-prod-info {
    flex: 1; height: 100%; padding: 30px 40px;
    background: linear-gradient(to bottom, #141417, #0f0f10);
    display: grid; grid-template-rows: auto 1fr auto; gap: 20px; overflow: hidden;
}
.modal-header-group { border-bottom: 1px solid #333; padding-bottom: 10px; }
.rpg-title { font-family: 'Cinzel', serif; font-size: 2.2rem; color: #fff; margin: 0 0 10px 0; }
.modal-price { font-size: 1.5rem; color: #c2b067; font-weight: bold; font-family: 'Garamond', serif; margin: 0; }
.rpg-text-content {
    overflow-y: auto; padding-right: 10px; color: #ccc;
    font-family: 'Verdana', sans-serif; font-size: 1rem; line-height: 1.6;
}
.rpg-text-content::-webkit-scrollbar { width: 6px; }
.rpg-text-content::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.rpg-text-content::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.rpg-text-content p { margin-bottom: 15px; }

.rpg-cart-actions { background: #0a0a0c; border: 1px solid #333; padding: 15px; border-radius: 6px; }
.rpg-cart-actions form.cart { display: flex; gap: 10px; width: 100%; }
.rpg-cart-actions input.qty { background: #1a1a1d; border: 1px solid #444; color: #fff; padding: 10px; width: 60px; text-align: center; font-size: 1.2rem; }
.rpg-cart-actions button.single_add_to_cart_button {
    background: linear-gradient(135deg, #c2b067 0%, #9a8c51 100%) !important;
    color: #000 !important; font-family: 'Cinzel', serif !important; font-weight: 800 !important;
    text-transform: uppercase; padding: 15px !important; border: none !important; border-radius: 4px;
    flex-grow: 1; cursor: pointer; visibility: visible !important; opacity: 1 !important; display: block !important;
}
.close-modal { position: absolute; right: 20px; top: 15px; font-size: 2rem; color: #666; cursor: pointer; z-index: 50; transition: 0.3s; }

/* Tablica */
.wooden-board-texture {
    width: 95%; max-width: 1100px; height: 90vh; margin: 2vh auto;
    background-color: #3e2723;
    background-image: url(https://sklep.kosciany-poker.pl/wp-content/themes/erngal/assets/img/tablica.webp);
    background-size: cover;    
	border: 15px solid #1a100d; border-radius: 4px; 
    box-shadow: inset 0 0 100px rgba(0,0,0,0.8), 0 0 50px rgba(0,0,0,1);
    display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.board-header { text-align: center; background: rgba(0,0,0,0.4); padding: 10px; border-bottom: 2px solid rgba(255,255,255,0.1); }
.board-header h2 { font-family: 'Cinzel', serif; color: #c2b067; margin: 0; }
.notices-corkboard { flex-grow: 1; padding: 30px; overflow-y: auto; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 20px; justify-content: center; }

.paper-note {
    width: 180px; height: 240px; background-image: url(https://sklep.kosciany-poker.pl/wp-content/themes/erngal/assets/img/kartka.png);
    background-size: cover;
    background-attachment: fixed;
    background-position-x: center; color: #222; 
	padding: 10px;
    padding-top: 40px; 
	position: relative; font-family: 'Courier New', monospace;
    cursor: pointer; transition: 0.2s; overflow: hidden;
}
.paper-note:hover { transform: scale(1.3) rotate(0deg) !important; z-index: 10; }
.paper-note:nth-child(odd) { transform: rotate(-3deg); }
.paper-note:nth-child(even) { transform: rotate(2deg); }
.pin-nail { visibility: hidden; width: 10px; height: 10px; background: #111; border-radius: 50%; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); }

/* Formularz wystawiania ogłoszeń — styl fantasy parchment spójny z resztą sklepu. */
.add-notice-wrapper {
    background: rgba(26,20,16,0.85);
    border-top: 1px solid rgba(194,176,103,0.3);
    padding: 22px 20px;
    color: #d4c293;
    border-radius: 0 0 6px 6px;
}
.add-notice-wrapper h3 {
    color: #c2b067 !important;
    font-family: 'Cinzel', serif !important;
    font-size: 16px !important;
    letter-spacing: 1px;
    margin: 0 0 14px !important;
    text-align: center;
}
.add-notice-wrapper form { display: flex; flex-direction: column; gap: 10px; }
.add-notice-wrapper .form-row { display: flex; gap: 10px; }

/* Inputs / selects / textareas — !important żeby przebić ewentualne style WP / parent theme. */
.add-notice-wrapper input[type="text"],
.add-notice-wrapper input[type="email"],
.add-notice-wrapper select,
.add-notice-wrapper textarea {
    background: rgba(14,10,6,0.6) !important;
    border: 1px solid rgba(194,176,103,0.3) !important;
    color: #d4c293 !important;
    padding: 10px 12px !important;
    border-radius: 4px !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-size: 14px !important;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3) !important;
}
.add-notice-wrapper input[type="text"]:focus,
.add-notice-wrapper input[type="email"]:focus,
.add-notice-wrapper select:focus,
.add-notice-wrapper textarea:focus {
    border-color: rgba(194,176,103,0.7) !important;
    background: rgba(14,10,6,0.85) !important;
    outline: none !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3), 0 0 0 2px rgba(194,176,103,0.15) !important;
}
.add-notice-wrapper input::placeholder,
.add-notice-wrapper textarea::placeholder {
    color: rgba(194,176,103,0.4) !important;
    font-style: italic;
}
.add-notice-wrapper input[type="text"],
.add-notice-wrapper input[type="email"] { flex: 1; }
.add-notice-wrapper textarea { height: 70px; resize: vertical; min-height: 50px; }

/* Select dropdown — custom strzałka, bez native styling. */
.add-notice-wrapper select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23c2b067' stroke-width='2'%3e%3cpath d='M1 1l5 5 5-5'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
    padding-right: 36px !important;
    cursor: pointer;
}
.add-notice-wrapper select option {
    background: #1a1410;
    color: #d4c293;
}

/* File input — minimalistyczna stylistyka, native button stylizowany przez ::file-selector-button */
.add-notice-wrapper input[type="file"] {
    background: rgba(14,10,6,0.6) !important;
    border: 1px solid rgba(194,176,103,0.3) !important;
    color: #d4c293 !important;
    padding: 8px 10px !important;
    border-radius: 4px !important;
    font-family: 'Segoe UI', sans-serif !important;
    font-size: 13px !important;
    cursor: pointer;
    flex: 1;
}
.add-notice-wrapper input[type="file"]::file-selector-button {
    background: rgba(194,176,103,0.15);
    border: 1px solid rgba(194,176,103,0.4);
    color: #c2b067;
    padding: 5px 12px;
    border-radius: 3px;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.15s, border-color 0.15s;
}
.add-notice-wrapper input[type="file"]::file-selector-button:hover {
    background: rgba(194,176,103,0.25);
    border-color: rgba(194,176,103,0.6);
}

/* Submit button — fantasy złoty styl spójny z resztą sklepu */
.add-notice-wrapper button[type="submit"].btn-rpg {
    background: linear-gradient(180deg, #c2b067 0%, #a89651 100%) !important;
    color: #1a1410 !important;
    border: 1px solid #c2b067 !important;
    font-family: 'Cinzel', serif !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    padding: 11px 20px !important;
    border-radius: 4px !important;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.15s, transform 0.1s !important;
    margin-top: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.add-notice-wrapper button[type="submit"].btn-rpg:hover:not(:disabled) {
    background: linear-gradient(180deg, #d4c293 0%, #c2b067 100%) !important;
    transform: translateY(-1px);
}
.add-notice-wrapper button[type="submit"].btn-rpg:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Terms checkbox row — subtelne wyróżnienie. */
.add-notice-wrapper .notice-terms-row {
    font-size: 12.5px !important;
    color: #b8a878 !important;
    padding: 8px 10px;
    background: rgba(14,10,6,0.4);
    border: 1px solid rgba(194,176,103,0.15);
    border-radius: 4px;
    line-height: 1.5 !important;
}
.add-notice-wrapper .notice-terms-row a {
    color: #c2b067;
    text-decoration: underline;
}
.add-notice-wrapper .notice-terms-row a:hover { color: #f3e3a4; }

/* Response message area */
.add-notice-wrapper #notice-response p {
    margin: 8px 0 0 !important;
    padding: 8px 12px;
    border-radius: 4px;
    background: rgba(14,10,6,0.6);
    border: 1px solid rgba(194,176,103,0.2);
    font-size: 13px;
}

.notice-detail-content { padding: 20px; text-align: left; }
.notice-meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #444; padding-bottom: 10px; }
.badge { padding: 5px 10px; border-radius: 4px; color: #fff; font-weight: bold; font-size: 0.8rem; }
.badge.kupie { background: #5d9cd4; }
.badge.sprzedam { background: #d45d5d; }
.contact-box { background: rgba(194, 176, 103, 0.1); border: 1px solid #c2b067; padding: 15px; margin-top: 20px; color: #fff; }


/* =========================================
   8. WERSJA MOBILNA (RWD)
   ========================================= */
@media (max-width: 750px) {
    #world-container { flex-direction: column; }
    .hero-panel { 
        width: 100%; height: auto; position: relative; 
        border-right: none; border-bottom: 2px solid #333;
        flex-direction: row; flex-wrap: wrap; padding: 10px; background: #0f0f12;
    }
    .char-section { 
        display: flex; align-items: center; padding: 5px; gap: 10px; 
        background: transparent; border: none; width: 100%; justify-content: space-between;
    }
    .avatar-container { width: 40px; height: 40px; margin: 0; }
    .avatar-frame { width: 40px; height: 40px; }
    .char-name { font-size: 1rem; margin: 0; text-align: left; }
    .char-level { font-size: 0.7rem; text-align: left; }
    .xp-bar-wrapper { width: 80px; margin: 5px 0; }
    .stats-grid{
    display: flex;
    width: 100%;
    margin-top: 8px;
    gap: 8px;
    order: 3;
  }
  .stat-item{ font-size: 0.72rem; }
  .stat-val{ font-size: 0.95rem; }
  
}
    .motivation-text { display: none; }
    .sidebar-tabs { width: 100%; order: 2; margin-top: 5px; }
    .tab-btn { padding: 8px; font-size: 0.7rem; }
    .sidebar-content { 
        display: block; width: 100%; order: 3; max-height: 50vh;
        overflow-y: auto; border-bottom: 1px solid #333;
    }
    .sidebar-content.active { display: block; }
    
    .market-board { padding-bottom: 80px; }
    .map-pin { 
        width: 35px; height: 35px; border: 1px solid transparent; font-size: 1rem;
    }
    .pin-icon { font-size: 1.6rem; }
    .pin-caption { display: none; } 
    .quest-mark { width: 7px; height: 7px; font-size: 0.3rem; top: -5px; right: -5px; }
    .speech-bubble-pop { font-size: 0.7rem; bottom: 25px; max-width: 140px; }
    /* Avatar kupca + chmurka powitania: -20% wzgl. poprzedniej wartości (0.75 → 0.6) */
    .merchant-floater { bottom: 10px; right: 10px; transform: scale(0.6); transform-origin: bottom right; }
      
	  
	.rpg-modal{
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }
    .modal-content.parchment-texture, .wooden-board-texture {
        width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;                 /* KLUCZ */
    -webkit-overflow-scrolling: touch;/* iOS */
		
		
    }
    .modal-product-wrapper { display: block; height: auto; overflow-y: auto; }
    .modal-visuals { width: 100%; height: auto; flex: none; border-right: none; border-bottom: 1px solid #333; }
    .modal-prod-info { width: 100%; height: auto; display: block; overflow: visible; }
    .rpg-text-content { overflow: visible; }
	


@media screen and (max-width: 768px) {
    .map-pin { width: 25px !important; height: 25px !important; }
    .map-pin img { width: 60% !important; height: 60% !important; }
    .speech-bubble-pop { font-size: 0.55rem; bottom: 10px; max-width: 300px; z-index: 10000 !important; }
	.pin-icon { font-size: 1.2rem; }
}

/* =========================================
   9. EFEKTY ATMOSFERYCZNE (FX)
   ========================================= */
/*body.erngal-ui::after {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none; z-index: 9000;
}
.rpg-map-image {
    filter: sepia(0.4) contrast(1.1) brightness(0.85) desaturate(0.2);
    transition: filter 0.5s;
}
.map-container-wrapper:hover .rpg-map-image {
    filter: sepia(0.2) contrast(1.1) brightness(0.95);
}
.rpg-map-container { position: relative; overflow: hidden; }
.rpg-map-container::before {
    content: ""; position: absolute; top: 0; left: 0; width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.05) 25%, transparent 50%, rgba(255,255,255,0.08) 75%, transparent 100%);
    z-index: 5; pointer-events: none; animation: fogMove 60s linear infinite; mix-blend-mode: overlay;
}
@keyframes fogMove {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}*/
/* Kowal - Stalowy błękit */
.pin-kowal .pin-icon i { color: #a4b7c9; }

/* Zbrojmistrz - Srebrny/Żelazny */
.pin-zbroja .pin-icon i { color: #d1d1d1; }

/* Zielarka - Żywa zieleń */
.pin-zielarka .pin-icon i { color: #66bb6a; }

/* Skryba - Pergaminowa biel */
.pin-skryba .pin-icon i { color: #ffecb3; }

/* Czarodziej - Magiczny fiolet */
.pin-mag .pin-icon i { color: #d500f9; }

/* Wędrowiec - Skórzany brąz */
.pin-wedrowiec .pin-icon i { color: #197a7f; }

/* Rynek - Złoto */
.pin-rynek .pin-icon i { color: #ffd700; }

/* Miasto (Zamek) - Ceglasta czerwień / Kamień */
.pin-zamek .pin-icon i { color: #ef5350; }

/* Tablica - Drewno */
.pin-noticeboard .pin-icon i { color: #d7ccc8; }

/* Kartka questa na tablicy ogłoszeń — wyróżniona (fioletowa pieczęć) */
.paper-note.quest-note { border-color:#7a3b9e; box-shadow:0 3px 12px rgba(122,59,158,.4); }
.paper-note.quest-note h4 { color:#5a2480; }

/* Quest Mark (Wykrzyknik) */
.quest-mark {
    width: 15px; height: 15px; 
    color: #f7d702; font-weight: bold; border-radius: 50%;
    position: absolute; top: 0; right: 0; z-index: 101;
    display: none; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.map-pin.has-quest .quest-mark, .pin-noticeboard .quest-mark { display: flex; }
/* Akcent dla pinów kupców z aktywnym questem — delikatne pulsowanie żółtego "?" */
.map-pin.has-quest .quest-mark {
    text-shadow: 0 0 6px rgba(247,215,2,.8);
    animation: erngalQuestPulse 1.6s ease-in-out infinite;
}
@keyframes erngalQuestPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.22); }
}
/* ZŁOTY znacznik — quest z profitem SKLEPOWYM (XP/staty sklepowe → rabaty). Poświata + złota gwiazdka. */
.map-pin.has-quest-gold { filter: drop-shadow(0 0 7px rgba(255,196,0,.95)) drop-shadow(0 0 14px rgba(255,160,0,.55)); }
.map-pin.has-quest-gold .quest-mark {
    color: #ffd23f;
    text-shadow: 0 0 8px rgba(255,196,0,1), 0 0 14px rgba(255,140,0,.8);
    animation: erngalQuestGold 1.4s ease-in-out infinite;
}
@keyframes erngalQuestGold {
    0%, 100% { transform: scale(1);    filter: brightness(1); }
    50%      { transform: scale(1.28); filter: brightness(1.4); }
}
/* Inline gwiazdka „złotego" questa w listach/CTA/modalach. */
.quest-gold-star { color: #ffc400; text-shadow: 0 0 6px rgba(255,196,0,.85); font-weight: 700; }
.quest-gold-glow { box-shadow: 0 0 0 1px rgba(255,196,0,.5), 0 0 12px rgba(255,170,0,.45) !important; border-color: #c2a23a !important; }

/* ============================================================
   CHECKOUT: mobile layout + łamanie tekstu (fix)
   ============================================================ */

body.woocommerce-checkout{
  background:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    url("/wp-content/themes/erngal/assets/img/map.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;

  color: #e0d5b7 !important;
  font-family: 'Cinzel', 'Garamond', serif !important;
}

/* często checkout jest w layout-cie z sidebar – chowamy go na checkout */
body.woocommerce-checkout #secondary,
body.woocommerce-checkout .sidebar,
body.woocommerce-checkout aside{
  display: none !important;
}

/* główny kontener checkout pełna szerokość */
body.woocommerce-checkout .woocommerce,
body.woocommerce-checkout .woocommerce-checkout{
  width: 100% !important;
  max-width: 1100px;
  margin: 0 auto !important;
}

/* Mobile: kolumny w stos + przewijane podsumowanie */
@media (max-width: 900px){
  body.woocommerce-checkout form.woocommerce-checkout{
    display: block !important;
  }

  /* podsumowanie zamówienia jako przewijany blok */
  body.woocommerce-checkout #order_review{
    max-height: 42vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  /* tabelka podsumowania: koniec z “kolumną na 1 literę” */
  body.woocommerce-checkout .woocommerce-checkout-review-order-table{
    width: 100% !important;
    table-layout: auto !important;
  }

  body.woocommerce-checkout .woocommerce-checkout-review-order-table td,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table th{
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }

  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-name{
    width: 70% !important;
  }

  body.woocommerce-checkout .woocommerce-checkout-review-order-table td.product-total,
  body.woocommerce-checkout .woocommerce-checkout-review-order-table th.product-total{
    white-space: nowrap !important;
    width: 30% !important;
  }

  /* przycisk “Kupuję i płacę” zawsze widoczny */
  body.woocommerce-checkout #payment{
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding-bottom: 10px;
  }
}
/* Checkout (Woo Blocks): ukryj metadane produktu pod nazwą */
body.woocommerce-checkout .wc-block-components-product-metadata{
  display: none !important;
}
/* Checkout: nagłówek strony (tytuł + opis) */
body.woocommerce-checkout h1,
body.woocommerce-checkout .entry-title,
body.woocommerce-checkout .page-title{
  color: #c2b067 !important; /* tu ustaw swój kolor */
}

body.woocommerce-checkout .entry-header,
body.woocommerce-checkout .woocommerce-products-header{
  color: #c2b067 !important;
}

/* opis pod tytułem (różne motywy mają różne klasy) */
body.woocommerce-checkout .entry-content p,
body.woocommerce-checkout .woocommerce-page-header p,
body.woocommerce-checkout .page-description,
body.woocommerce-checkout .term-description{
  color: rgba(24, 213, 183, 0.85) !important;
}
body.woocommerce-checkout .page-header *,
body.woocommerce-checkout .elementor-heading-title{
  color: #c2b067 !important;
}
/* Baner bramy (klik -> strona główna) */
body.woocommerce-checkout .erngal-citygate-banner,
body.woocommerce-account .erngal-citygate-banner{
  display: block;
  width: 100%;
  height: clamp(140px, 22vh, 240px);
  margin: 0 0 16px 0;
  border-bottom: 1px solid rgba(194,176,103,0.35);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background:
    linear-gradient(rgba(0,0,0,0.62), rgba(0,0,0,0.62)),
    url("assets/img/city-gate.jpg"); /* <- tu wrzuć bramę */
  background-size: cover;
  background-position: center;
}

body.woocommerce-checkout .erngal-citygate-banner__label,
body.woocommerce-account .erngal-citygate-banner__label{
  position: absolute;
  left: 16px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(194,176,103,0.35);
  color: #e0d5b7;
  font-family: 'Cinzel','Garamond',serif;
  letter-spacing: 0.6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.65);
}

body.woocommerce-checkout .erngal-citygate-banner:hover,
body.woocommerce-account .erngal-citygate-banner:hover{
  filter: brightness(1.06);
}

/* ============================================================
   Produkty: 2 kolumny na mobile
   ============================================================ */
@media (max-width: 768px){
  .inventory-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  .item-slot{
    padding: 10px !important;
  }

  .item-image{
    height: auto !important;
    overflow: hidden !important;
    margin-bottom: 10px !important;
  }
  .item-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .item-slot { min-width: 0; overflow: hidden; }

  .item-details h4{
    font-size: 0.9rem !important;
    line-height: 1.15 !important;
  }

  .price{
    font-size: 1rem !important;
    margin-bottom: 10px !important;
  }

  .btn-rpg{
    padding: 9px !important;
    font-size: 0.72rem !important;
  }
}

/* bardzo małe telefony: wróć do 1 kolumny */
@media (max-width: 360px){
  .inventory-grid{
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   Desktop: przywróć floater na właściwą pozycję
   (reguła bottom:10px wyciekła poza blok 750px — nadpisujemy)
   ============================================================ */
@media (min-width: 601px) {
  .merchant-floater {
    bottom: 30px;
    right: 30px;
    transform: scale(0.85);
    transform-origin: bottom right;
  }
}

/* ============================================================
   Mobile: floater po lewej, mniejszy przycisk podróży
   ============================================================ */
@media (max-width: 600px) {
  /* Merchant floater — lewa strona (prawy róg wolny dla panelu czatu) */
  .merchant-floater {
    left: 10px;
    right: auto;
    bottom: 10px;
    align-items: flex-start;
    transform-origin: bottom left;
  }
  /* Bańka ukryta domyślnie na mobile; JS pokazuje ją na 3s po kliknięciu kupca */
  .merchant-bubble {
    display: none;
    border-radius: 20px 20px 20px 0;
    margin-right: 0;
    margin-left: 0;
  }
  /* Pole zapytania w dymku istnieje tylko na desktopie — na mobile dymek znika,
     więc trzymamy je schowane nawet gdy JS pokaże dymek na 3s. */
  .mc-bubble-form { display: none !important; }
  /* Zwijanie/rozwijanie dymka to funkcja desktopowa — na mobile bez sensu (dymek sam znika) */
  .merchant-bubble-collapse,
  .merchant-bubble-reopen { display: none !important; }
  /* Przycisk podróży — nad mapą, poza kontenerem (nie zasłania pinów) */
  #erngal-travel-btn {
    position: static;
    width: 100%;
    height: auto;
    padding: 5px 12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid rgba(194,176,103,.3);
    transform: none;
    font-size: 11px;
    gap: 6px;
    justify-content: flex-start;
    background: rgba(12,8,4,.92);
    box-shadow: none;
  }
  #erngal-travel-btn svg { width: 14px; height: 14px; }
  .erngal-travel-label {
    display: inline;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #c2b067;
    text-transform: uppercase;
  }
  /* Blokuj poziome przewijanie siatki produktów */
  .market-board { overflow-x: hidden; }
  #world-container { overflow-x: hidden; }
}

/* ============================================================
   ERNGAL: toast + konto (my account) + przyciski logowania
   Doklej na koniec core.css
   ============================================================ */

/* Toast komunikatów (np. brak stanu magazynowego) */
#erngal-toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(14px);
  opacity: 0;
  pointer-events: none;
  z-index: 20000;

  background: rgba(0,0,0,0.88);
  border: 1px solid rgba(194,176,103,0.55);
  color: #e0d5b7;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: min(520px, 92vw);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.25;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

#erngal-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: 0.22s ease-out;
}

#erngal-toast[data-type="error"]{
  border-color: rgba(212,93,93,0.65);
  box-shadow: 0 10px 30px rgba(212,93,93,0.18);
}

/* Przyciski logowania / rejestracji w sidebarze */
.account-actions{
  display: flex;
  gap: 10px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.account-actions .btn-account{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.2);
  color: #e0d5b7;
  transition: 0.2s;
}

.account-actions .btn-account:hover{
  background: rgba(194,176,103,0.20);
  border-color: rgba(194,176,103,0.65);
  color: #fff;
}

.account-actions .btn-logout{
  border-color: rgba(212,93,93,0.5);
}

.account-actions .btn-logout:hover{
  background: rgba(212,93,93,0.20);
  border-color: rgba(212,93,93,0.75);
}

/* ============================================================
   WooCommerce My Account (logowanie/rejestracja) w klimacie
   ============================================================ */
body.woocommerce-account{
  background:
    linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)),
    url("/wp-content/themes/erngal/assets/img/map.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;

  color: #e0d5b7 !important;
  font-family: 'Cinzel', 'Garamond', serif !important;
}

body.woocommerce-account .woocommerce{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 12px 60px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
body.woocommerce-account .woocommerce-MyAccount-content{
  background: rgba(30, 30, 35, 0.78);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation{
  margin-bottom: 14px;
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul{
  list-style: none;
  margin: 0;
  padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation a{
  display: block;
  padding: 10px 10px;
  text-decoration: none;
  color: rgba(224,213,183,0.9);
  border-radius: 8px;
  border: 1px solid transparent;
}

body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover{
  color: #fff;
  border-color: rgba(194,176,103,0.45);
  background: rgba(194,176,103,0.10);
}

body.woocommerce-account form .input-text,
body.woocommerce-account form input[type="text"],
body.woocommerce-account form input[type="email"],
body.woocommerce-account form input[type="password"],
body.woocommerce-account form textarea{
  background: #1a1a1d;
  border: 1px solid #444;
  color: #fff;
  border-radius: 6px;
  padding: 10px;
}

body.woocommerce-account .woocommerce button.button,
body.woocommerce-account .woocommerce a.button{
  background: linear-gradient(135deg, #c2b067 0%, #9a8c51 100%) !important;
  color: #000 !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px;
  padding: 12px 14px !important;
}

body.woocommerce-account .woocommerce-error,
body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info{
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(194,176,103,0.35);
  color: #e0d5b7;
}

/* Mobile: na koncie też czytelny układ */
@media (max-width: 900px){
  body.woocommerce-account .woocommerce{
    padding: 12px 10px 60px;
  }
  body.woocommerce-account .woocommerce-MyAccount-navigation,
  body.woocommerce-account .woocommerce-MyAccount-content{
    padding: 12px;
  }
}
/* Avatar kupca: kadr na twarz */
.merchant-avatar-circle{
  width: 140px;   /* było 110 */
  height: 200px;  /* było 110 */
}

/* obraz w środku - zoom + przesunięcie kadru */
.merchant-avatar-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* 1) zoom (większa twarz) */
  transform: scale(1);

  /* 2) ustawienie kadru - najczęściej twarz jest wyżej */
  object-position: 50% 0%; /* środek, wyżej */
}


/* ============================================================
   FIX: Modale na Android (Huawei itp.) – brak ucinania, scroll
   ============================================================ */

/* blokada przesuwania tła gdy modal otwarty */
body.erngal-modal-open { overflow: hidden !important; }

/* overlay */
.rpg-modal{
  padding: 12px !important;              /* daje margines od krawędzi ekranu */
  box-sizing: border-box !important;
}

/* okno modala */
.rpg-modal .modal-content{
  width: min(100%, 1000px) !important;   /* nie wyjedzie poza ekran */
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - 24px) !important; /* dynamic viewport na mobile */
  overflow: hidden !important;            /* scroll przenosimy do środka */
  box-sizing: border-box !important;
}

/* jeśli masz konkretne klasy contentu */
.modal-content.parchment-texture,
.wooden-board-texture{
  width: min(100%, 1100px) !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 24px) !important;
  box-sizing: border-box !important;
}

/* wnętrze modala ma się przewijać */
#product-modal-body,
#notice-detail-body,
.wooden-board-texture .notices-corkboard,
.rpg-text-content{
  overflow: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* zapobiega “rozjechaniu” przez długie słowa/linki */
.rpg-modal *{
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.wooden-board-texture{
  border-width: 10px !important; /* mniejsza rama na telefonie */
}

/* Sceny rynku: płynna podmiana mapy */
.rpg-map-image{
  transition: opacity .35s ease, filter .35s ease;
}
.rpg-map-image.is-switching{
  opacity: 0;
}

/* (opcjonalnie) delikatny klimat zależny od sceny */
body.erngal-scene-night .rpg-map-image{ filter: brightness(0.65) contrast(1.05); }
body.erngal-scene-rain  .rpg-map-image{ filter: brightness(0.85) saturate(0.9); }
body.erngal-scene-cloudy .rpg-map-image{ filter: brightness(0.78) saturate(0.9); }

.erngal-avatar-modal { position: fixed; inset: 0; z-index: 99999; }
.erngal-avatar-modal__backdrop { position:absolute; inset:0; background: rgba(0,0,0,.72); }
.erngal-avatar-modal__panel {
  position: relative;
  max-width: 520px;
  width: calc(100% - 24px);
  margin: 6vh auto 0;
  background: #121212;
  border: 1px solid rgba(194,176,103,0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 45px rgba(0,0,0,0.75);
}
.erngal-avatar-modal__title{
  padding: 12px 14px;
  color: #e0d5b7;
  font-family: Cinzel, Garamond, serif;
  border-bottom: 1px solid rgba(194,176,103,0.22);
}
.erngal-avatar-modal__body{
  padding: 12px;
  background: #0e0e0e;
}
#erngalAvatarCropImage{
  display:block;
  max-width:100%;
  max-height:60vh;
  margin: 0 auto;
}
.erngal-avatar-modal__actions{
  display:flex;
  justify-content:flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(194,176,103,0.22);
}

/* Przycisk podróży — unosi się nad mapą (desktop) */
#erngal-travel-btn {
  position: absolute;
  bottom: 15px;
  left: 7%;
  transform: translateX(-50%);
  z-index: 9998;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(18,12,7,0.9);
  border: 1px solid #c2b067;
  color: #c2b067;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
  overflow: hidden;
}
#erngal-travel-btn:hover { background: #c2b067; color: #000; }
#erngal-travel-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: #f6e3b4; stroke-width: 2; opacity: 0.95;
}
/* Etykieta "Mapa świata" — ukryta na desktopie (tylko ikona) */


/* Modal mapa */
#travel-modal .modal-content {
  max-width: 920px;
  width: min(920px, 92vw);
}

.erngal-travel-map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

.erngal-travel-map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}

/* Mgła na nieodkrytej części (prawa strona) */
.erngal-travel-fog {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 35%;   /* <- ile mapy odkryte: 35% od lewej */
  right: 0;
  pointer-events: none;

  /* “mgła” bez obrazka: kilka gradientów */
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.10), rgba(0,0,0,0) 55%),
    radial-gradient(circle at 60% 60%, rgba(255,255,255,0.12), rgba(0,0,0,0) 60%),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.10), rgba(0,0,0,0) 60%),
    linear-gradient(90deg, rgba(0,0,0,0.0), rgba(10,8,6,0.55) 35%, rgba(10,8,6,0.78));
  backdrop-filter: blur(1px);
}

/* Pin miasta Erngal (na mapie) */
.erngal-city-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(18,12,7,0.82);
  border: 1px solid rgba(255,255,255,0.18);
  color: #f6e3b4;
  font-weight: 800;
  font-size: 13px;
  cursor: default;
  box-shadow: 0 12px 26px rgba(0,0,0,0.35);
  white-space: nowrap;
}
.erngal-city-pin::before{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width:10px;
  height:10px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(18,12,7,0.82);
  border-right: 1px solid rgba(255,255,255,0.18);
  border-bottom: 1px solid rgba(255,255,255,0.18);
}


/* ============================================================
   Travel map modal (legacy core.js) — align CSS selectors
   - core.js uses: .erngal-travel-map-wrap / .erngal-travel-map-img / .erngal-travel-fog
   - previously CSS had only .erngal-map-* equivalents
   ============================================================ */

.erngal-travel-map-wrap{
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}

.erngal-travel-map-img{
  display: block;
  width: 100%;
  height: auto;
}

.erngal-travel-fog{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.erngal-travel-fog svg{
  width: 100%;
  height: 100%;
  display: block;
}

/* piny miasta zawsze nad mgłą */
#travel-modal .erngal-city-pin,
#erngal-travel-modal .erngal-city-pin{
  z-index: 3;
}

/* ============================================================
   Efekty pogodowe na mapie rynku
   ============================================================ */

/* Filtry obrazu mapy wg pogody */
body.erngal-scene-fog    .rpg-map-image { filter: brightness(0.85) saturate(0.55) contrast(0.9); }
body.erngal-scene-snow   .rpg-map-image { filter: brightness(0.9) saturate(0.65) contrast(0.95); }
body.erngal-scene-wind   .rpg-map-image { filter: brightness(0.93) saturate(0.82); }
body.erngal-scene-sunny  .rpg-map-image { filter: brightness(1.06) saturate(1.18) contrast(1.02); }
body.erngal-scene-storm  .rpg-map-image { filter: brightness(0.72) saturate(0.75) contrast(1.12); }

/* Nakładka pogodowa */
#erngal-wx-overlay {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 4; overflow: hidden;
}
/* Krycie mgły sterowane z admina (mgła animuje własną opacity, więc skalujemy kontener). */
body.erngal-scene-fog #erngal-wx-overlay { opacity: var(--wx-fog-op, 1); }

/* === MGLA === */
@keyframes erngal-fog1 {
    0%, 100% { transform: translateX(0) scaleX(1);      opacity: .62; }
    50%       { transform: translateX(4%) scaleX(1.07);  opacity: .82; }
}
@keyframes erngal-fog2 {
    0%, 100% { transform: translateX(0)   translateY(0);   opacity: .48; }
    50%       { transform: translateX(-5%) translateY(3%);  opacity: .68; }
}
body.erngal-scene-fog #erngal-wx-overlay::before {
    content: '';
    position: absolute; inset: -20%;
    background: radial-gradient(ellipse 130% 90% at 50% 70%,
        rgba(255,255,255,.74) 0%, rgba(230,242,255,.5) 42%, transparent 72%);
    filter: blur(18px);
    animation: erngal-fog1 9s ease-in-out infinite;
}
body.erngal-scene-fog #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: -20%;
    background:
        radial-gradient(ellipse 80% 65% at 18% 55%, rgba(255,255,255,.52) 0%, transparent 65%),
        radial-gradient(ellipse 65% 72% at 78% 28%, rgba(255,255,255,.42) 0%, transparent 60%);
    filter: blur(22px);
    animation: erngal-fog2 13s ease-in-out infinite;
}

/* === DESZCZ === */
@keyframes erngal-rain {
    0%   { background-position: 0 0; }
    100% { background-position: -28px 88px; }
}
body.erngal-scene-rain #erngal-wx-overlay::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(-70deg,
            transparent 0, transparent 5px,
            rgba(130,170,255,.19) 5px, rgba(130,170,255,.19) 6px),
        repeating-linear-gradient(-70deg,
            transparent 0, transparent 9px,
            rgba(110,150,255,.12) 9px, rgba(110,150,255,.12) 10px);
    /* Gęstość/prędkość/krycie sterowane z admina (Sceny rynku → Intensywność pogody).
       Fallbacki = domyślny wygląd. */
    background-size:
        calc(28px * var(--wx-rain-scale, 1)) calc(50px * var(--wx-rain-scale, 1)),
        calc(52px * var(--wx-rain-scale, 1)) calc(74px * var(--wx-rain-scale, 1));
    animation: erngal-rain var(--wx-rain-speed, .52s) linear infinite;
    opacity: var(--wx-rain-op, 1);
}
body.erngal-scene-rain #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(18,28,70,.07) 0%, rgba(10,18,60,.3) 100%);
}

/* === BURZA (blyskanice ponad deszczem) === */
@keyframes erngal-lightning {
    0%, 86%, 100% { opacity: 0; }
    87%            { opacity: .55; }
    88%            { opacity: 0;  }
    91%            { opacity: .42; }
    92%            { opacity: 0;  }
}
body.erngal-scene-storm #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(185,215,255,.65);
    animation: erngal-lightning 3.8s ease-in-out infinite;
    pointer-events: none;
}

/* === SNIEG === */
@keyframes erngal-snow {
    0%   { background-position: 0 0, 28px -42px, 58px -16px; }
    100% { background-position: 10px 110%, 40px calc(110% + 42px), 50px calc(110% + 16px); }
}
body.erngal-scene-snow #erngal-wx-overlay::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.9) 1.5px, transparent 1.5px),
        radial-gradient(circle, rgba(255,255,255,.75) 1px,   transparent 1px),
        radial-gradient(circle, rgba(255,255,255,.85) 2px,   transparent 2px);
    /* Gęstość/prędkość/krycie sterowane z admina (Sceny rynku → Intensywność pogody). */
    background-size:
        calc(55px * var(--wx-snow-scale, 1)) calc(70px * var(--wx-snow-scale, 1)),
        calc(92px * var(--wx-snow-scale, 1)) calc(112px * var(--wx-snow-scale, 1)),
        calc(152px * var(--wx-snow-scale, 1)) calc(132px * var(--wx-snow-scale, 1));
    animation: erngal-snow var(--wx-snow-speed, 3.4s) linear infinite;
    opacity: var(--wx-snow-op, 1);
}
body.erngal-scene-snow #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(215,228,255,.05);
}

/* === WIATR === */
@keyframes erngal-wind-pass {
    0%   { transform: translateX(-115%) skewX(-2deg); opacity: 0; }
    15%  { opacity: .38; }
    85%  { opacity: .38; }
    100% { transform: translateX(115%) skewX(-2deg); opacity: 0; }
}
@keyframes erngal-wind-pass2 {
    0%   { transform: translateX(-115%) skewX(-2deg); opacity: 0; }
    15%  { opacity: .26; }
    85%  { opacity: .26; }
    100% { transform: translateX(115%) skewX(-2deg); opacity: 0; }
}
body.erngal-scene-wind #erngal-wx-overlay::before {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(3deg,
        transparent 0, transparent 14px,
        rgba(200,220,255,.16) 14px, rgba(200,220,255,.16) 16px);
    animation: erngal-wind-pass 1.5s linear infinite;
}
body.erngal-scene-wind #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: repeating-linear-gradient(3deg,
        transparent 0, transparent 33px,
        rgba(200,220,255,.1) 33px, rgba(200,220,255,.1) 36px);
    animation: erngal-wind-pass2 2.2s linear infinite .8s;
}

/* === SLONECZNIE === */
@keyframes erngal-sun-pulse {
    0%, 100% { opacity: .65; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.09); }
}
body.erngal-scene-sunny #erngal-wx-overlay::before {
    content: '';
    position: absolute;
    top: -28%; right: -18%;
    width: 78%; height: 78%;
    background: radial-gradient(circle,
        rgba(255,248,150,.62) 0%,
        rgba(255,210,55,.28) 36%,
        transparent 68%);
    filter: blur(22px);
    animation: erngal-sun-pulse 4s ease-in-out infinite;
}
body.erngal-scene-sunny #erngal-wx-overlay::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(145deg,
        rgba(255,240,100,.15) 0%,
        rgba(255,200,30,.06) 32%,
        transparent 58%);
}
