/* =============================================================
   Menelverse — Blok Ekipy / Praga
   Mobile-first: fixed HUD top + scrollable middle + fixed bottom nav
   Fonty: Bebas Neue (display) + Barlow Condensed (UI)
   Ikony: Lucide SVG (brak emoji)
   ============================================================= */

/* ---------- Google Fonts (backup, główne ładuje <link>) ---------- */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,900;1,700&family=Barlow:wght@400;600&display=swap');

/* ---------- Tokeny ---------- */
:root {
  --bg:        #14110d;
  --bg2:       #1c1813;
  --bg3:       #242018;
  --surf:      #2c2720;
  --surf2:     #38322a;

  --border:    #4a4035;
  --border2:   #5c5040;
  --border3:   #6e6050;

  --yellow:    #f0b429;
  --yellow2:   #d49820;
  --orange:    #d9531a;
  --green:     #4ea040;
  --blue:      #3a86b4;
  --red:       #b83030;

  --text:      #ede5d4;
  --text2:     #a89880;
  --text3:     #6a5c4c;

  --fh: 'Bebas Neue', 'Arial Black', sans-serif;  /* display */
  --fb: 'Barlow Condensed', 'Arial Narrow', sans-serif; /* body UI */
  --fu: 'Barlow', Arial, sans-serif; /* running text */

  --hud-h:   58px;
  --bnav-h:  66px;
  --r:       6px;
  --r2:      10px;
  --r3:      14px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; background: none; border: none; cursor: pointer; }
img    { display: block; max-width: 100%; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Utils ---------- */
.hidden { display: none !important; }
.muted  { color: var(--text2); }
.small  { font-size: 0.84em; }
.mono   { font-family: 'Courier New', monospace; }

/* ================================================================
   AUTH SCREEN
   ================================================================ */
.screen-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #2a3a2a 0%, transparent 70%),
    linear-gradient(180deg, #1a1613 0%, #14110d 60%, #0e0b08 100%);
  padding: 24px 14px;
}

.auth-wrap {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: var(--r3);
  padding: 22px 20px 26px;
  box-shadow: 6px 6px 0 #000, 0 0 0 1px #000;
}

.lang-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}
.label-xs {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
}

.auth-logo { margin-bottom: 18px; }
.logo-text {
  font-family: var(--fh);
  font-size: clamp(3.2rem, 14vw, 5rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--yellow);
  text-shadow: 4px 4px 0 #000, -1px -1px 0 #000;
}
.logo-sub {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 4px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text2);
}
.auth-input {
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: var(--r);
  padding: 14px 14px;
  color: var(--text);
  font: 700 1.05rem var(--fb);
  transition: border-color 0.15s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(240,180,41,0.15);
}
.auth-fine {
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.5;
}

/* ================================================================
   LANG SWITCH (shared)
   ================================================================ */
.lang-btns {
  display: flex;
  gap: 4px;
}
.lang-btn {
  min-width: 38px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--r);
  border: 2px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  font-family: var(--fb);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  transition: all 0.15s;
}
.lang-btn:hover { color: var(--text); border-color: var(--border3); }
.lang-btn.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111;
}
.lang-btns--sm .lang-btn {
  min-height: 30px; min-width: 32px; padding: 0 7px; font-size: 0.7rem;
}

/* ================================================================
   BUTTONS shared
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r);
  padding: 13px 18px;
  font-family: var(--fh);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  transition: transform 0.1s, box-shadow 0.1s, filter 0.1s;
  box-shadow: 4px 4px 0 #000;
}
.btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 2px 2px 0 #000; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

.btn--cta {
  width: 100%;
  background: var(--yellow);
  color: #111;
}
.btn--cta:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translate(-1px,-1px);
  box-shadow: 5px 5px 0 #000;
}

.btn--ghost {
  background: var(--surf2);
  color: var(--text);
  border: 2px solid var(--border2);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--yellow); color: var(--yellow); }

.btn--orange {
  background: var(--orange);
  color: #fff;
}
.btn--orange:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translate(-1px,-1px);
  box-shadow: 5px 5px 0 #000;
}

/* ================================================================
   GAME SCREEN — 3-part flex layout
   ================================================================ */
.screen-game {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ---- HUD TOP (2 wiersze) ---- */
.hud-top {
  flex-shrink: 0;
  background: var(--bg2);
  border-bottom: 2px solid var(--border2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 12px 8px;
  padding-top: max(7px, env(safe-area-inset-top));
  box-shadow: 0 3px 0 #000;
  z-index: 10;
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Lokacja */
.hud-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  transition: border-color 0.15s;
}
.hud-loc:hover { border-color: var(--yellow); }
.hud-loc__icon { width: 15px; height: 15px; color: var(--yellow); flex-shrink: 0; }
.hud-loc__text { display: flex; flex-direction: column; line-height: 1.1; }
.hud-loc__city { font-size: 0.56rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text3); }
.hud-loc__district { font-family: var(--fh); font-size: 0.95rem; letter-spacing: 0.04em; color: var(--yellow); }

/* Waluty — wiersz 2 */
.hud-row--currencies {
  gap: 5px;
}

.cur-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--bg3);
  transition: border-color 0.15s;
  min-width: 0;
}

