/* Troskovice MMO — Webová mapa */
:root {
  /* Středověká hnědá paleta (barevna_paleta_hneda.png) */
  --bg:       #3D1E0F;   /* Bistre — nejtmavší pozadí */
  --surface:  #5E270B;   /* Seal brown — povrchy, karty */
  --border:   #7A3A14;   /* tmavý bronz — ohraničení */
  --accent:   #DDA827;   /* Goldenrod — hlavní akcent */
  --bronze:   #BB7C23;   /* Bronze — sekundární akcent */
  --text:     #F2E4C4;   /* teplá krémová — text */
  --muted:    #C69B6F;   /* Lion — tlumený text */
  --danger:   #f85149;
  --success:  #3fb950;
  --info:     #DDA827;   /* info = goldenrod v tomto designu */
  --panel-w:  320px;

  /* Tile textures (z troskovice_32x32) */
  --tile-tex-dark:   url('/gui/assets/panel_texture.png');
  --tile-tex-64:     url('/gui/troskovice_64x64/tile_1056.png');  /* dark stone */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Layout ── */
#app {
  display: flex;
  flex: 1;
  overflow: hidden;
}

#map-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #5E270B 0%, #3D1E0F 40%, #1a0a04 100%);
}

/* ── Side Panel ── */
#panel {
  width: var(--panel-w);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Slide animace */
  transition: transform 0.28s ease, opacity 0.28s ease;
  transform: translateX(0);
}
/* Schovaný stav — vysunut doprava mimo obrazovku, nulová šířka v layoutu */
#panel.panel-hidden {
  transform: translateX(100%);
  pointer-events: none;
  width: 0;
  border: none;
  overflow: hidden;
}

/* Toggle tlačítko panelu — na pravém okraji mapy */
#panel-toggle-btn {
  position: absolute;
  top: 148px;
  right: 0;
  transform: none;
  z-index: 810;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--text);
  font-size: 1.1rem;
  width: 34px;
  height: 48px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, right 0.28s ease;
  box-shadow: -2px 0 8px rgba(0,0,0,0.3);
}
#panel-toggle-btn:hover { background: rgba(221,168,39,0.15); }
/* Posuň tlačítko doleva, když je panel viditelný (panel má var(--panel-w) = 320px) */
#app:not(.panel-collapsed) #panel-toggle-btn { right: var(--panel-w); }

#panel-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #3D1E0F 0%, #5E270B 100%);
  /* Tile texture overlay */
  background-image: var(--tile-tex-dark), linear-gradient(135deg, #1a1510 0%, #2a1f0f 100%);
  background-size: 64px 64px, 100% 100%;
  background-blend-mode: overlay, normal;
  image-rendering: pixelated;
}

#panel-header h1 {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
}

#panel-header p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

#world-info {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.world-badge {
  font-size: 0.72rem;
  background: rgba(221,168,39,0.15);
  border: 1px solid rgba(221,168,39,0.3);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background .15s, border-color .15s;
}
.world-badge:hover {
  background: rgba(221,168,39,0.28);
  border-color: rgba(221,168,39,0.6);
}

/* ── Výstrahy tooltip ───────────────────────────────────────────── */
#world-badge-tooltip {
  display: none;
  position: fixed;
  z-index: 2000;
  background: rgba(35,15,5,0.97);
  border: 1.5px solid rgba(221,168,39,0.5);
  border-radius: 10px;
  padding: 12px 16px;
  min-width: 200px;
  max-width: 280px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.7);
  color: #F2E4C4;
  font-family: 'MedievalSharp', 'Cinzel', Georgia, serif;
  font-size: 0.82rem;
  pointer-events: none;
}
#world-badge-tooltip.visible { display: block; }
#world-badge-tooltip h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
  color: #DDA827;
  border-bottom: 1px solid rgba(221,168,39,0.25);
  padding-bottom: 5px;
}
#world-badge-tooltip ul {
  margin: 0; padding: 0 0 0 14px;
  list-style: disc;
  line-height: 1.7;
}
#world-badge-tooltip ul li { color: #C69B6F; }
#world-badge-tooltip ul li b { color: #F2E4C4; }
#world-badge-tooltip .tip-note {
  margin-top: 8px;
  font-size: 0.73rem;
  color: #C69B6F;
  border-top: 1px solid rgba(221,168,39,0.15);
  padding-top: 6px;
}

