
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


input[type="number"] {
  border: 2px solid gray;
  border-radius: 4px;
  outline: none; /* Remove default outline */
}


input[type="number"]:focus {
  border-color: orange; /* Change border color on focus */
  /* Or use outline instead of border: */
  /* outline: 2px solid orange; */
}


html {
  --s: 104px; /* control the size*/
  --c1: #3f363e;
  --c2: #2b272b;
  
  --g1:/calc(2*var(--s)) calc(2*var(--s)) 
       radial-gradient(at 100% 0,var(--c2) 17.5%,#0000 18%);
  --g2:/calc(2*var(--s)) calc(2*var(--s)) 
       radial-gradient(at 0 100%,var(--c2) 17.5%,#0000 18%);
  --_s:0 calc(var(--s)/2)/var(--s) var(--s);
  background:
    calc(var(--s)/ 2) var(--s) var(--g1),
    calc(var(--s)/-2) 0        var(--g1),
    calc(var(--s)/-2) var(--s) var(--g2),
    calc(var(--s)/ 2) 0        var(--g2),
    radial-gradient(at 100% 0,var(--c1) 35%,#0000 35.5%) var(--_s),
    radial-gradient(at 0 100%,var(--c1) 35%,#0000 35.5%) var(--_s),
    repeating-conic-gradient(from 45deg,var(--c1) 0 25%,var(--c2) 0 50%)
     0 0/var(--s) var(--s);
}


marquee {
    background-color: #1111114d;
}

body {
    color: #e0e0e0;
    font-family: sans-serif;
    text-align: center;
}

.controls {
    margin: 10px 0;
}

input, select, button {
    margin: 4px;
}


canvas {
    border: 1px solid #444;
    margin: 12px auto; /* center horizontally */
    display: block;
}


#mapStack {
  position: relative;
  margin: 0 auto;
}

#pearlsOutput {
    overflow: auto;
    background: #111;
    color: #0f0;
    padding: 10px;
    font-size: 12px;
    border: 1px solid #333;
}





#worldMapWrapper {
    margin: 0 auto;
    display: table; /* keeps it centered */
    position: relative;
    z-index: 1;
      border-style: groove;
      border-color: #9e9a9a;
}


#villageOverlay {
  position: absolute;
  inset: 0;
  z-index: 10;

  opacity: 0;
  pointer-events: none;  
  transition: opacity 300ms ease; 
  display: hidden;
}


#villageOverlay.active {
  opacity: 1;
  pointer-events: auto;   
}

.villageUI {
  position: relative;
  z-index: 11;
  background: rgb(20,20,20);
  border-radius: 12px;
  padding: 16px 24px;
  margin: 4rem auto;
  max-width: 1000px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 300ms ease, transform 300ms ease;
}

#villageOverlay.active .villageUI {
  opacity: 1;
  transform: translateY(0);
}


.controls input,
.controls select,
.controls button {
  background: #1e1e1e;
  color: #eee;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 6px 10px;
}

.controls button:hover {
  background: #333;
}

#map {
  display: block;
  margin: 16px auto;
  background: transparent;
  border: 1px solid #444;
  border-style: ridge;
}




#villageBackdrop {
  position: absolute;
  inset: 0;
 
  z-index: 1;
  
}


#worldMap {
  border-collapse: collapse;
}

#worldMap td {
  border: 2px inset #949494;
  padding: 0;
}

#moreControls {
    position: inherit;
}


.tile {
  width: 7rem;
  height: 7rem;
  font-size: 0.75rem;
  text-align: center;
  background: #332c33;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.25rem;
  color: #fefefe;
 
}

.tile.town {
  background: #423742;
  cursor: pointer;
}

.tile.town:hover {
  background: #5a4e5a;
}

#goBackBtn {
  position: absolute;
  top: -72.5rem;
  right: 12px;

  width: 36px;
  height: 36px;
  border-radius: 50%;

  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border: 1px solid #555;

  font-size: 20px;
  line-height: 1;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease, background 150ms ease;
}

#goBackBtn:hover {
  background: rgba(60, 60, 60, 1);
}

#villageOverlay.active #goBackBtn {
  opacity: 1;
  pointer-events: auto;
}