.cur-ico { width: 16px; height: 16px; flex-shrink: 0; }

.cur-body {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.cur-label {
  font-size: 0.54rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
  white-space: nowrap;
}
.cur-val {
  font-family: var(--fh);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kolory walut */
.cur-pill--money { border-color: rgba(78,160,64,0.4); }
.cur-pill--money .cur-ico { color: #6dc45d; }
.cur-pill--money .cur-val { color: #6dc45d; }

.cur-pill--scrap { border-color: rgba(58,140,180,0.4); }
.cur-pill--scrap .cur-ico { color: var(--blue); }
.cur-pill--scrap .cur-val { color: #5aaed4; }

.cur-pill--teeth { border-color: rgba(240,180,41,0.4); }
.cur-pill--teeth .cur-ico { color: var(--yellow); }
.cur-pill--teeth .cur-val { color: var(--yellow); }

/* Przycisk info walut */
.cur-info-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--bg3);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.cur-info-btn:hover { border-color: var(--yellow); color: var(--yellow); }
.cur-info-ico { width: 16px; height: 16px; }

/* ---- SCROLLABLE MIDDLE ---- */
.game-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- CHARACTER CARD ---- */
.char-card {
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: var(--r2);
  padding: 12px;
  display: flex;
  gap: 12px;
  box-shadow: 4px 4px 0 #000;
  position: relative;
  overflow: hidden;
}

/* żółto-pomarańczowa "rura" cieplna na górze */
.char-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: repeating-linear-gradient(90deg,
    var(--yellow) 0, var(--yellow) 24px,
    var(--orange) 24px, var(--orange) 48px
  );
}

.char-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.char-avatar {
  width: 82px;
  height: 82px;
  border-radius: 12px;
  padding: 3px;
  background: repeating-linear-gradient(135deg,
    var(--yellow),
    var(--orange) 50%,
    var(--yellow) 100%
  );
  box-shadow: 3px 3px 0 #000;
}
.char-avatar__img {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: cover;
  background: var(--bg);
  image-rendering: pixelated;
}

/* Odznaka PWR pod awatarem */
.char-pwr-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 82px;
  padding: 5px 0 4px;
  background: rgba(240,180,41,0.1);
  border: 2px solid rgba(240,180,41,0.35);
  border-radius: var(--r);
  box-shadow: 2px 2px 0 #000;
}
.char-pwr-badge__k {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--yellow2);
}
.char-pwr-badge__v {
  font-family: var(--fh);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--yellow);
  text-shadow: 1px 1px 0 #000;
  line-height: 1.1;
}

.char-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}

.char-name {
  font-family: var(--fh);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 2px 2px 0 #000;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.char-level {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
}
.char-level__ico { width: 13px; height: 13px; color: var(--yellow); }
.char-level__sep { color: var(--text3); }
.char-ach {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text3);
}
.char-ach__ico { width: 11px; height: 11px; color: var(--orange); }

