/* Karmnik Survival — global styles */
:root {
  --bg:          #1a1410;
  --bg-card:     #2a1f15;
  --bg-elev:     #3a2b1d;
  --text:        #e8dfd3;
  --text-dim:    #a89c8a;
  --accent:      #8ab87a;
  --accent-dark: #6a9a5c;
  --danger:      #c97a5a;
  --border:      #4a3a28;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.4;
}
.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary { background: var(--accent-dark); }
.btn--primary:hover:not(:disabled) { background: var(--accent); }
.btn--ghost { background: transparent; border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--bg-elev); }
.hidden { display: none !important; }

/* =============================================================================
   Landing
   ========================================================================== */
.landing {
  background: linear-gradient(135deg, #1a1410, #3a2b1d);
  min-height: 100vh;
}
.landing-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}
.landing-header { text-align: center; margin-bottom: 20px; }
/* v6.39: kinowy zwiastun na landingu */
.landing-hero { margin: 0 0 22px; }
.hero-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  background: #000; border-radius: 14px; border: 1px solid rgba(255,210,122,0.28);
  box-shadow: 0 10px 34px rgba(0,0,0,0.5); }
.hero-cap { text-align: center; color: var(--text-dim); font-size: 0.76rem; margin-top: 7px; opacity: 0.85; }
.landing-header h1 { font-size: 2rem; margin: 0 0 4px 0; }
.tagline { color: var(--text-dim); margin: 0; }

.card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.auth-card { padding: 0; overflow: hidden; }
.auth-tabs { display: flex; }
.auth-tab {
  flex: 1; padding: 14px; background: var(--bg-elev); color: var(--text-dim);
  border: none; cursor: pointer; font-weight: 600; font-size: 0.95rem;
}
.auth-tab--active { background: var(--bg-card); color: var(--text); }
.auth-form { display: none; padding: 16px; }
.auth-form--active { display: flex; flex-direction: column; gap: 10px; }
.auth-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-dim); }
.auth-form input {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px; font-size: 1rem; font-family: inherit;
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-hint { font-size: 0.75rem; color: var(--text-dim); margin: 0; }
.turnstile-box:not(:empty) { margin: 6px 0; }   /* v6.29: widget Turnstile (pusty gdy wyłączony) */
.auth-warn {
  font-size: 0.78rem;
  color: #d4a574;
  background: rgba(212, 165, 116, 0.08);
  padding: 6px 8px;
  border-radius: 6px;
  border-left: 3px solid #d4a574;
  margin: 6px 0 0 0;
  line-height: 1.4;
}
.auth-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin: 0; }

.rules-card h2 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.rules-card h2:first-child { margin-top: 0; }
.rules-card h3 { margin: 12px 0 4px; font-size: 0.95rem; color: var(--text-dim); }
.rules-card p { margin: 6px 0 10px; font-size: 0.88rem; line-height: 1.5; }
.rules-card ul { margin: 0 0 8px; padding-left: 20px; font-size: 0.88rem; }
.rules-card li { margin-bottom: 5px; line-height: 1.45; }
.rules-card kbd {
  background: var(--bg-elev); border-radius: 4px; padding: 1px 6px;
  font-family: ui-monospace, monospace; font-size: 0.82rem;
  border: 1px solid var(--border);
}
.rules-list { font-size: 0.88rem; line-height: 1.5; }
.rules-intro {
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0 !important;
}

/* =============================================================================
   Species selector (rejestracja + profil)
   ========================================================================== */
.species-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 600;
  margin-top: 6px;
}
.species-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.species-grid--compact { grid-template-columns: repeat(2, 1fr); }

.species-card {
  background: var(--bg-elev);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  font-family: inherit;
  color: var(--text);
}
.species-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.species-card--active {
  border-color: var(--accent);
  background: rgba(138, 184, 122, 0.15);
  box-shadow: 0 0 0 2px var(--accent);
}
.species-emoji {
  font-size: 1.6rem;
  width: 48px; height: 48px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,0.4);
  overflow: hidden;
}
/* v6.31: ikonka gatunku jako obrazek (zamiast emoji), z fallbackiem do emoji przy onerror */
.species-img {
  width: 112%; height: 112%;   /* lekki zoom — grafiki mają margines wokół ptaka */
  object-fit: contain;
  display: block;
}
.species-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.species-perk { font-size: 0.7rem; color: var(--text-dim); line-height: 1.2; }