/* ── Herní rychlost (superadmin) ────────────────────────────────── */
#speed-ctrl {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
}
#speed-label {
  font-size: 0.68rem;
  color: #DDA827;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
#speed-btns {
  display: flex;
  gap: 3px;
}
#speed-btns button {
  background: rgba(61,30,15,0.88);
  border: 1px solid rgba(187,124,35,0.45);
  color: #C69B6F;
  border-radius: 5px;
  padding: 2px 5px;
  font-size: 0.65rem;
  cursor: pointer;
  font-family: 'Cinzel', Georgia, serif;
  transition: background .15s, color .15s, border-color .15s;
}
#speed-btns button:hover,
#speed-btns button.active {
  background: rgba(221,168,39,0.18);
  border-color: #DDA827;
  color: #DDA827;
}

#panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

#panel-body::-webkit-scrollbar { width: 4px; }
#panel-body::-webkit-scrollbar-track { background: transparent; }
#panel-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ── Lokace karty ── */
.loc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.loc-card.active { border-color: var(--accent); }

.loc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

.loc-header:hover { background: rgba(255,255,255,0.03); }

.loc-thumb {
  width: 32px; height: 32px;
  border-radius: 4px;
  object-fit: cover;
}

.loc-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
}

.loc-count {
  background: var(--accent);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.loc-desc {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0 12px 4px;
  font-style: italic;
  line-height: 1.4;
}

.loc-stats {
  display: flex;
  gap: 12px;
  padding: 4px 12px 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 3px;
}

.loc-players {
  display: none;
  padding: 0 12px 10px;
}

.loc-card.active .loc-players { display: block; }

.player-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.player-row:last-child { border-bottom: none; }

.panel-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.panel-avatar-fallback {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.player-info { flex: 1; }
.player-name { font-size: 0.82rem; font-weight: 600; display: block; }
.player-room { font-size: 0.72rem; color: var(--muted); }

.empty-state {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 8px 0;
}

/* ── Status bar ── */
#status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--bg);
}

.ws-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  display: inline-block;
  margin-right: 5px;
}
.ws-dot.connected { background: var(--success); }

/* ── Top bar ── */
#top-bar {
  background: var(--surface);
  border-bottom: 1px solid #7A3A14;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  /* Subtle stone texture */
  background-image: var(--tile-tex-dark);
  background-size: 64px 64px;
  background-blend-mode: overlay;
  image-rendering: pixelated;
}

#top-bar h1 {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
}

#top-bar nav { margin-left: auto; display: flex; gap: 8px; }

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.07); color: var(--text); }
.nav-link.btn {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.nav-link.btn:hover { filter: brightness(1.1); }

/* ── Mapa markery ── */

/* Vnější wrapper — nese transform pro zoom scaling */
.loc-marker-outer {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.22s ease;
  transform-origin: bottom center;
}
.loc-marker-outer:hover .loc-marker-card {
  border-color: #FFD84D;
  filter: drop-shadow(0 0 8px rgba(221,168,39,0.6));
}

/* Rámeček — průhledné pozadí, přiléhá k erbu */
.loc-marker-card {
  background: transparent !important;
  border: 1.5px solid var(--accent);
  border-radius: 7px;
  overflow: hidden;
  padding: 3px;
  display: block;
  line-height: 0;
}

/* Erb obrázek — pevná výška dle reálného poměru PNG (cca 1:1.63) */
.loc-marker-img {
  width: 54px;
  height: 88px;
  object-fit: contain;
  display: block;
  background: transparent;
}

/* Název lokace pod rámečkem */
.loc-marker-label {
  font-size: 9px;
  font-weight: 700;
  color: #e6edf3;
  text-align: center;
  margin-top: 3px;
  white-space: nowrap;
  font-family: Georgia, serif;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,1), 0 0 10px rgba(0,0,0,0.9);
  line-height: 1;
}

/* Počet hráčů — nad středem rámečku */
.loc-marker-count {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 0.58rem;
  font-weight: 800;
  border-radius: 50%;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid rgba(0,0,0,0.7);
  z-index: 2;
  white-space: nowrap;
}

/* zachováno pro zpětnou kompatibilitu */
.loc-marker {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}
.loc-marker:hover { background: rgba(221,168,39,0.2); }

.player-marker {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  overflow: hidden;
  cursor: pointer;
}

.player-avatar {
  width: 100%; height: 100%;
  object-fit: cover;
}

.player-avatar-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  font-size: 16px;
}