/* ---- STAT BARS ---- */
.stat-bars { display: flex; flex-direction: column; gap: 5px; }
.sbar {
  display: grid;
  grid-template-columns: 16px 1fr 36px;
  align-items: center;
  gap: 7px;
}
.sbar__ico { width: 14px; height: 14px; flex-shrink: 0; }
.sbar__ico--energy { color: #3ab4cc; }
.sbar__ico--hunger { color: var(--yellow); }
.sbar__ico--booze  { color: var(--orange); }
.sbar__ico--nic    { color: #9b6eb8; }

.sbar__track {
  height: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.sbar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.sbar__fill--energy { background: #3ab4cc; }
.sbar__fill--hunger { background: var(--yellow); }
.sbar__fill--booze  { background: var(--orange); }
.sbar__fill--nic    { background: #9b6eb8; }

.sbar__val {
  font-family: var(--fh);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--text3);
  text-align: right;
}

/* ---- QUICK ACTIONS ---- */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 14px;
  border-radius: var(--r2);
  border: 2px solid var(--border2);
  background: var(--surf);
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.15s;
  min-height: 80px;
}
.action-btn:hover:not(:disabled) {
  border-color: var(--yellow);
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 #000;
}
.action-btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: 2px 2px 0 #000; }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.action-btn__ico { width: 22px; height: 22px; }
.action-btn--beg .action-btn__ico  { color: var(--yellow); }
.action-btn--scav .action-btn__ico { color: var(--green); }

.action-btn__label {
  font-family: var(--fh);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}
.action-btn__cd {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text3);
  font-family: 'Courier New', monospace;
}

/* ---- PET BUTTON ---- */
.pet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  border-radius: var(--r2);
  border: 2px dashed var(--green);
  background: rgba(78,160,64,0.07);
  color: var(--green);
  font-family: var(--fh);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  transition: background 0.15s;
  box-shadow: 3px 3px 0 #000;
}
.pet-btn__ico { width: 22px; height: 22px; }
.pet-btn:hover { background: rgba(78,160,64,0.14); }

/* ---- GRID NAV ---- */
.grid-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 500px) { .grid-nav { grid-template-columns: repeat(4, 1fr); } }

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 70px;
  padding: 10px 8px;
  border-radius: var(--r2);
  border: 2px solid var(--border2);
  background: var(--surf);
  color: var(--text2);
  font-family: var(--fh);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
  box-shadow: 3px 3px 0 #000;
  transition: transform 0.1s, box-shadow 0.1s, border-color 0.15s, color 0.15s;
}
.tile__ico { width: 22px; height: 22px; }
.tile:hover {
  color: var(--yellow);
  border-color: var(--yellow);
  transform: translate(-2px,-2px);
  box-shadow: 5px 5px 0 #000;
}
.tile:active { transform: translate(1px,1px); box-shadow: 2px 2px 0 #000; }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  flex-shrink: 0;
  height: var(--bnav-h);
  background: var(--bg2);
  border-top: 2px solid var(--border2);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -3px 0 #000;
  z-index: 10;
}

.bnav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  color: var(--text3);
  font-family: var(--fb);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-right: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.bnav-btn:last-child { border-right: none; }
.bnav-btn:hover { color: var(--yellow); background: rgba(240,180,41,0.06); }

.bnav-btn__ico { width: 22px; height: 22px; }
.bnav-btn__label { line-height: 1; }

/* Środkowy "główny" przycisk */
.bnav-btn--center {
  color: var(--yellow);
  background: rgba(240,180,41,0.08);
  border-top: 3px solid var(--yellow);
  margin-top: -3px;
}
.bnav-btn--center:hover { background: rgba(240,180,41,0.16); }

/* badge na zadaniach */
.bnav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 20px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  font-family: var(--fh);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 1px 1px 0 #000;
}

/* ================================================================
   TOAST
   ================================================================ */
.toast-host {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--bnav-h) + 10px + env(safe-area-inset-bottom));
  width: min(380px, calc(100% - 20px));
  z-index: 40;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  pointer-events: none;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--bg2);
  border: 2px solid var(--border2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 4px 4px 0 #000;
  animation: toast-in 0.3s cubic-bezier(0.22,1,0.36,1) both;
}
.toast--gain { border-color: var(--green); color: var(--green); }
.toast--warn { border-color: var(--yellow); color: var(--yellow); }
@keyframes toast-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ================================================================
   OVERLAY
   ================================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 560px) { .overlay { align-items: center; padding: 16px; } }
.overlay.hidden { display: none; }

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.overlay__panel {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: min(88dvh, 720px);
  display: flex;
  flex-direction: column;
  z-index: 1;
  background: var(--bg2);
  border: 2px solid var(--border2);
  border-radius: var(--r3) var(--r3) 0 0;
  box-shadow: 0 -4px 0 #000;
  overflow: hidden;
}
@media (min-width: 560px) {
  .overlay__panel {
    border-radius: var(--r3);
    box-shadow: 6px 6px 0 #000;
  }
}

.overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 2px solid var(--border2);
  background: var(--surf);
  flex-shrink: 0;
}
.overlay__title {
  font-family: var(--fh);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
}
.overlay__close {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  border: 2px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  box-shadow: 2px 2px 0 #000;
}
.overlay__close-ico { width: 18px; height: 18px; }
.overlay__close:hover { color: var(--orange); border-color: var(--orange); }