/* v4: zalockowane gatunki */
.species-card--locked {
  position: relative;
  opacity: 0.45;
  cursor: not-allowed;
}
.species-card--locked:hover { transform: none; border-color: var(--border); }
/* v6.7: dolna linia "wymagane pkt" w karcie gatunku */
.species-unlock {
  font-size: 0.72rem;
  color: #8ab87a;
  margin-top: 4px;
  font-weight: bold;
}
.species-unlock.is-locked { color: #d8a070; }
/* Karta gatunku, którym aktualnie grasz */
.species-card--current {
  border: 2px solid #ffd84a !important;
  background: rgba(255, 216, 74, 0.08);
  cursor: default;
}
.species-card--current:hover { transform: none; }
.species-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #d4a574;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* v4: Przycisk specjalnej umiejętności (gołąb 💩) */
.ability-btn {
  position: fixed;
  /* v6.9: lewa strona na wysokości przycisku sprint. v6.39n: podniesiona, bo pod nią „Powrót do gniazda" */
  left: 24px;
  bottom: 104px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(58, 43, 29, 0.85);
  border: 3px solid rgba(255,255,255,0.4);
  font-size: 2rem;
  cursor: pointer;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  user-select: none;
  transition: transform 0.1s, background 0.2s, opacity 0.15s;
  touch-action: manipulation;
  /* v6.12: 80% opacity — przycisk lekko przezroczysty, nie zasłania mapy */
  opacity: 0.8;
}
.ability-btn:hover, .ability-btn:active { opacity: 1.0; }
.ability-btn:active { transform: scale(0.9); }
.ability-btn--ready    { background: rgba(138, 184, 122, 0.6); }
.ability-btn--cooldown { background: rgba(80, 60, 40, 0.7); opacity: 0.55; }
/* v6.11: shield (bocian) — niebieski styling */
.ability-btn--shield.ability-btn--ready    { background: rgba(100, 180, 255, 0.55); border-color: rgba(180, 230, 255, 0.7); }
.ability-btn--shield.ability-btn--cooldown { background: rgba(40, 70, 100, 0.7); }
.ability-btn--active {
  background: linear-gradient(135deg, #80c8ff, #4090ff) !important;
  border-color: #fff !important;
  box-shadow: 0 0 28px rgba(100, 200, 255, 0.9);
  animation: shield-active-pulse 0.5s ease-in-out infinite alternate;
  color: #fff;
}
@keyframes shield-active-pulse {
  to { box-shadow: 0 0 40px rgba(180, 230, 255, 1); }
}
.ability-btn--tapped {
  transform: scale(0.88) !important;
  opacity: 1.0 !important;
}
.ability-cooldown {
  position: absolute;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(0,0,0,0.7);
  border-radius: 8px;
  padding: 0 6px;
  bottom: -8px;
}
@media (max-width: 768px) {
  .ability-btn { right: 18px; bottom: 110px; width: 64px; height: 64px; font-size: 1.7rem; }
}

/* v6.39n: „Powrót do gniazda" — przycisk POD umiejętnością, na samym dole (lewa strona), tylko właściciele */
.recall-btn {
  position: fixed; left: 24px; bottom: 24px; width: 64px; height: 64px;
  border-radius: 50%; background: rgba(60, 90, 50, 0.85);
  border: 3px solid rgba(190, 230, 160, 0.5); font-size: 1.7rem;
  cursor: pointer; z-index: 15; display: flex; align-items: center; justify-content: center;
  color: #fff; user-select: none; opacity: 0.8; touch-action: manipulation;
  transition: transform 0.1s, background 0.2s, opacity 0.15s;
}
.recall-btn:hover, .recall-btn:active { opacity: 1.0; }
.recall-btn:active { transform: scale(0.9); }
.recall-btn--active {
  background: linear-gradient(135deg, #9fe08a, #5aa84a) !important;
  border-color: #fff !important;
  box-shadow: 0 0 22px rgba(150, 230, 120, 0.9);
  animation: recall-active-pulse 0.5s ease-in-out infinite alternate;
}
@keyframes recall-active-pulse { to { box-shadow: 0 0 34px rgba(190, 245, 150, 1); } }
.recall-btn--cancel {
  background: rgba(200, 60, 40, 0.92) !important;
  border-color: #ffb3a0 !important; box-shadow: 0 0 20px rgba(230, 80, 50, 0.9);
}
.recall-cd {
  position: absolute; font-size: 0.95rem; font-weight: 800;
  background: rgba(0,0,0,0.7); border-radius: 8px; padding: 0 6px; bottom: -6px;
}
@media (max-width: 768px) {
  .recall-btn { left: 18px; bottom: 36px; width: 58px; height: 58px; font-size: 1.5rem; }
}

/* v6.40: Ptasi Jubiler — przycisk „Porozmawiaj" (pojawia się blisko NPC) */
.jeweler-talk-btn {
  position: fixed; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 16;
  background: linear-gradient(180deg, rgba(120,90,180,0.96), rgba(80,55,140,0.96));
  color: #fff; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.3px;
  padding: 10px 20px; border-radius: 999px; border: 2px solid rgba(230,210,255,0.6);
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), 0 0 16px rgba(150,110,220,0.5);
  cursor: pointer; user-select: none; touch-action: manipulation;
}
.jeweler-talk-btn:active { transform: translateX(-50%) scale(0.95); }
/* v6.42: Ptasi Jubiler — panel czatu i negocjacji */
.jeweler-modal {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.6); padding: 16px;
}
.jeweler-chat {
  background: linear-gradient(180deg, #2a2340, #1c1830); border: 2px solid rgba(200,175,255,0.4);
  border-radius: 16px; width: 100%; max-width: 520px; display: flex; flex-direction: column;
  max-height: min(94vh, 790px); overflow: hidden; box-shadow: 0 14px 44px rgba(0,0,0,0.6);
}
.jeweler-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(200,175,255,0.18); }
.jeweler-portrait-sm { width: 46px; height: 46px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.jeweler-head-info { flex: 1 1 auto; min-width: 0; }
.jeweler-name { font-weight: 800; font-size: 1.05rem; color: #e8dcff; }
.jeweler-sub { font-size: 0.78rem; color: #b7a8e0; }
.jeweler-x { background: rgba(255,255,255,0.1); color: #e8dcff; border: none; border-radius: 8px; width: 32px; height: 32px; font-size: 1rem; cursor: pointer; flex: 0 0 auto; }
.jeweler-x:active { transform: scale(0.92); }
.jeweler-section { flex: 0 0 auto; border-bottom: 1px solid rgba(200,175,255,0.14); }
.jeweler-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px 5px; color: #e8dcff; font-size: 0.68rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.07em; }
.jw-section-hint { color: #a99acb; font-size: 0.58rem; font-weight: 650; text-transform: none; letter-spacing: 0; }
.jeweler-items { display: flex; gap: 6px; padding: 10px 12px; overflow-x: auto; flex: 0 0 auto; }
.jw-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 78px;
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.14); border-radius: 10px; padding: 7px 8px; cursor: pointer; color: #e8dcff; }
.jw-item.sel { border-color: #ffd24a; background: rgba(255,210,74,0.14); }
.jw-item.owned { border-color: rgba(105,220,155,0.55); }
.jw-item.equipped { border-color: #72e3a7; background: rgba(76,205,137,0.16); box-shadow: inset 0 0 0 1px rgba(114,227,167,0.35); }
.jw-item.gift { border-color: rgba(255,211,89,0.75); background: rgba(255,211,89,0.1); }
.jw-item.status-tarnished { border-color: rgba(190,145,95,0.75); background: rgba(105,72,38,0.2); }
.jw-item.status-tarnished .jw-item-img { filter: sepia(0.72) saturate(0.58) brightness(0.72); }
.jw-item.status-cleaning { opacity: 0.7; cursor: wait; border-style: dashed; }
.jw-item.status-ready_pickup { border-color: #79e5ff; box-shadow: 0 0 12px rgba(121,229,255,0.25); }
.jw-item-emo { font-size: 1.3rem; }
.jw-item-img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.45)); }
.jw-item-name { font-size: 0.66rem; text-align: center; line-height: 1.1; }
.jw-item-price { font-size: 0.62rem; color: #b7a8e0; }
.jw-item-effect { max-width: 92px; font-size: 0.58rem; line-height: 1.12; color: #d8cdf4; text-align: center; }
.jeweler-equipped { display: flex; align-items: center; gap: 10px; margin: 0 12px 9px; min-height: 72px; padding: 8px 10px;
  border: 1px solid rgba(114,227,167,0.35); border-radius: 9px; background: rgba(65,170,115,0.09); color: #c9f4da; }
.jw-equipped-empty { flex: 1 1 auto; color: #aa9fc5; font-size: 0.7rem; line-height: 1.35; }
.jw-equipped-img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5)); }
.jeweler-equipped.tarnished { border-color: rgba(190,145,95,0.75); background: rgba(105,72,38,0.2); }
.jeweler-equipped.tarnished .jw-equipped-img { filter: sepia(0.8) saturate(0.5) brightness(0.7); }
.jw-equipped-info { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.jw-equipped-info strong { color: #eafff1; font-size: 0.82rem; }
.jw-equipped-info > span { color: #bfe5cd; font-size: 0.64rem; line-height: 1.25; }
.jw-equipped-info .jw-equipped-time { color: #ffe39b; }
.jeweler-unequip-btn { border: 1px solid rgba(255,255,255,0.15); border-radius: 7px; padding: 7px 10px; background: rgba(255,255,255,0.1); color: #f1eaff; cursor: pointer; font-weight: 750; flex: 0 0 auto; }
.jeweler-unequip-btn:disabled { opacity: 0.4; cursor: default; }
.jeweler-owned-items { display: flex; gap: 8px; padding: 7px 12px 10px; overflow-x: auto; min-height: 78px; }
.jw-empty { width: 100%; display: grid; place-items: center; min-height: 58px; border: 1px dashed rgba(200,175,255,0.2); border-radius: 8px; color: #9e91be; font-size: 0.68rem; }
.jw-owned-card { flex: 0 0 246px; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 8px;
  border: 1px solid rgba(105,220,155,0.42); border-radius: 9px; background: rgba(54,126,92,0.12); padding: 7px; }
.jw-owned-card.equipped { border-color: #72e3a7; background: rgba(76,205,137,0.2); box-shadow: inset 0 0 0 1px rgba(114,227,167,0.25); }
.jw-owned-card.status-tarnished { border-color: rgba(190,145,95,0.8); background: rgba(105,72,38,0.24); }
.jw-owned-card.status-tarnished .jw-owned-img { filter: sepia(0.8) saturate(0.5) brightness(0.7); }
.jw-owned-card.status-cleaning { border-style: dashed; opacity: 0.76; }
.jw-owned-card.status-ready_pickup { border-color: #79e5ff; background: rgba(70,165,190,0.12); }
.jw-owned-img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.45)); }
.jw-owned-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jw-owned-name { color: #edfff4; font-size: 0.72rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jw-owned-effect { color: #c5d9cd; font-size: 0.58rem; line-height: 1.18; }
.jw-owned-status { color: #ffe39b; font-size: 0.59rem; line-height: 1.2; }
.jw-owned-action { border: 1px solid rgba(255,255,255,0.16); border-radius: 7px; background: rgba(255,255,255,0.1); color: #f2ebff; padding: 7px 8px; font-size: 0.63rem; font-weight: 800; cursor: pointer; }
.jw-owned-action.primary { border-color: rgba(114,227,167,0.5); background: rgba(65,170,115,0.22); color: #d8ffe6; }
.jw-owned-action.clean { border-color: rgba(230,176,100,0.55); background: rgba(150,94,40,0.25); color: #ffe2b8; }
.jw-owned-action.pickup { border-color: rgba(121,229,255,0.6); background: rgba(50,140,165,0.22); color: #d6f9ff; }
.jw-owned-action:disabled { opacity: 0.5; cursor: default; }

/* v6.43: ozdoby w profilu gracza; okno Jubilera pozostaje lekkim czatem. */
.profile-jewelry-equipped,
.profile-jewelry-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
  padding: 8px 9px;
}
.profile-jewelry-equipped {
  min-height: 64px;
  border-color: rgba(138,184,122,0.7);
  background: rgba(138,184,122,0.1);
  margin-bottom: 8px;
}
.profile-jewelry-equipped.tarnished,
.profile-jewelry-card.status-tarnished {
  border-color: rgba(190,145,95,0.75);
  background: rgba(105,72,38,0.16);
}
.profile-jewelry-equipped img,
.profile-jewelry-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.35));
}
.profile-jewelry-equipped.tarnished img,
.profile-jewelry-card.status-tarnished img {
  filter: sepia(0.8) saturate(0.5) brightness(0.72);
}
.profile-jewelry-equipped-info,
.profile-jewelry-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-jewelry-equipped-info strong,
.profile-jewelry-info strong { font-size: 0.82rem; color: var(--text); }
.profile-jewelry-equipped-info > span,
.profile-jewelry-info > span { font-size: 0.7rem; color: var(--text-dim); line-height: 1.22; }
.profile-jewelry-status { color: var(--accent) !important; font-variant-numeric: tabular-nums; }
.profile-jewelry-list { display: flex; flex-direction: column; gap: 6px; }
.profile-jewelry-action {
  min-width: 70px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 9px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 750;
  cursor: pointer;
}
.profile-jewelry-action.primary { border-color: var(--accent-dark); background: rgba(138,184,122,0.16); color: var(--accent); }
.profile-jewelry-action:disabled { opacity: 0.55; cursor: default; }
.profile-jewelry-empty { color: var(--text-dim); font-size: 0.76rem; line-height: 1.3; }
.profile-jewelry-empty--box { padding: 10px; border: 1px dashed var(--border); border-radius: 8px; text-align: center; }
.profile-jewelry-msg { min-height: 1.1em; margin: 7px 1px 0 !important; color: var(--accent); font-size: 0.74rem; font-weight: 650; }
.profile-jewelry-msg.is-error { color: #ef9a8f; }
.jw-item:disabled { cursor: default; }

@media (max-width: 420px) {
  .profile-jewelry-equipped,
  .profile-jewelry-card { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 7px; padding: 7px; }
  .profile-jewelry-equipped img,
  .profile-jewelry-card img { width: 46px; height: 46px; }
  .profile-jewelry-action { min-width: 58px; padding: 7px 6px; }
}
.jeweler-history { flex: 1 1 auto; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; min-height: 140px; }
.jw-msg { max-width: 85%; padding: 7px 11px; border-radius: 12px; font-size: 0.9rem; line-height: 1.35; overflow-wrap: anywhere; }
.jw-msg--npc { align-self: flex-start; background: rgba(150,120,210,0.28); color: #f0e9ff; border-bottom-left-radius: 4px; }
.jw-msg--me { align-self: flex-end; background: rgba(90,180,120,0.28); color: #eafff0; border-bottom-right-radius: 4px; }
.jw-msg--sys { align-self: center; background: rgba(255,255,255,0.06); color: #cfc4ec; font-size: 0.8rem; font-style: italic; text-align: center; }
.jw-mood { opacity: 0.7; font-size: 0.78rem; font-style: italic; }
.jeweler-offer { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 0 12px 8px;
  background: linear-gradient(180deg, rgba(255,200,80,0.2), rgba(255,160,40,0.14)); border: 1px solid rgba(255,210,120,0.5); border-radius: 12px; }
.jeweler-offer #jeweler-offer-text { flex: 1 1 auto; color: #ffe6a8; font-weight: 700; font-size: 0.86rem; }
.jeweler-buy-btn { background: linear-gradient(135deg, #ffe07a, #f5b21f); color: #2a1c00; font-weight: 800; border: none; border-radius: 9px; padding: 8px 16px; cursor: pointer; flex: 0 0 auto; }
.jeweler-buy-btn:active { transform: scale(0.95); }
.jeweler-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(200,175,255,0.18); }
.jeweler-input { flex: 1 1 auto; min-width: 0; background: rgba(255,255,255,0.08); border: 1px solid rgba(200,175,255,0.3); border-radius: 10px; padding: 9px 12px; color: #fff; font-size: 0.92rem; }
.jeweler-input:focus { outline: none; border-color: rgba(220,200,255,0.7); }
.jeweler-send-btn { background: rgba(150,120,210,0.9); color: #fff; font-weight: 700; border: none; border-radius: 10px; padding: 9px 16px; cursor: pointer; flex: 0 0 auto; }
.jeweler-send-btn:active { transform: scale(0.95); }
.jeweler-send-btn:disabled, .jeweler-input:disabled { opacity: 0.55; cursor: wait; }
.jw-pending { opacity: 0.72; animation: jw-thinking 0.9s ease-in-out infinite alternate; }
@keyframes jw-thinking { from { opacity: 0.45; } to { opacity: 0.9; } }
@media (max-width: 560px) {
  .jeweler-modal { padding: 5px; align-items: stretch; }
  .jeweler-chat { max-height: calc(100dvh - 10px); border-radius: 12px; }
  .jeweler-head { padding: 8px 10px; }
  .jeweler-portrait-sm { width: 40px; height: 40px; }
  .jeweler-section-head { padding-left: 9px; padding-right: 9px; }
  .jeweler-equipped { margin-left: 8px; margin-right: 8px; }
  .jeweler-owned-items,.jeweler-items { padding-left: 8px; padding-right: 8px; }
  .jw-owned-card { flex-basis: min(270px, calc(100vw - 38px)); }
  .jeweler-history { min-height: 112px; padding: 8px; }
  .jeweler-input-row { padding: 8px; }
}

/* =============================================================================
   Modale (daily reward + profile)
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-card--wide { max-width: 600px; text-align: left; }
.modal-icon { font-size: 3rem; margin-bottom: 8px; animation: spin 2s ease-in-out; }
@keyframes spin {
  from { transform: rotate(-20deg) scale(0.7); opacity: 0; }
  to   { transform: rotate(0deg) scale(1); opacity: 1; }
}
.modal-card h2 { margin: 4px 0 8px; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: transparent; border: none;
  color: var(--text-dim); font-size: 1.5rem; cursor: pointer;
}
.daily-reward-pts {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
  margin: 12px 0;
}

/* Profile sections */
.profile-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.profile-section h3 { margin: 0 0 8px; font-size: 0.95rem; }
.profile-hint { color: var(--text-dim); font-size: 0.8rem; font-style: italic; }

/* v6.32: przełącznik dźwięku */
.sound-toggle { display: flex; align-items: center; gap: 10px; margin-top: 6px; cursor: pointer; font-size: 0.9rem; }
.sound-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
/* v6.39e: e-mail do odzyskania hasła w Ustawieniach */
.account-email { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); }
.account-email-row { display: flex; gap: 6px; margin-top: 6px; }
.account-email-row input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.3); color: #fff; font-size: 0.9rem; }
.account-email-row .btn { white-space: nowrap; }
.account-email-msg { display: block; margin-top: 5px; font-size: 0.8rem; }

/* v6.32: najbliższe odznaki */
.near-ach-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.near-ach-row { display: flex; align-items: center; gap: 10px; }
.near-ach-emoji { font-size: 1.5rem; flex: none; }
.near-ach-info { flex: 1; min-width: 0; }
.near-ach-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.near-ach-left { color: #ffd86b; font-size: 0.72rem; font-weight: 700; }

/* v6.27: statystyki gracza */
.me-rank--tap { cursor: pointer; text-decoration: underline dotted rgba(232,223,211,.45); }
.me-rank--tap:hover { color: var(--accent); }
.stats-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.stats-head-emoji {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem; background: var(--bg-elev); flex: none;
  box-shadow: inset 0 0 0 2px var(--border);
}
.stats-head h2 { margin: 0; }
.stats-rank { margin: 2px 0 0; color: var(--accent); font-size: 0.9rem; font-weight: 600; }
.stats-rankbar-wrap { margin: 0 0 4px; }
.stats-rankbar {
  height: 10px; border-radius: 6px; background: var(--bg);
  border: 1px solid var(--border); overflow: hidden;
}
.stats-rankbar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width .4s ease;
}
.stats-rankbar-label { margin: 5px 0 0; font-size: 0.75rem; color: var(--text-dim); text-align: center; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.stat-cell {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 4px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.stat-cell-emoji { font-size: 1.15rem; }
.stat-cell-val { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.stat-cell-label { font-size: 0.62rem; color: var(--text-dim); line-height: 1.1; }
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

/* v6.16: przełącznik FPS (Płynność / bateria) */
.fps-toggle { display: flex; gap: 8px; margin-top: 10px; }
.fps-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px;
  background: var(--bg-elev);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.92rem; font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.fps-btn:hover { border-color: var(--accent); }
.fps-btn:active { transform: scale(0.96); }
.fps-btn-sub { font-size: 0.68rem; font-weight: 400; color: var(--text-dim); }
.fps-btn--active {
  border-color: var(--accent);
  background: var(--accent-dark);
  color: #fff;
}
.fps-btn--active .fps-btn-sub { color: rgba(255,255,255,0.85); }

/* Quests */
.quests-list { list-style: none; padding: 0; margin: 0; }
.quest-item {
  background: var(--bg-elev);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
.quest-item--done {
  opacity: 0.6;
  background: rgba(138, 184, 122, 0.15);
}
.quest-text { margin-bottom: 4px; }
.quest-reward { color: var(--accent); font-weight: 700; }
.quest-progress-wrap {
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 2px;
}
.quest-progress-bar { height: 100%; background: var(--accent); transition: width 0.3s; }
.quest-progress-text { font-size: 0.75rem; color: var(--text-dim); }

/* v6.28: Wielki Orzech — panel kooperacyjnej minigry */
.nut-panel {
  position: fixed;
  left: 50%; bottom: 108px; transform: translateX(-50%);
  z-index: 20;
  width: min(340px, 88vw);
  background: rgba(26,20,16,0.93);
  border: 2px solid #b97e3c;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  text-align: center;
}
.nut-panel.hidden { display: none; }
.nut-panel-title { font-size: 0.92rem; font-weight: 800; color: #f0c97a; margin-bottom: 8px; }
.nut-bar {
  height: 14px; background: rgba(0,0,0,0.4); border-radius: 8px;
  overflow: hidden; border: 1px solid #5a4326;
}
.nut-bar-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #c8902f, #e8b84a);
  transition: width 0.15s ease;
}
.nut-panel-info { font-size: 0.8rem; color: #d8c8a8; margin: 7px 0; font-variant-numeric: tabular-nums; }
.nut-tap-btn {
  width: 100%; padding: 13px; border: none; border-radius: 11px;
  background: linear-gradient(180deg, #7db04a, #5e8c38); color: #fff;
  font-size: 1.1rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 0 #43662a; transition: transform 0.06s, box-shadow 0.06s;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.nut-tap-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #43662a; }
.nut-tap-btn:disabled { background: #6b6253; box-shadow: 0 4px 0 #3a342b; opacity: 0.85; cursor: default; }
.nut-panel-hint { font-size: 0.78rem; color: #f0a85a; margin-top: 8px; font-weight: 700; }
.nut-panel-hint.hidden { display: none; }

/* v6.27: zwijane sekcje profilu (<details>) */
.profile-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  user-select: none;
}
.profile-summary::-webkit-details-marker { display: none; }
.profile-summary::after {
  content: "▸";
  margin-left: auto;
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: transform 0.2s;
}
details[open] > .profile-summary::after { transform: rotate(90deg); }
.profile-collapse > :not(summary) { margin-top: 8px; }

/* Achievements */
.achievements-grid { display: flex; flex-direction: column; gap: 6px; }
.ach-count { font-size: 0.8rem; color: var(--text-dim); font-weight: 600; }
/* v6.39: filtr „ukryj zdobyte" — pokaż tylko odznaki do zdobycia */
.ach-filter {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 0.82rem; color: var(--text-dim); font-weight: 600;
  margin: 4px 0 2px; user-select: none;
}
.ach-filter input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.ach-alldone { color: var(--text-dim); font-style: italic; padding: 10px 2px; }
.ach-cat-title {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); font-weight: 700; margin: 8px 0 2px;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.ach-card {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 8px; opacity: 0.62;
}
.ach-card--earned {
  opacity: 1;
  border-color: var(--accent-dark);
  background: linear-gradient(180deg, rgba(138,184,122,0.12), var(--bg-elev));
}
.ach-emoji { font-size: 1.35rem; line-height: 1.2; flex: none; }
.ach-card:not(.ach-card--earned) .ach-emoji { filter: grayscale(0.7); }
.ach-info { flex: 1; min-width: 0; }
.ach-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.ach-card--earned .ach-name { color: var(--accent); }
.ach-desc { font-size: 0.7rem; color: var(--text-dim); line-height: 1.15; margin-top: 1px; }
.ach-bar {
  height: 5px; background: rgba(0,0,0,0.3); border-radius: 3px;
  overflow: hidden; margin-top: 5px;
}
.ach-bar-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.ach-prog { font-size: 0.65rem; color: var(--text-dim); margin-top: 2px; }
.ach-rew { color: #ffd86b; font-size: 0.66rem; font-weight: 700; white-space: nowrap; }

/* v6.30: odznaki złożone — klikalne rozbicie per-jedzenie */
.ach-card--clickable { cursor: pointer; }
.ach-card--clickable:hover { border-color: var(--accent); }
.ach-tap {
  display: inline-block; font-size: 0.62rem; color: var(--accent);
  margin-top: 3px; font-weight: 700; opacity: 0.85;
}
.ach-card--open .ach-tap { color: var(--text-dim); }
.ach-detail {
  margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 6px;
}
/* wiersz: etykieta + liczba w jednej linii, pasek przenosi się pod spód (flex-wrap)
   → nigdy nie wypycha treści poza kartę na telefonie */
.ach-det-row {
  display: flex; align-items: center; flex-wrap: wrap;
  column-gap: 6px; row-gap: 3px;
  font-size: 0.66rem; color: var(--text-dim);
}
.ach-det-row--ok { color: var(--accent); }
.ach-det-lbl {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ach-det-val { flex: 0 0 auto; white-space: nowrap; font-weight: 700; }
.ach-det-bar {
  flex: 1 1 100%; height: 5px; background: rgba(0,0,0,0.3);
  border-radius: 3px; overflow: hidden;
}
.ach-det-fill { height: 100%; background: var(--accent); transition: width 0.3s; }
.ach-det-row--ok .ach-det-fill { background: #ffd86b; }

/* v6.27: toast o zdobytej odznace */
.ach-toast-wrap {
  position: fixed;
  top: 64px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  max-width: 92vw;
}
.ach-toast {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #2a2012, #3a2b1d);
  border: 1px solid var(--accent-dark);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(138,184,122,0.25);
  animation: achToastIn 0.45s cubic-bezier(0.2,0.9,0.3,1.3);
}
.ach-toast--out { animation: achToastOut 0.55s ease forwards; }
@keyframes achToastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes achToastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}
.ach-toast-emoji {
  font-size: 1.8rem; flex: none;
  filter: drop-shadow(0 0 6px rgba(255,210,90,0.5));
  animation: achEmojiPop 0.6s ease;
}
@keyframes achEmojiPop {
  0%   { transform: scale(0.3) rotate(-20deg); }
  60%  { transform: scale(1.25) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}
.ach-toast-head {
  font-size: 0.72rem; color: var(--accent); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ach-toast-name { font-size: 0.95rem; color: var(--text); font-weight: 700; }
.ach-toast-rew { color: #ffd86b; font-size: 0.8rem; margin-left: 4px; }
/* wariant: ukończona misja (niebieski akcent — odróżnia od złotych odznak) */
.ach-toast--quest {
  border-color: #5a9bd4;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(90,155,212,0.25);
}
.ach-toast--quest .ach-toast-head { color: #7fb8e6; }

/* =============================================================================
   Game
   ========================================================================== */
.game-body {
  overflow: hidden;
  height: 100vh;
  /* v6.27: zanim canvas wyrenderuje pierwszą klatkę, prześwituje tło body.
     Zielone (jak fallback mapy) zamiast ciemnego — brak "czarnego ekranu" przy wejściu. */
  background: #7db04a;
}
#game-canvas {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1;
}
/* v6.44: iOS (WebKit) — root gry nie może się przewijać (pasek adresu przestaje skakać =
   koniec migania) + zero overscrollu; canvas nie łapie gestów przewijania. Panele/czat/modale
   to osobne position:fixed nakładki z własnym scrollem, więc pozostają przewijalne.
   Klasa `is-ios` dokładana z game.js TYLKO na iOS — Android/desktop bez zmian. */
.game-body.is-ios {
  position: fixed;
  inset: 0;
  width: 100%;
  overscroll-behavior: none;
}
.game-body.is-ios #game-canvas {
  touch-action: none;
}

/* HUD top */
.hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(26, 20, 16, 0.85);
  border-bottom: 1px solid var(--border);
}
.hud-me, .hud-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.me-emoji {
  display: inline-flex;
  width: 32px; height: 32px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  border: 2px solid #fff;
}
.me-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.me-nick { font-weight: 700; }
.me-rank { font-size: 0.7rem; color: var(--text-dim); }
/* v6.39e: pasek górny — PRAWA strona (przyciski: ⛶/👤/🛡️/📊) NIGDY się nie ucina;
   lewa strona (nick) ustępuje i skraca się wielokropkiem, gdy ikon przybywa (np. tarcza w strefie). */
.hud-me { flex: 1 1 auto; min-width: 0; }
.hud-status { flex: 0 0 auto; }
.me-info:not(.me-score-tap) { min-width: 0; max-width: 42vw; }
.me-nick, .me-rank { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.me-score-label-small { font-size: 0.65rem; color: var(--text-dim); }
.me-score { font-size: 1rem; color: var(--accent); }
.me-lifetime { font-size: 1rem; color: #d4a574; }
/* v6.10: Maintenance banner */
.maint-banner {
  background: linear-gradient(135deg, #d83030, #8a2020);
  color: #fff;
  text-align: center;
  padding: 16px;
  font-size: 1rem;
  font-weight: bold;
  border-bottom: 3px solid #ffd84a;
  box-shadow: 0 4px 16px rgba(216, 48, 48, 0.5);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* v6.9: separator + logout safety */
.hud-divider {
  display: inline-block;
  width: 14px;
}
.btn-logout-safe {
  opacity: 0.6;
}
.btn-logout-safe:hover, .btn-logout-safe:focus {
  opacity: 1;
  color: #ff8080;
}

@media (max-width: 768px) {
  /* v6.9: kompaktowy HUD na mobile */
  .hud-top { padding: 5px 6px; gap: 4px; }
  .hud-me, .hud-status { gap: 4px; font-size: 0.72rem; }
  /* Większy odstęp przed logout na mobile, żeby palcem trafić w 📊 a nie ↩ */
  .hud-divider { width: 18px; }
  .btn-logout-safe { padding: 3px 6px !important; opacity: 0.5; }
  .me-emoji { width: 26px; height: 26px; font-size: 0.85rem; border-width: 1px; }
  .me-nick { font-size: 0.78rem; }
  .me-rank { font-size: 0.6rem; }   /* zostaje, ale mniejszy */
  .me-score { font-size: 0.9rem; }
  .me-score-label { display: none; }
  .hud-online { display: none; }     /* online count ukryte — jest na minimapie */
  .sprint-bar { font-size: 0.65rem; padding: 2px 6px; }
  .safe-zone-badge { font-size: 0.7rem; padding: 2px 6px; }
  .pvp-prot-bar { font-size: 0.7rem; padding: 2px 7px; }
  /* Mniejsze przyciski w HUD */
  .hud-status .btn--ghost {
    padding: 3px 8px; font-size: 0.85rem; min-width: 0;
  }
}

/* v6.13: klikalne punkty → emote picker */
.me-score-tap {
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  transition: background 0.15s;
  user-select: none;
  -webkit-user-select: none;
}
.me-score-tap:hover { background: rgba(255,255,255,0.1); }
.me-score-tap:active { background: rgba(255,255,255,0.18); }

/* v6.13: kompaktowy licznik online */
.hud-online-compact {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 2px 5px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}
.hud-online-compact strong {
  color: var(--text);
  font-size: 0.85rem;
}

/* Sprint bar w HUD */
.sprint-bar {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.sprint-bar--ready    { background: rgba(138, 184, 122, 0.15); color: var(--accent); }
.sprint-bar--active   { background: var(--accent); color: #fff; animation: sprintPulse 0.3s infinite alternate; }
.sprint-bar--cooldown { background: rgba(0,0,0,0.3); color: var(--text-dim); }
@keyframes sprintPulse {
  from { box-shadow: 0 0 0 0 rgba(138, 184, 122, 0.5); }
  to   { box-shadow: 0 0 8px 2px rgba(138, 184, 122, 0.8); }
}
@media (max-width: 480px) {
  .sprint-bar { font-size: 0.7rem; padding: 3px 8px; }
}
.me-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.me-score-label { color: var(--text-dim); }
#me-score { font-size: 1.1rem; color: var(--accent); }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 50px;
  right: 0;
  width: 280px;
  bottom: 0;
  background: rgba(42, 31, 21, 0.92);
  border-left: 1px solid var(--border);
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 12px;
  overflow: hidden;
}
.lb-section { flex-shrink: 0; }
.lb-section h3 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lb-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: decimal inside;
  font-size: 0.85rem;
}
.lb-list li {
  padding: 3px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.15);
  margin-bottom: 2px;
}
.lb-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
}
.lb-list--bullet { list-style: none; padding-left: 0; }
.lb-list--bullet li { padding-left: 4px; }
.lb-nick-dead { opacity: 0.45; text-decoration: line-through; }
.lb-score-small { color: var(--text-dim); font-size: 0.75rem; }
/* v6.31: liczba odznak obok gracza na liście top */
.lb-ach {
  float: right;
  color: #ffd86b;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 6px;
}
.lb-empty { color: var(--text-dim); font-style: italic; padding: 6px !important; background: transparent !important; }
/* v6.39: przełącznik rankingu (Punkty / Czas #1) */
.lb-tabs { display: flex; gap: 5px; margin: 2px 0 6px; }
.lb-tab {
  flex: 1 1 0; cursor: pointer; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05); color: var(--text-dim);
  border-radius: 8px; padding: 4px 6px; font-size: 0.72rem; font-weight: 700;
  white-space: nowrap; transition: background 0.15s, color 0.15s;
}
.lb-tab--active { background: var(--accent); color: #1a1208; border-color: var(--accent); }
.lb-top1time { float: right; color: #ffd86b; font-size: 0.74rem; font-weight: 700; margin-left: 6px; }

/* v6.39: panel prywatnych gniazd (sklep / zarządzanie) */
.nest-shop { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.nest-card {
  flex: 1 1 150px; min-width: 150px; text-align: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,205,90,0.3);
  border-radius: 12px; padding: 12px 10px;
}
.nest-card-name { font-weight: 800; color: #ffe27a; margin-bottom: 4px; }
.nest-card-dim { font-size: 0.78rem; color: var(--text-dim); }
.nest-card-price { font-weight: 700; margin: 6px 0 9px; }
.nest-guests { display: block; margin: 12px 0 6px; font-size: 0.85rem; color: var(--text-dim); }
.nest-guests input {
  display: block; width: 100%; margin-top: 5px; box-sizing: border-box;
  padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.3); color: #fff; font-size: 0.9rem;
}
.nest-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
/* v6.39 Etap 2: paleta stanowisk na podwórku */
.yard-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.yard-card { display: flex; flex-direction: column; gap: 4px; padding: 9px; border-radius: 10px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.yard-card-name { font-weight: 800; font-size: 0.92rem; }
.yard-card-info { font-size: 0.78rem; color: rgba(255,255,255,0.7); }
.yard-card-cost { font-size: 0.82rem; color: #ffd24a; font-weight: 700; }
.yard-card .btn { margin-top: 4px; padding: 6px 8px; font-size: 0.85rem; }
.yard-card .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
#yard-collect-btn { background: #2f9e54; border-color: rgba(190,255,200,0.7); }
#yard-collect-btn:active { background: #248044; }
/* v6.39b: planer podwórka — przeciągana miniatura w skali */
.yard-planner { margin: 10px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.yard-field { position: relative; margin: 0 auto; border-radius: 12px; touch-action: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #6aa84f, #4e8c3a);
  border: 4px solid #8a5a32; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.12), 0 4px 14px rgba(0,0,0,0.4);
  overflow: hidden; user-select: none; -webkit-user-select: none; }
/* v6.41: główna budka w planerze — PRZECIĄGALNA (przestaw karmnik gdzie chcesz) */
.yard-budka { position: absolute; transform: translate(-50%,-50%); font-size: 1.6rem; opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); cursor: grab; touch-action: none;
  pointer-events: auto; z-index: 4; padding: 4px; }
.yard-budka.drag { cursor: grabbing; z-index: 6; filter: drop-shadow(0 0 7px rgba(255,220,90,0.95)); }
.yard-chip { position: absolute; transform: translate(-50%,-50%); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  background: rgba(20,30,16,0.55); border: 2px solid rgba(255,255,255,0.55); border-radius: 50%;
  cursor: grab; touch-action: none; box-shadow: 0 2px 6px rgba(0,0,0,0.5); transition: box-shadow .12s; }
.yard-chip.ready { border-color: #ffe25a; box-shadow: 0 0 10px 3px rgba(255,220,80,0.8); }
/* v6.39g: licznik zapasu magazynu na chipie planera */
.chip-stock { position: absolute; top: -7px; right: -8px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: #ffb347; color: #2a1a05; font-size: 0.62rem; font-weight: 800;
  line-height: 15px; text-align: center; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
/* v6.39h: okno zbiorów — wiersz per rodzaj plonu */
.collect-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 6px 0;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; }
.collect-row .collect-name { flex: 1 1 auto; font-weight: 700; }
.collect-row .collect-count { color: #ffd75e; font-weight: 800; font-size: 1.05rem; }
.collect-row .collect-one { flex: 0 0 auto; padding: 6px 14px; }
.yard-chip.drag { cursor: grabbing; z-index: 5; box-shadow: 0 0 0 3px rgba(120,200,255,0.7), 0 4px 12px rgba(0,0,0,0.6); }
.yard-chip.to-bin { opacity: 0.5; filter: grayscale(0.6); box-shadow: 0 0 0 3px rgba(220,60,60,0.8); }
/* kosz — strefa upuszczenia kasująca dodatek (zamiast ✕ na kafelku, które przeszkadzało przy układaniu) */
.yard-trash { margin: 6px auto 0; max-width: 300px; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 10px; border-radius: 10px; border: 1.5px dashed rgba(220,90,90,0.6); color: rgba(255,180,180,0.85);
  font-size: 0.74rem; background: rgba(150,40,40,0.10); user-select: none; -webkit-user-select: none; }
.yard-trash.over { border-color: #ff6b6b; background: rgba(210,60,60,0.32); color: #fff; transform: scale(1.03); }
.yard-planner-hint { font-size: 0.78rem; color: rgba(255,255,255,0.65); }
/* v6.39b: lista gości podwórka */
.yard-guests { margin: 8px 0; }
.guest-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 4px 0;
  border-radius: 8px; background: rgba(255,255,255,0.06); }
.guest-nick { font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guest-collect { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; cursor: pointer; }
.guest-collect input { accent-color: #2f9e54; width: 16px; height: 16px; }
.guest-del { background: transparent; border: none; color: #e87a7a; font-size: 1.05rem; cursor: pointer; padding: 2px 6px; line-height: 1; }
.guest-del:hover { color: #ff9b9b; }
.guest-input { flex: 1 1 auto; min-width: 0; padding: 7px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.3); color: #fff; font-size: 0.9rem; }
.nest-h3 { margin: 16px 0 6px; font-size: 0.95rem; color: #ffd24a; }
.nest-invites { display: flex; flex-direction: column; gap: 6px; }
.nest-invite { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(255,255,255,0.05); border-radius: 9px; padding: 6px 10px; }
.nest-danger { color: #ff9c9c; border-color: rgba(255,120,120,0.4); }
.online-count {
  display: inline-block;
  background: var(--accent-dark);
  color: var(--text);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 4px;
}

/* Chat */
.chat-section { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.chat-section h3 {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
}
.chat-line { margin-bottom: 4px; word-wrap: break-word; }
.chat-line--system { color: var(--text-dim); font-style: italic; font-size: 0.8rem; }
/* v6.31: przełącznik czatu globalny/lokalny */
.chat-scope { display: flex; gap: 4px; margin-top: 8px; }
.chat-scope-btn {
  flex: 1; padding: 5px 6px; font-size: 0.72rem; font-weight: 700;
  background: var(--bg); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 7px; cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s, border-color .15s;
}
.chat-scope-btn--active { background: var(--accent-dark); color: #fff; border-color: var(--accent); }
/* v6.31: tag czatu lokalnego w /admin */
.chat-scope-tag { font-size: 0.66rem; color: #d8a24a; font-weight: 700; margin-left: 6px; }
.chat-form {
  display: flex; gap: 6px; margin-top: 6px;
}
.chat-form input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form .btn { padding: 8px 14px; }

/* Death overlay */
.death-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  text-align: center;
}
.death-overlay h2 { font-size: 2rem; margin: 0 0 8px; color: var(--danger); }
/* v6.31: ikona + podtytuł ekranu śmierci */
.death-icon { font-size: 4.4rem; line-height: 1; margin-bottom: 6px; filter: drop-shadow(0 0 12px rgba(0,0,0,0.8)); }
.death-sub { font-size: 0.95rem; color: #e8c9b0; margin: 0 0 10px; max-width: 80vw; }

/* Loading overlay (3D mode — pierwsze ładowanie modeli) */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #2a3f1d, #1a2810);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.loading-overlay.hidden { display: none; }
.loading-card {
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid #5a4a38;
  border-radius: 12px;
  padding: 32px 48px;
  text-align: center;
  color: #e8dfd3;
  max-width: 90vw;
}
.loading-card h2 { margin: 0 0 12px; font-size: 1.5rem; }
.loading-progress { font-size: 2rem; font-weight: bold; color: #ffd700; margin: 8px 0; }
.loading-hint { color: #aaa; font-size: 0.85rem; margin: 0; }
.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #5a4a38;
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
  margin: 0 auto 16px;
}
@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

/* v6.2: Sheik prompt — komunikat "naciśnij E" przy zbliżeniu */
.sheik-prompt {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(184, 32, 44, 0.95), rgba(122, 24, 32, 0.95));
  border: 2px solid #ffd84a;
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
  animation: sheik-pulse 1.8s ease-in-out infinite;
}
.sheik-prompt.hidden { display: none; }

/* v6.38: potwierdzenie wejścia na event boisko (portal-bramka) */
.pitch-enter-prompt {
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(20, 80, 30, 0.96), rgba(8, 50, 16, 0.96));
  border: 2px solid #ffe07a;
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 55;
  box-shadow: 0 4px 22px rgba(80, 220, 90, 0.45);
  animation: sheik-pulse 1.8s ease-in-out infinite;
}
.pitch-enter-prompt.hidden { display: none; }
.pitch-enter-emoji { font-size: 2rem; }
.pitch-enter-text { color: #fff; line-height: 1.3; }
.pitch-enter-text strong { color: #ffe07a; }
.pitch-enter-hint { font-size: 0.82rem; opacity: 0.92; }
.pitch-enter-btn {
  background: linear-gradient(135deg, #ffe07a, #f5b21f);
  color: #2a1c00;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
}
.pitch-enter-btn:active { transform: scale(0.95); }
.sheik-prompt-portrait { font-size: 2rem; }
/* v6.39b: prompt domku (kup/zarządzaj) przeniesiony POD minimapę + przycisk czatu lokalnego
   (lewy-górny róg, nie zasłania środka ekranu) i pomniejszony. ID bije klasę .pitch-enter-prompt. */
#nest-prompt {
  /* v6.40b: przeniesione do lewego-DOLNEGO rogu — górny-lewy zajmuje feed czatu (kolizja z „Zarządzaj") */
  left: 10px; bottom: 190px; top: auto;
  transform: none;
  max-width: 168px; padding: 6px 8px; gap: 7px;
  flex-wrap: wrap; border-radius: 11px;
  background: linear-gradient(135deg, rgba(20,80,30,0.78), rgba(8,50,16,0.78));  /* bardziej przezroczyste */
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  animation: none;                    /* spokojny w rogu — bez pulsowania */
}
#nest-prompt .pitch-enter-emoji { font-size: 1.15rem; }
#nest-prompt .pitch-enter-text  { font-size: 0.78rem; }
#nest-prompt .pitch-enter-hint  { font-size: 0.68rem; }
#nest-prompt .pitch-enter-btn   { padding: 5px 11px; font-size: 0.8rem; border-radius: 9px; }
/* stan „mój" = SAM przycisk „Zarządzaj", bez zielonego tła/ramki/emoji/tekstu */
#nest-prompt.nest-prompt--manage {
  background: none; border: none; box-shadow: none; padding: 0; gap: 0; max-width: none;
}
#nest-prompt.nest-prompt--manage .pitch-enter-emoji,
#nest-prompt.nest-prompt--manage .pitch-enter-text { display: none; }
#nest-prompt.nest-prompt--manage .pitch-enter-btn { opacity: 0.92; }
.sheik-prompt-text { color: #fff; line-height: 1.3; }
.sheik-prompt-text strong { color: #ffd84a; }
.sheik-prompt-hint { font-size: 0.85rem; opacity: 0.9; }
.sheik-prompt-hint kbd {
  background: #ffd84a;
  color: #3a1a08;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
  font-family: monospace;
}
@keyframes sheik-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4); transform: translateX(-50%) scale(1); }
  50%      { box-shadow: 0 4px 30px rgba(255, 215, 0, 0.7); transform: translateX(-50%) scale(1.04); }
}

/* v6.2: Dialog ze szejkiem */
.sheik-dialog-card {
  text-align: center;
  border-color: #ffd84a !important;
}
.sheik-portrait-big {
  font-size: 5rem;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.6));
}
.sheik-dialog-text {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 16px 0 24px;
  color: #e8dfd3;
}
.sheik-dialog-text em { color: #ffd84a; }
.sheik-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.sheik-dialog-error {
  color: #ff8888;
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
}

/* v6.2: Minigra Truskawkowa Lawina */
.minigame-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #87ceeb 0%, #fed7aa 100%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.minigame-overlay.hidden { display: none; }
.minigame-hud {
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  gap: 28px;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  border-bottom: 2px solid #ffd84a;
}
.minigame-hud strong { color: #ffd84a; }
/* v6.27: live wynik minigry — duży, wyśrodkowany pod paskiem */
.minigame-livescore {
  width: 100%;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  color: #ffe87a;
  font-size: 1.5rem;
  font-weight: 900;
  padding: 5px 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid rgba(255, 216, 74, 0.4);
}
.minigame-livescore strong { color: #fff34a; font-size: 1.85rem; }
.minigame-livescore strong.mg-score-hit { color: #ff5a5a; animation: mg-score-shake 0.4s ease; }
@keyframes mg-score-shake {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.25); }
}
.minigame-bombs strong { color: #ff8080; }
.minigame-golden strong { color: #ffea60; text-shadow: 0 0 8px rgba(255,215,0,0.7); }
.minigame-combo strong { color: #ff8c30; text-shadow: 0 0 12px rgba(255,140,48,0.9); }
.minigame-combo {
  background: rgba(255, 140, 48, 0.25);
  padding: 2px 10px;
  border-radius: 8px;
  animation: combo-glow 0.5s ease-in-out infinite alternate;
}
@keyframes combo-glow {
  to { background: rgba(255, 140, 48, 0.5); transform: scale(1.05); }
}
.minigame-powerup {
  background: rgba(80, 180, 255, 0.3);
  padding: 2px 10px;
  border-radius: 8px;
}
#minigame-canvas {
  flex: 1;
  width: 100%;
  display: block;
  touch-action: none;
}

/* v6.31: baner wejścia na mapę 3 „Sezon Polowań" */
.hunt-banner {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none; text-align: center;
  background: radial-gradient(ellipse at center, rgba(60,10,8,0.45) 0%, rgba(20,8,4,0.0) 70%);
}
.hunt-banner.hidden { display: none; }
.hunt-banner-skull { font-size: 5rem; line-height: 1; filter: drop-shadow(0 0 14px rgba(0,0,0,0.8)); }
.hunt-banner-title {
  margin-top: 8px;
  font-size: clamp(2rem, 9vw, 4.4rem); font-weight: 900; letter-spacing: 4px;
  color: #ffefe2; text-shadow: 0 0 18px rgba(220,40,30,0.9), 0 3px 8px rgba(0,0,0,0.9);
}
.hunt-banner-sub {
  margin-top: 10px; font-size: clamp(0.8rem, 3.2vw, 1.05rem); font-weight: 700;
  color: #ffcf9e; text-shadow: 0 2px 6px rgba(0,0,0,0.9); padding: 0 14px; max-width: 90vw;
}
.hunt-banner--in  { animation: hunt-banner-in 0.5s ease-out both; }
.hunt-banner--out { animation: hunt-banner-out 0.7s ease-in both; }
@keyframes hunt-banner-in {
  0%   { opacity: 0; transform: scale(1.25); }
  60%  { opacity: 1; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes hunt-banner-out { from { opacity: 1; } to { opacity: 0; } }

/* v6.33: Event „Ptasie Mistrzostwa" — baner wejścia (zielono-złoty) */
.football-banner {
  background: radial-gradient(ellipse at center, rgba(20,80,30,0.5) 0%, rgba(8,30,12,0.0) 70%);
}
.football-banner .hunt-banner-title {
  color: #fff7df; text-shadow: 0 0 18px rgba(80,220,90,0.9), 0 3px 8px rgba(0,0,0,0.9);
}
.football-banner .hunt-banner-sub { color: #d6f5c0; }

/* v6.39l: EVENT 2× — zegar (pill, sam dół ekranu, półprzezroczysty — nie przeszkadza w grze) */
.event2x-badge {
  /* v6.40b: mniejszy + przy samej dolnej krawędzi (zaokrąglone tylko górne rogi = „siedzi" na krawędzi) */
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 14;
  background: rgba(210, 90, 25, 0.45);
  color: rgba(255,255,255,0.85); font-weight: 700; font-size: 0.64rem; letter-spacing: 0.2px;
  padding: 2px 9px; border-radius: 8px 8px 0 0; border: 1px solid rgba(255,225,150,0.25); border-bottom: none;
  pointer-events: none; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
/* v6.39l: intro-wideo eventu — overlay pełnoekranowy */
.event-video-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.92); padding: 16px;
}
.event-video { width: min(94vw, 1280px); max-height: 84vh; aspect-ratio: 16/9;
  border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.7); background: #000; object-fit: contain; }
.event-video-skip {
  position: absolute; top: 18px; right: 18px; z-index: 61;
  background: rgba(20,16,10,0.8); color: #ffe6a0; font-weight: 800; font-size: 0.95rem;
  padding: 9px 16px; border-radius: 10px; border: 1px solid rgba(255,210,122,0.5); cursor: pointer;
}
.event-video-skip:active { transform: scale(0.96); }

/* v6.44: błysk-nagroda Jubilera — krótki klip makro (sprzedaż / odbiór czyszczenia) */
.jeweler-reward-overlay {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); padding: 16px; cursor: pointer;
  animation: jwRewardFade 0.22s ease-out;
}
.jeweler-reward-video {
  width: min(62vw, 300px); max-height: 74vh; aspect-ratio: 9/16;
  border-radius: 16px; object-fit: cover; background: #000;
  box-shadow: 0 0 46px rgba(255,205,110,0.5), 0 12px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,210,120,0.45);
}
@keyframes jwRewardFade { from { opacity: 0; } to { opacity: 1; } }

/* v6.38: Kraina Zimy — baner wejścia (zimne, lodowe barwy) */
.winter-banner {
  background: radial-gradient(ellipse at center, rgba(120,170,220,0.5) 0%, rgba(20,40,70,0.0) 70%);
}
.winter-banner .hunt-banner-title {
  color: #eaf6ff; text-shadow: 0 0 18px rgba(150,210,255,0.95), 0 3px 8px rgba(0,0,0,0.9);
}
.winter-banner .hunt-banner-sub { color: #cfe6ff; }

/* v6.39g: Dzielnica domków — baner wejścia (ciepły, ogrodowy) */
.north-banner {
  background: radial-gradient(ellipse at center, rgba(150,200,90,0.45) 0%, rgba(30,50,15,0.0) 70%);
}
.north-banner .hunt-banner-title {
  color: #f6ffe8; text-shadow: 0 0 18px rgba(190,240,120,0.95), 0 3px 8px rgba(0,0,0,0.9);
}
.north-banner .hunt-banner-sub { color: #e2f3c4; }

/* v6.38: Ogłoszenie admina — baner na środku (zamiast czatu) */
.admin-banner {
  background: radial-gradient(ellipse at center, rgba(120,90,20,0.55) 0%, rgba(30,20,5,0.0) 70%);
}
.admin-banner .admin-banner-text {
  color: #ffe9a8;
  font-size: 1.7rem;
  line-height: 1.25;
  text-transform: none;          /* zwykły tekst, nie krzyczące CAPS jak strefy */
  max-width: min(86vw, 720px);
  margin: 0 auto;
  white-space: pre-wrap;
  word-break: break-word;
  text-shadow: 0 0 18px rgba(255,210,120,0.9), 0 3px 8px rgba(0,0,0,0.9);
}
/* v6.39: baner „nowy Król Karmnika" — złota, mocniejsza wersja banera */
.admin-banner.king-banner {
  background: radial-gradient(ellipse at center, rgba(180,140,30,0.7) 0%, rgba(40,28,5,0.0) 72%);
}
.admin-banner.king-banner .admin-banner-text {
  color: #ffe27a; font-weight: 900;
  text-shadow: 0 0 22px rgba(255,205,50,1), 0 0 44px rgba(255,150,0,0.7), 0 3px 8px rgba(0,0,0,0.9);
}

/* v6.33: GOOOL! overlay */
.gool-overlay {
  position: fixed; inset: 0; z-index: 62; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.gool-overlay.hidden { display: none; }
.gool-big {
  font-size: clamp(2.6rem, 14vw, 7rem); font-weight: 900; letter-spacing: 5px;
  color: #fff; text-shadow: 0 0 24px rgba(80,220,90,0.95), 0 4px 10px rgba(0,0,0,0.9);
}
.gool-big--gold { color: #ffe27a; text-shadow: 0 0 28px rgba(255,200,40,1), 0 4px 10px rgba(0,0,0,0.9); }
.gool-sub {
  margin-top: 6px; font-size: clamp(1rem, 4.5vw, 1.8rem); font-weight: 800;
  color: #fff3d0; text-shadow: 0 2px 8px rgba(0,0,0,0.95);
}
.gool-show { animation: gool-pop 0.6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes gool-pop {
  0%   { opacity: 0; transform: scale(0.4) rotate(-6deg); }
  60%  { opacity: 1; transform: scale(1.12) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* v6.33: badge liczby goli w HUD */
.football-goals {
  font-size: 0.78rem; padding: 3px 8px; border-radius: 10px;
  background: rgba(20,90,35,0.85); color: #eaffe0; font-weight: 700;
  display: inline-flex; align-items: center; gap: 3px;
}
.football-goals strong { color: #ffe27a; }

/* v6.36: przycisk dziobania wiszącej słoniny (pojawia się gdy blisko) */
.suet-btn {
  position: fixed; right: 18px; bottom: 112px; z-index: 14;
  display: inline-flex; align-items: center; gap: 5px;
  background: #b07a32; color: #fff; font-weight: 800; font-size: 1rem;
  border: 2px solid rgba(255,235,180,0.7); border-radius: 999px;
  padding: 12px 18px; cursor: pointer; box-shadow: 0 3px 12px rgba(0,0,0,0.45);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  animation: suet-pulse 0.9s ease-in-out infinite;
}
.suet-btn:active { transform: scale(0.92); background: #9a6526; }
.suet-btn.hidden { display: none; }
@keyframes suet-pulse { 0%,100% { box-shadow: 0 3px 12px rgba(0,0,0,0.45); } 50% { box-shadow: 0 0 16px 4px rgba(255,200,90,0.7); } }

/* v6.34: pływające wskaźniki (ping + FPS) — przeniesione z paska górnego,
   żeby ikona 📊 mieściła się na wąskich telefonach. Obok minimapy (lewy górny róg). */
.float-meters {
  position: fixed; top: 58px; left: 168px; z-index: 12;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  pointer-events: none;
}
.net-ind {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.62rem; color: #e6ddd0;
  background: rgba(12,16,12,0.5); border-radius: 8px; padding: 2px 7px;
}
.net-dot { width: 8px; height: 8px; border-radius: 50%; background: #777; display: inline-block; flex: none; }
.net-ms { min-width: 14px; text-align: right; font-weight: 700; }
.net-ind-lbl { opacity: 0.6; }
.fps-meter {
  font-size: 0.62rem; color: #e6ddd0;
  background: rgba(12,16,12,0.5); border-radius: 8px; padding: 2px 7px;
}
.fps-meter.hidden { display: none; }
.fps-meter strong { color: #9be86a; }

/* v6.34: przełącznik PvP (⚔️ walki / 🛡️ bez walk) — w menu Profil, na górze */
.pvp-pref-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid rgba(255,255,255,0.35); border-radius: 12px;
  padding: 8px 16px; cursor: pointer;
  font-size: 0.95rem; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background 0.15s, transform 0.1s;
}
.pvp-pref-btn .pvp-toggle-ico { font-size: 1.25rem; }
.pvp-pref-btn.pvp-on  { background: #b0281e; }    /* walki włączone — czerwony */
.pvp-pref-btn.pvp-off { background: #246ea0; }    /* bez walk — niebieski */
.pvp-pref-btn:active { transform: scale(0.96); }
.pvp-hint { margin-top: 8px; }
.pvp-hint strong { color: #ffcf2a; }

/* v6.38: trening klikania PvP (bez walki, bez utraty punktów) */
.practice-open-btn {
  display: block; width: 100%; margin-top: 12px;
  border: 1.5px solid rgba(255,255,255,0.35); border-radius: 12px;
  padding: 10px 16px; cursor: pointer;
  font-size: 0.95rem; font-weight: 800; color: #fff;
  background: #6b3fb0; box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: background 0.15s, transform 0.1s; text-align: center;
}
.practice-open-btn:active { transform: scale(0.97); }
.practice-open-sub { display: block; margin-top: 3px; font-size: 0.72rem; font-weight: 600; opacity: 0.85; }

/* trening = ta sama karta co pojedynek (klasy duel-*), tu tylko drobne korekty */
.practice-overlay { z-index: 205; }
.practice-card { position: relative; max-height: 92vh; overflow-y: auto; }
.practice-intro { color: #ddd; font-size: 0.9rem; margin: 0 0 16px; }
.practice-intro strong { color: #ffd84a; }
.practice-vs { grid-template-columns: 1fr; justify-items: center; }
.practice-vs .duel-side { min-width: 200px; }
.practice-card .duel-tap-btn:disabled { filter: grayscale(0.65) brightness(0.55); cursor: default; }
/* v6.39: odliczanie 3-2-1 na przycisku — wielka cyfra, lekki „puls" */
.practice-card .duel-tap-btn.practice-cd { font-size: 3.4rem; letter-spacing: 0; filter: none; opacity: 1; animation: practice-cd-pop 1s ease-out infinite; }
@keyframes practice-cd-pop { 0% { transform: scale(0.82); } 35% { transform: scale(1); } 100% { transform: scale(1); } }
.practice-start-btn {
  border: none; border-radius: 12px; padding: 11px 26px; cursor: pointer;
  font-size: 1.05rem; font-weight: 800; color: #fff; background: #2f8f4e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35); touch-action: manipulation;
  transition: transform 0.1s, background 0.15s; margin: 4px auto 2px; display: block;
}
.practice-start-btn:active { transform: scale(0.96); }
.practice-start-btn:disabled { background: #4a4a4a; cursor: default; }
.practice-result { font-size: 1rem; font-weight: 700; color: #9be86a; min-height: 1.2em; text-align: center; margin: 8px 0 0; }
.practice-result.is-record { color: #ffd24a; text-shadow: 0 0 12px rgba(255,210,74,0.6); }
.practice-board-wrap { margin-top: 14px; text-align: left; }
.practice-board-summary { cursor: pointer; font-weight: 800; color: #ffd84a; padding: 6px 0; }

.practice-leaderboard { list-style: none; counter-reset: prc; padding: 0; margin: 6px 0 0; }
.practice-leaderboard li {
  counter-increment: prc; display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; border-radius: 9px; margin-bottom: 4px;
  background: rgba(255,255,255,0.05); font-size: 0.9rem;
}
.practice-leaderboard li::before {
  content: counter(prc); flex: 0 0 auto; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.12);
  font-weight: 800; font-size: 0.8rem;
}
.practice-leaderboard li:nth-child(1)::before { background: #ffd24a; color: #3a2a00; }
.practice-leaderboard li:nth-child(2)::before { background: #cfd6e0; color: #2a2a2a; }
.practice-leaderboard li:nth-child(3)::before { background: #cd853f; color: #2a1500; }
.practice-leaderboard .prc-nick { flex: 1 1 auto; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.practice-leaderboard .prc-taps { flex: 0 0 auto; font-weight: 800; color: #ffd24a; }
.practice-leaderboard .prc-empty { opacity: 0.7; font-style: italic; background: none; }

/* v6.34: toast ostrzeżenia o słabym łączu */
.net-warn {
  position: fixed; left: 50%; top: 58px; transform: translateX(-50%);
  z-index: 59; max-width: 92vw; pointer-events: none;
  display: flex; align-items: center; gap: 9px;
  background: rgba(150,40,20,0.92); color: #fff;
  border: 1px solid rgba(255,180,120,0.6); border-radius: 12px;
  padding: 8px 14px; box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: net-warn-in 0.4s ease-out both;
}
.net-warn.hidden { display: none; }
.net-warn--out { animation: net-warn-out 0.6s ease-in both; }
.net-warn-ico { font-size: 1.4rem; line-height: 1; }
.net-warn-txt { display: flex; flex-direction: column; line-height: 1.2; }
.net-warn-txt strong { font-size: 0.86rem; }
.net-warn-txt span { font-size: 0.72rem; color: #ffe0cf; }
@keyframes net-warn-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes net-warn-out { from { opacity: 1; } to { opacity: 0; } }

/* v6.31: błysk obrażeń (zestrzelenie / ugryzienie) */
.dmg-flash {
  position: fixed; inset: 0; z-index: 58; pointer-events: none;
  background: rgba(180,30,20,0.5); opacity: 0;
}
.dmg-flash.hidden { display: none; }
.dmg-flash--show { animation: dmg-flash-anim 0.42s ease-out both; }
@keyframes dmg-flash-anim { 0% { opacity: 0.85; } 100% { opacity: 0; } }

/* v6.31: winieta gdy ranny — pulsująca czerwień na krawędziach ekranu */
.wound-vignette {
  position: fixed; inset: 0; z-index: 57; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(160,15,10,0.55);
  animation: wound-pulse 1.3s ease-in-out infinite;
}
.wound-vignette.hidden { display: none; }
@keyframes wound-pulse {
  0%, 100% { box-shadow: inset 0 0 90px 20px rgba(160,15,10,0.4); }
  50%      { box-shadow: inset 0 0 150px 45px rgba(190,20,12,0.7); }
}
/* v6.32: szybki czat lokalny — przycisk pod minimapą + mini-pasek */
.quick-chat-btn {
  position: fixed; left: 10px; top: 214px; z-index: 14;   /* minimapa: top 56 + 150 = 206, +gap */
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-dark); color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  font-size: 1.15rem; display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0.55; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: opacity 0.15s;
}
.quick-chat-btn:hover  { opacity: 0.9; }
.quick-chat-btn:active { transform: scale(0.92); opacity: 1; }
.quick-chat-btn.hidden { display: none; }
.quick-chat-bar {
  position: fixed; left: 10px; top: 210px; z-index: 30;
  display: flex; gap: 5px; align-items: center;
  background: rgba(18,16,12,0.94); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; box-shadow: 0 3px 12px rgba(0,0,0,0.5);
}
.quick-chat-bar.hidden { display: none; }
.quick-chat-tag { font-size: 0.95rem; flex: none; }
.quick-chat-bar input {
  width: 190px; max-width: 48vw;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; font-family: inherit; font-size: 0.9rem;
}
.quick-chat-bar input:focus { outline: none; border-color: var(--accent); }
.quick-chat-go, .quick-chat-x {
  flex: none; width: 34px; height: 34px; border-radius: 8px;
  border: none; cursor: pointer; font-size: 1rem; font-weight: 700;
}
.quick-chat-go { background: var(--accent-dark); color: #fff; }
.quick-chat-x  { background: rgba(255,255,255,0.12); color: #e8dfd3; font-size: 1.3rem; line-height: 1; }

/* v6.32: feed lokalnych wiadomości pod przyciskiem — lekko przezroczysty, nie blokuje gry */
.quick-chat-feed {
  position: fixed; left: 10px; top: 262px; z-index: 13;
  display: flex; flex-direction: column; gap: 4px;
  pointer-events: none; max-width: min(62vw, 340px);
}
/* v6.39h: PEŁNA treść bez „…" (user: z daleka nie wiadomo, co ktoś napisał) — zawijanie zamiast ucinania */
.qc-feed-line {
  background: rgba(18,16,12,0.45);
  border-radius: 8px; padding: 4px 8px;
  font-size: 0.78rem; color: #f2ece0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
  animation: qc-feed-life 5s ease forwards;
}
.qc-feed-nick { font-weight: 700; }
@keyframes qc-feed-life {
  0%   { opacity: 0; transform: translateY(-4px); }
  8%   { opacity: 0.82; transform: translateY(0); }
  78%  { opacity: 0.82; }
  100% { opacity: 0; }
}

.minigame-hint {
  display: none;   /* v6.32: ukryte we wszystkich minigrach — gracze sami wiedzą co robić */
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  /* v6.31: napis tylko informacyjny — klik/tap musi przechodzić do canvasu
     (inaczej jagoda renderowana ZA napisem była nieklikalna) */
  pointer-events: none;
}

/* v6.9: FLOATING JOYSTICK — pojawia się gdzie się dotknie (mobile only) */
.joystick {
  position: fixed;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(58, 43, 29, 0.55);
  border: 2px solid rgba(255,255,255,0.3);
  z-index: 15;
  touch-action: none;
  pointer-events: none;       /* dotyk obsługujemy globalnie */
  display: none;
}
.joystick.hidden { display: none; }
.joystick:not(.hidden) { display: block; }
.joystick-knob {
  position: absolute;
  top: 50%; left: 50%;
  width: 50px; height: 50px;
  margin-left: -25px; margin-top: -25px;
  border-radius: 50%;
  background: rgba(138, 184, 122, 0.85);
  border: 2px solid rgba(255,255,255,0.4);
  pointer-events: none;
}

/* v6.9: Sprint button — bottom center na mobile */
.sprint-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe066, #ffaa20);
  border: 3px solid #fff;
  color: #5a3a08;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  /* v6.31: pod sidebarem (z-index 8) — żeby otwarty czat zasłaniał sprint, a nie odwrotnie
     (na telefonie przycisk zasłaniał pole pisania). Nadal nad canvasem → w grze klikalny. */
  z-index: 6;
  box-shadow: 0 4px 16px rgba(255, 160, 0, 0.5);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  padding: 0;
  /* v6.12: 80% opacity */
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.05s;
}
.sprint-btn:hover { opacity: 1.0; }
.sprint-btn:active {
  transform: translateX(-50%) scale(0.92);
  background: linear-gradient(135deg, #ffffaa, #ffd040);
  opacity: 1.0;
}
.sprint-btn.hidden { display: none; }
.sprint-btn--cooldown {
  background: linear-gradient(135deg, #888, #555);
  border-color: #aaa;
  color: #ddd;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.sprint-btn--active {
  background: linear-gradient(135deg, #80ff80, #20c040);
  box-shadow: 0 0 24px rgba(80, 255, 80, 0.8);
  animation: sprint-active-pulse 0.3s ease-in-out infinite alternate;
}
@keyframes sprint-active-pulse {
  to { box-shadow: 0 0 32px rgba(80, 255, 80, 1); }
}
.sprint-btn-icon { font-size: 2rem; line-height: 1; }
/* v6.13: timer cooldownu na przycisku sprintu */
.sprint-cd-timer {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: #ccc;
  pointer-events: none;
  white-space: nowrap;
}
/* v6.13: emote backdrop — pokrywa grę gdy picker otwarty, tap zamyka */
.emote-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: transparent;
  cursor: default;
}
.emote-backdrop.hidden { display: none; }

/* v6.13: emote picker */
.emote-picker {
  position: fixed;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(88vw, 366px);
  gap: 4px;
  background: rgba(18, 13, 6, 0.93);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 26px;
  padding: 8px 10px;
  z-index: 55;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
  pointer-events: all;
}
.emote-picker.hidden { display: none; }
.emote-btn {
  font-size: 1.7rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: transform 0.1s, background 0.1s;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.emote-btn:hover, .emote-btn:active {
  background: rgba(255,255,255,0.14);
  transform: scale(1.25);
}
/* v6.39: ekskluzywna emotka Króla Karmnika w pickerze */
.king-emote {
  filter: drop-shadow(0 0 6px rgba(255,205,50,0.95));
  background: rgba(255,205,50,0.12) !important;
  border-radius: 8px;
}
.king-emote.hidden { display: none; }
/* v6.39: aktualny król na górze zakładki „Czas #1" */
.lb-king-now { background: rgba(255,205,50,0.14) !important; font-weight: 800; color: #ffe27a; border-radius: 6px; }
.lb-king-tag { float: right; font-size: 0.66rem; font-weight: 700; color: #1a1208; background: #ffd24a; border-radius: 6px; padding: 1px 6px; margin-left: 6px; }

/* v6.29: przełącznik kosmetycznej smugi (easter egg) */
.trail-toggle {
  border-left: 1px solid rgba(255,255,255,0.18);
  margin-left: 4px; padding-left: 8px;
}
.trail-toggle.hidden { display: none; }
.trail-toggle--on { text-shadow: 0 0 8px #b97aff, 0 0 16px #7ad0ff; }

/* Pokazuj joystick i sprint button tylko na touch */
@media (pointer: coarse) {
  .sprint-btn:not(.hidden) { display: flex; }
}

/* v6.5: Safe zone badge w HUD */
.safe-zone-badge {
  background: linear-gradient(135deg, #2a6acc, #1e4a99);
  border: 2px solid #80c0ff;
  color: #e8f4ff;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: bold;
  box-shadow: 0 0 16px rgba(128, 192, 255, 0.5);
  animation: safezone-pulse 2s ease-in-out infinite;
}
.safe-zone-badge strong { color: #ffd84a; }
@keyframes safezone-pulse {
  50% { box-shadow: 0 0 28px rgba(128, 192, 255, 0.9); }
}

/* v6.13: pasek ochrony poPvP */
.pvp-prot-bar {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
}
.pvp-prot-bar--active {
  background: linear-gradient(135deg, #b85c00, #7a3d00);
  border: 2px solid #ffb830;
  color: #ffe0a0;
  box-shadow: 0 0 14px rgba(255, 180, 48, 0.55);
  animation: pvpprot-pulse 1.2s ease-in-out infinite;
}
.pvp-prot-bar--fighting {
  background: linear-gradient(135deg, #7a1010, #4d0808);
  border: 2px solid #ff6040;
  color: #ffd0c0;
  box-shadow: 0 0 14px rgba(255, 80, 40, 0.7);
  animation: pvpprot-pulse 0.5s ease-in-out infinite;
}
@keyframes pvpprot-pulse {
  50% { box-shadow: 0 0 24px rgba(255, 160, 40, 0.9); }
}
@media (max-width: 600px) {
  .pvp-prot-bar { font-size: 0.7rem; padding: 2px 7px; }
}

/* v6.14: znacznik trybu nocnego w HUD */
.night-badge {
  display: inline-flex;
  align-items: center;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 6px;
  background: rgba(30, 20, 80, 0.7);
  border: 1px solid rgba(150, 130, 255, 0.4);
  color: #c8c0ff;
  animation: night-glow 2.5s ease-in-out infinite;
  cursor: default;
}
@keyframes night-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(130, 100, 255, 0.35); }
  50%       { box-shadow: 0 0 14px rgba(180, 150, 255, 0.60); }
}

/* v6.14: Admin panel — przyciski trybu dnia/nocy */
.daynight-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.daynight-btn {
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.daynight-btn:hover {
  background: #3a3128;
  border-color: var(--accent);
}
.daynight-btn--active {
  background: #2b3e27;
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(138, 184, 122, 0.4);
  color: #b5e0a0;
  font-weight: 700;
}

/* v6.4.1: Duel overlay — full screen PvP tap battle */
.duel-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, rgba(184, 32, 44, 0.7), rgba(20, 8, 8, 0.95));
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.duel-overlay.hidden { display: none; }
.duel-card {
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid #ffd84a;
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  color: #fff;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.4);
}
.duel-card h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  color: #ffd84a;
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.8);
  animation: duel-flash 0.5s ease-in-out infinite alternate;
}
@keyframes duel-flash {
  to { text-shadow: 0 0 32px rgba(255, 215, 0, 1), 0 0 64px rgba(255, 100, 0, 0.6); }
}
.duel-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.duel-side {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 12px;
}
.duel-side-label { color: #ffd84a; font-size: 0.75rem; letter-spacing: 0.1em; }
.duel-side-nick { font-size: 1.1rem; font-weight: bold; margin-top: 2px; }
.duel-side-score { color: #aaa; font-size: 0.8rem; }
.duel-side-taps { margin-top: 8px; font-size: 1.1rem; }
.duel-side-taps strong {
  font-size: 1.6rem;
  color: #ff8c30;
  text-shadow: 0 0 12px rgba(255, 140, 48, 0.6);
}
.duel-side-bonus { margin-top: 6px; color: #ff8c30; font-size: 0.85rem; }
.duel-vs-text { font-size: 2rem; font-weight: bold; color: #ff8c30; }
.duel-timer {
  font-size: 1.4rem;
  margin: 12px 0;
}
.duel-timer strong {
  font-size: 2.2rem;
  color: #ffd84a;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}
.duel-tap-btn {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 12px auto 8px;
  padding: 24px 16px;
  background: linear-gradient(135deg, #ff8c30, #d83030);
  color: #fff;
  border: 3px solid #ffd84a;
  border-radius: 16px;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.05s;
  box-shadow: 0 4px 24px rgba(255, 140, 48, 0.5);
}
.duel-tap-btn:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, #ffaa50, #ff5050);
}
.duel-tap-icon { display: block; font-size: 2rem; margin-bottom: 4px; }
.duel-hint { color: #aaa; margin: 0; font-size: 0.85rem; }

/* v6.9: Sidebar toggle jest w HUD (top-right) — bez specjalnego pozycjonowania.
   PC: sidebar widoczny domyślnie, klik chowa.
   Mobile: sidebar domyślnie ukryty, klik pokazuje. */
.sidebar {
  transition: transform 0.25s ease;
}
.sidebar--hidden {
  transform: translateX(100%);
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(100%);
    width: 85vw;
    max-width: 320px;
    top: 50px;  /* pod HUD */
  }
  .sidebar--open { transform: translateX(0); }
  .sidebar--hidden { transform: translateX(100%); }
}
