/* Idle village on top of Survivor's HerpDerp skin (../css/style.css): same wood tab at the top,
   panel frame, parchment detail and orange buttons as the other Puddlehold games.
   Jersey 10 is sharp only at 56/3 px or twice that. */
#vhud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#vhud button, #vhud #sheet { pointer-events: auto; }

#vtop {
  position: absolute; top: env(safe-area-inset-top, 0px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  background: var(--wood); border: 3px solid #2b1a0e; border-top: 0; border-radius: 0 0 22px 22px; padding: 6px 18px 8px;
  box-shadow: 0 6px 0 rgba(0,0,0,.28), inset 0 2px 0 var(--wood-light);
}
#vtop .tb { display: flex; align-items: center; gap: 6px; text-shadow: var(--ink-outline); }
#vtop img { height: 22px; image-rendering: auto; }
#vtop b { color: var(--gold); font-size: var(--nx2, 28px); line-height: 1; }
#vtop .rate { color: var(--muted); }
/* phones: keep clear of the system buttons top right (music and menu); late-game numbers wrap to a second line
   inside the bar instead of running out of it */
@media (max-width: 520px) {
  #vtop { left: 6px; transform: none; gap: 0 10px; padding: 6px 12px 8px; max-width: calc(100vw - 112px); flex-wrap: wrap; }
}

/* bottom: auto overrides the phone rule in style.css, which otherwise stretches the banner over the village. */
.banner { top: calc(env(safe-area-inset-top, 0px) + 64px); bottom: auto; width: max-content; max-width: min(92vw, 520px); }

#sheet {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  width: min(520px, calc(100vw - 12px)); padding: 10px 12px 8px;
  border-width: 12px; border-image-width: 24px;
}
/* landscape phone: the sheet sits at the right so it does not hide half the village */
@media (max-height: 520px) and (orientation: landscape) {
  #sheet { left: auto; right: calc(env(safe-area-inset-right, 0px) + 6px); transform: none; width: min(340px, 48vw); padding: 6px 8px 4px; }
  .vslot { width: 48px; height: 48px; }
  .vslot img { max-width: 40px; max-height: 40px; }
}
.vdetail {
  display: flex; gap: 10px; align-items: center;
  background: var(--parch); color: var(--ink); border: 3px solid #5a4120; border-radius: 10px; padding: 6px 10px;
}
.vslot {
  flex: none; width: 60px; height: 60px; display: grid; place-items: center;
  background: #fff1c2; border: 3px solid #2b1a0e; border-radius: 10px;
}
.vslot img { max-width: 52px; max-height: 52px; image-rendering: auto; }
.vinfo { min-width: 0; flex: 1; line-height: 1.05; }
.vname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vname b { color: #7a2f10; font-size: 24px; font-weight: 700; line-height: 1; }
.vname span { color: #5a4120; }
.vstat { color: #7a2f10; }
.vbtns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vbtns #btnFound { flex-basis: 100%; }
.vbtns .btn:disabled { opacity: 0.6; }
.vbtns .btn { flex: 1; margin: 0 0 4px; padding: 6px 4px; white-space: nowrap; min-height: 44px; }
.vbtns .btn.poor { opacity: 0.55; filter: grayscale(0.7); }
.vbtns .btn img { height: 16px; vertical-align: -2px; image-rendering: auto; }

#modal { z-index: 30; }
/* HerpDerp v6: larger HUD on big screens */
@media (min-width: 1400px) and (min-height: 820px) { #vhud { zoom: 1.25; } }
@media (min-width: 2200px) and (min-height: 1200px) { #vhud { zoom: 1.5; } }

/* shown until the first picture is in (village.js fills it in the player's language) */
.boot { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; z-index: 5; pointer-events: none;
  color: #fff6dc; font-size: var(--nx2, 28px); font-weight: 700; text-shadow: 0 2px 0 #2b1a0e; }