/* ── Overlay — světové události (max 3 najednou, zbytek skrollovatelný) ── */
#events-overlay {
  position: absolute;
  top: 10px; right: 10px;
  display: flex;
  flex-direction: row;
  gap: 5px;
  z-index: 900;
  pointer-events: auto;
  align-items: center;
  /* Max 3 viditelné (3×36 + 2×5 gap = 118px), zbytek vodorovně skrolovat */
  max-width: 118px;
  overflow-x: auto;
  overflow-y: visible;
  flex-wrap: nowrap;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;  /* Firefox */
}
#events-overlay::-webkit-scrollbar { display: none; }
.event-badge { flex-shrink: 0; scroll-snap-align: start; }

.event-badge {
  position: relative;
  width: 36px; height: 36px;
  background: rgba(13,17,23,0.82);
  border: 1.5px solid var(--danger);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: default;
  animation: pulse 2.5s ease-in-out infinite;
  transition: transform .15s;
}
.event-badge:hover { transform: scale(1.18); }

/* Tooltip je řešen JS divem #map-tooltip v index.html (nevadí overflow:hidden) */

@keyframes pulse {
  0%, 100% { border-color: var(--danger); box-shadow: 0 0 0 0 rgba(248,81,73,0); }
  50%       { border-color: rgba(248,81,73,0.4); box-shadow: 0 0 6px 2px rgba(248,81,73,0.25); }
}

/* ── Hover na touch zařízeních — zakáž zoom 2.5x při klepnutí ── */
@media (hover: none) {
  .loc-pin:hover .loc-erb-img,
  .loc-pin:active .loc-erb-img {
    transform: none !important;
    filter: drop-shadow(0 3px 7px rgba(0,0,0,.75)) !important;
  }
}

/* ── Mobilní top bar ── */
#mobile-top-bar {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  z-index: 850;
  background: linear-gradient(to bottom, rgba(30,12,5,0.90) 60%, rgba(30,12,5,0));
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  pointer-events: none;
}
#mobile-top-bar > * { pointer-events: auto; }
#mob-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid #DDA827;
  overflow: hidden;
  cursor: pointer;
  background: #1a0e00;
  flex-shrink: 0;
}
#mob-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
#mob-info { flex: 1; min-width: 0; }
#mob-date-text { display: block; font-family: 'Cinzel', Georgia, serif; font-size: 0.80rem; color: #F2E4C4; font-weight: 600; white-space: nowrap; }
#mob-date-sub  { display: block; font-size: 0.62rem; color: #C69B6F; white-space: nowrap; }
#mob-online    { font-size: 0.60rem; color: #C69B6F; white-space: nowrap; flex-shrink: 0; }

/* ── Mobilní tab bar ── */
#mobile-tab-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 58px;
  z-index: 1200;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  justify-content: space-around;
  align-items: stretch;
  safe-area-inset-bottom: env(safe-area-inset-bottom);
  padding-bottom: env(safe-area-inset-bottom);
}
.mob-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
  gap: 1px;
  position: relative;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mob-tab > span:last-of-type { font-size: 0.52rem; letter-spacing: 0.02em; }