.overlay__body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  color: var(--text2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---- Currency guide popup ---- */
.cur-guide { display: flex; flex-direction: column; gap: 10px; }
.cur-guide-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--surf);
  box-shadow: 2px 2px 0 #000;
}
.cur-guide-ico { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; color: var(--text3); }
.cur-guide-item--money { border-color: rgba(78,160,64,0.4); }
.cur-guide-item--money .cur-guide-ico { color: #6dc45d; }
.cur-guide-item--scrap { border-color: rgba(58,140,180,0.4); }
.cur-guide-item--scrap .cur-guide-ico { color: var(--blue); }
.cur-guide-item--teeth { border-color: rgba(240,180,41,0.4); }
.cur-guide-item--teeth .cur-guide-ico { color: var(--yellow); }
.cur-guide-item strong { display: block; margin-bottom: 4px; }

/* ---- Scav task picker ---- */
.scav-pick-item { cursor: pointer; }
.scav-pick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.scav-pick-label { font-family: var(--fh); font-size: 1.1rem; letter-spacing: 0.04em; }
.scav-pick-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text3);
  white-space: nowrap;
}
.scav-pick-cost--low { color: var(--red); }
.scav-pick-desc { margin: 0 0 8px; }
.scav-pick-btn { width: 100%; margin-top: 6px; }

/* Action btn "running" state */
.action-btn--running .action-btn__label { color: var(--blue) !important; }
.action-btn--running .action-btn__cd { color: #5aaed4; }
.action-btn--ready .action-btn__label { color: var(--green) !important; }
.action-btn--ready .action-btn__cd { color: var(--green); }

/* ---- Scav status overlay ---- */
.scav-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 10px 0;
}
.scav-status__label {
  font-family: var(--fh);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--text2);
}
.scav-status__timer {
  font-family: var(--fh);
  font-size: 3.5rem;
  letter-spacing: 0.06em;
  color: var(--yellow);
  text-shadow: 3px 3px 0 #000;
  line-height: 1;
}
.scav-status__exp { font-size: 0.88rem; color: var(--text2); }

/* ---- Develop panel ---- */
.dev-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surf);
  border: 2px solid var(--border2);
  border-radius: var(--r2);
  margin-bottom: 14px;
  box-shadow: 3px 3px 0 #000;
}
.dev-lv-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 3px solid var(--yellow);
  background: rgba(240,180,41,0.12);
  box-shadow: 3px 3px 0 #000;
  flex-shrink: 0;
}
.dev-lv-num {
  font-family: var(--fh);
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
  line-height: 1;
}
.dev-lv-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow2);
  margin-top: 1px;
}
.dev-exp-col { flex: 1; min-width: 0; }
.dev-exp-track {
  height: 10px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.dev-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow2), var(--yellow));
  border-radius: 2px;
  transition: width 0.4s ease;
}
.dev-exp-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}
.dev-sp-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: var(--r);
  background: rgba(240,180,41,0.15);
  border: 1px solid rgba(240,180,41,0.4);
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 700;
}
.inline-ico { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }

.dev-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dev-stat__info { flex: 1; min-width: 0; }
.dev-stat__total {
  font-family: var(--fh);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--yellow);
  margin-left: 8px;
}
.dev-stat__btn {
  flex-shrink: 0;
  min-width: 52px;
  font-size: 1.3rem;
  padding: 10px 14px;
}

/* Elementy wewnątrz overlaya */
.h3 {
  font-family: var(--fh);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--orange);
  text-shadow: 1px 1px 0 #000;
  margin: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}
.h3:first-child { margin-top: 0; }

.list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.list-item {
  padding: 12px 14px;
  border-radius: var(--r);
  border: 2px solid var(--border);
  background: var(--surf);
  color: var(--text);
  box-shadow: 2px 2px 0 #000;
}
.list-item strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--fh);
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(240,180,41,0.15);
  color: var(--yellow);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(240,180,41,0.3);
  vertical-align: middle;
}

.shop-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

code {
  font-size: 0.82rem;
  background: rgba(240,180,41,0.1);
  color: var(--yellow);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  border: 1px solid rgba(240,180,41,0.22);
}

.field-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 2px solid var(--border2);
  border-radius: var(--r);
  padding: 10px 12px;
  color: var(--text);
  font: 600 0.95rem var(--fb);
}
.field-input:focus { outline: none; border-color: var(--yellow); }

/* ================================================================
   DESKTOP (powyżej 900px)
   ================================================================ */
@media (min-width: 900px) {
  .screen-auth { align-items: center; }
  .auth-wrap { padding: 20px 14px; }

  .screen-game {
    max-width: 480px;
    margin: 20px auto;
    height: calc(100dvh - 40px);
    border: 2px solid var(--border2);
    border-radius: var(--r3);
    box-shadow: 8px 8px 0 #000;
    overflow: hidden;
  }
}

/* ================================================================
   MAŁE EKRANY
   ================================================================ */
@media (max-width: 360px) {
  :root { --hud-h: 52px; --bnav-h: 60px; }
  .grid-nav { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .tile { min-height: 60px; font-size: 0.82rem; gap: 4px; }
  .tile__ico { width: 18px; height: 18px; }
  .char-avatar { width: 70px; height: 70px; }
  .char-attrs { width: 70px; }
}
