/* /mythimon/grassland.css */

/* Base */
html, body{
  height: 100%;
  margin: 0;
  background: #000;
}
.biome{
  color: #fff;
  font-family: system-ui, sans-serif;
}

/* Layout */
.wrap{
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
}

.scene{
  position: relative;
  width: min(92vw, 880px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 70px rgba(0,0,0,.65);
  background: #000;
}

/* Background */
.bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  pointer-events: none;
}

/* HUD */
.hud{
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn{
  font: inherit;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(20, 10, 30, .55);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.btn.ghost{
  background: rgba(0,0,0,.25);
}
.btn:hover{
  transform: translateY(-1px);
}
.btn:active{
  transform: translateY(0) scale(.98);
}

/* Currency */
.money{
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
}

/* Encounters */
#encounters{
  position: absolute;
  inset: 0;
  z-index: 5;
}

.enc{
  position: absolute;
  width: 90px;
  height: 90px;
  cursor: pointer;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.6));
  border: 0;
  background: transparent;
}
.enc img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Music player */
.music{
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 260px;
  z-index: 15;
  opacity: .92;
}

/* Battle overlay */
.battle{
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}
.battle[hidden]{
  display: none !important;
}

.battlebox{
  position: relative; /* NEW: anchor partyChoices inside battle UI */
  width: min(92vw, 760px);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  padding: 14px;
}

/* Battle header (HP) */
.battletop{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.side .name{
  font-weight: 700;
  margin-bottom: 6px;
}
.hpbar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.hpfill{
  height: 100%;
  width: 100%;
  background: rgba(120,255,170,.85);
}
.hptext{
  font-size: 12px;
  opacity: .85;
  margin-top: 6px;
}

/* Battle sprites */
.battleSprites{
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 12px;
  margin: 12px 0;
}
.battleSprites img{
  width: 220px;
  height: 220px;
  object-fit: contain;
  image-rendering: pixelated;
}

/* Battle log + actions */
.log{
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
}

.choices{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Toast */
.toast{
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translateX(-50%);
  z-index: 60;

  background: rgba(0,0,0,.60);
  border: 1px solid rgba(255,255,255,.14);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;

  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
  pointer-events: none;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

#partyChoices{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 5; /* only above battlebox contents, not the whole page */

  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  padding: 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.70);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
}

#partyChoices[hidden]{
  display: none !important;
}

#partyChoices .btn{
  white-space: nowrap;
}