/* LEONIDA — Pasar Leonida (marketplace antar pemain; gaya mengikuti Mining) */
#market-fab {
  position: absolute; left: 12px; bottom: 328px; z-index: 6;
  background: linear-gradient(90deg, #f77f00, #fcbf49); color: #231303; border: none;
  border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 800;
  cursor: pointer; box-shadow: 0 0 16px rgba(247,127,0,.5);
}
/* Menu lipat (style.css) menyembunyikan FAB lain; pasar ikut bersembunyi. */
#stage.menu-folded #market-fab { display: none !important; }
#market-overlay {
  position: absolute; inset: 0; z-index: 33;
  background: rgba(8,4,24,.72); display: flex;
  align-items: center; justify-content: center; padding: 12px;
}
#market-overlay.hidden { display: none; }
.market-machine {
  width: min(430px, 96vw); max-height: 94%; overflow-y: auto;
  background: linear-gradient(180deg, #2a1650, #160b36);
  border: 2px solid #ffb703; border-radius: 18px; padding: 16px 18px;
  box-shadow: 0 0 34px rgba(255,183,3,.35);
}
.market-head { display: flex; justify-content: space-between; align-items: center; }
.market-title { font-size: 19px; font-weight: 900; letter-spacing: 1px; color: #ffb703; }
#market-close {
  background: none; border: none; color: #f5f0ff; font-size: 17px; cursor: pointer;
}
.market-sub { font-size: 12.5px; opacity: .85; margin: 2px 0 10px; }
.market-lock {
  border: 1px solid rgba(255,183,3,.6); border-radius: 12px;
  background: rgba(255,183,3,.08); padding: 10px 12px; margin-bottom: 10px;
}
.market-lock.hidden { display: none; }
.market-lock-title { font-size: 14px; font-weight: 800; color: #ffd166; }
.market-bar-wrap {
  height: 14px; border-radius: 999px; margin: 8px 0 5px;
  background: rgba(245,240,255,.12); border: 1px solid rgba(255,209,102,.45);
  overflow: hidden;
}
.market-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #f77f00, #ffd166, #7bf1ff);
  transition: width .5s ease;
}
.market-lock-text { font-size: 12.5px; opacity: .92; }
.market-row {
  display: flex; justify-content: space-between; font-size: 13.5px;
  padding: 3px 0; border-bottom: 1px dashed rgba(245,240,255,.14);
}
.market-tabs { display: flex; gap: 6px; margin: 12px 0 8px; }
.market-tab {
  flex: 1 1 0; padding: 8px 4px; font-size: 13px; font-weight: 700;
  background: rgba(245,240,255,.08); color: #f5f0ff;
  border: 1px solid rgba(255,183,3,.35); border-radius: 999px; cursor: pointer;
}
.market-tab.active { background: linear-gradient(90deg, #f77f00, #fcbf49); color: #231303; }
.market-h { font-size: 13.5px; color: #ffd166; margin: 12px 0 6px; }
.market-card {
  border: 1px solid rgba(245,240,255,.14); border-radius: 12px;
  padding: 9px 11px; margin-bottom: 8px; background: rgba(245,240,255,.04);
}
.market-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.market-item-label { font-size: 13.5px; font-weight: 700; }
.market-price { color: #ffd166; font-size: 13.5px; white-space: nowrap; }
.market-card-meta { font-size: 12px; opacity: .8; margin: 3px 0 7px; }
.market-card button.action, .market-card button.ghost { width: 100%; }
.market-sell-ctrl { display: flex; gap: 6px; margin-top: 7px; }
.market-sell-ctrl button.action { flex: 0 0 auto; width: auto; padding: 6px 14px; }
.market-price-in, .market-qty-in {
  flex: 1 1 auto; min-width: 0; padding: 7px 9px; font-size: 13px;
  background: rgba(8,4,24,.6); color: #f5f0ff;
  border: 1px solid rgba(255,183,3,.4); border-radius: 8px;
}
.market-qty-in { flex: 0 0 64px; }
.market-empty { font-size: 13px; opacity: .85; text-align: center; padding: 14px 6px; }
#market-status { font-size: 13px; min-height: 18px; text-align: center; color: #7bf1ff; }