.mob-tab.active { color: var(--accent); }
.mob-tab.active::before {
  content: "";
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}
.mob-tab-badge {
  position: absolute;
  top: 5px; right: 50%;
  transform: translateX(10px);
  background: var(--danger); color: #fff;
  border-radius: 50%;
  width: 14px; height: 14px;
  font-size: 0.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

/* ── Responzivní ── */
@media (max-width: 768px) {
  /* Zobraz mobilní UI elementy */
  #mobile-top-bar { display: flex; }
  #mobile-tab-bar { display: flex; }

  /* Skryj desktopové UI elementy */
  #top-bar           { display: none !important; }
  #map-bottom-bar    { display: none !important; }
  #notif-bell-btn    { display: none !important; }
  #mobile-btn        { display: none !important; }
  #panel-toggle-btn  { display: none !important; }

  /* Boční panel → spodní zásuvka nad tab barem */
  #panel {
    display: flex !important;      /* vždy přítomný v DOM */
    position: fixed;
    left: 0; right: 0; bottom: 58px;  /* nad tab barem */
    width: 100% !important;
    height: 55vh;
    max-height: 80vh;
    border: none;
    border-top: 2px solid var(--accent);
    border-radius: 16px 16px 0 0;
    z-index: 1000;
    transform: translateY(100%);   /* schovano */
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
  }
  #panel.show { transform: translateY(0); }

  /* Táhlo (vytahová lišta) */
  #panel-pull-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0 4px;
    cursor: ns-resize;
    flex-shrink: 0;
    background: var(--surface);
  }
  #panel-pull-bar::after {
    content: "";
    width: 40px; height: 4px;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.7;
  }

  #panel-toggle-btn { display: none; }

  /* Mobilní 👥 — pod notif bellem (pravý horní roh) */
  #mobile-btn {
    display: flex;
    align-items: center; justify-content: center;
    position: absolute;
    top: 54px; right: 10px;
    z-index: 811;
    background: rgba(61,30,15,0.85);
    color: var(--accent);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    width: 36px; height: 36px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }

  /* Notif bell → pravý horní roh (přesun z levé strany) */
  #notif-bell-btn {
    left: auto !important;
    right: 10px;
  }
  #notif-panel {
    left: auto !important;
    right: 10px;
  }

  /* Chat panel — celá šířka, nad tab barem */
  #chat-panel {
    bottom: 58px !important;
    left: 0 !important; right: 0 !important;
    width: auto !important;
    max-height: 60vh !important;
    border-radius: 14px 14px 0 0 !important;
    opacity: 1 !important;  /* vždy plně viditelný na mobilu */
  }
  #chat-panel.visible:hover { opacity: 1 !important; }

  /* Event log panel — celá šířka, nad tab barem */
  #event-log-panel {
    bottom: 58px !important;
    left: 0 !important; right: 0 !important;
    width: auto !important;
    height: 50vh !important;
    border-radius: 14px 14px 0 0 !important;
    opacity: 1 !important;
  }
  #event-log-panel.visible:hover { opacity: 1 !important; }

  /* Notif panel — celá šířka, nad tab barem */
  #notif-panel {
    bottom: 58px !important; top: auto !important;
    left: 0 !important; right: 0 !important;
    width: auto !important;
    max-height: 60vh !important;
    border-radius: 14px 14px 0 0 !important;
  }
}

@media (min-width: 769px) {
  #mobile-top-bar { display: none !important; }
  #mobile-tab-bar { display: none !important; }
  #mobile-btn { display: none; }
  #panel-pull-bar { display: none; }
}

/* ── Bottom bar řádkové skupiny ── */
.mbb-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Zpět na regiony — skryto (nahrazeno mini-back-btn na mapě) ── */
#map-back-btn { display: none !important; }

/* ── Lokační event badge ── */
.event-loc-badge {
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: help;
}

/* ── Erb imageOverlay — hover efekt ── */
.loc-erb-overlay {
  cursor: pointer;
  transition: filter 0.18s;
}
.loc-erb-overlay:hover {
  filter: drop-shadow(0 0 7px rgba(221,168,39,0.8)) brightness(1.08);
}

/* ── Tooltip Leaflet override ── */
.leaflet-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 0.78rem !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

/* ── 2D Local Map Game Overlay ── */
#local-game {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: #1a0804;
  touch-action: none;
}
#local-game.active { display: block; }
#local-game-canvas { display: block; }

#lg-ui-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.75) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}
#lg-ui-top > * { pointer-events: auto; }
#lg-loc-name {
  color: #DDA827;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
#lg-close-btn {
  background: rgba(61,30,15,.85);
  border: 1px solid #DDA827;
  color: #DDA827;
  border-radius: 7px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 0.8rem;
}
#lg-keys-hint {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: #C69B6F;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 10;
}
#lg-interact-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  background: rgba(61,30,15,.92);
  color: #DDA827;
  border: 1px solid #DDA827;
  padding: 4px 14px;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}
/* Mobile: joystick */
#lg-joystick-zone {
  position: absolute;
  bottom: 80px; left: 24px;
  width: 120px; height: 120px;
  display: none;
  touch-action: none;
}
#lg-joystick-base {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  border: 2px solid rgba(255,255,255,.28);
  position: relative;
}
#lg-joystick-thumb {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(221,168,39,.45);
  border: 2px solid #DDA827;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
  transition: transform 0.05s;
}
/* Mobile: action button */
#lg-action-btn {
  position: absolute;
  bottom: 92px; right: 28px;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(221,168,39,.22);
  border: 2.5px solid #DDA827;
  color: #DDA827;
  font-size: 1.4rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 768px) {
  #lg-joystick-zone { display: block; }
  #lg-action-btn    { display: flex; }
  #lg-keys-hint     { display: none; }
  #lg-interact-hint { bottom: 74px; }
}
