:root {
  font-family: system-ui;
  margin: 0;
}

body, html {
  height: 100%;
}

.title-image {
  text-align: center;
  margin: 20px 0;
}

.title-image img {
  max-width: 100%;
  height: auto;
}


img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


.tabs {
  display: flex;
  gap: 6px;
  padding: 10px;
  background: #eee;
}

.tabBtn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  border-radius: 6px;
}

.tab {
  display: none;
  height: calc(100% - 50px);
}

.tab.active {
  display: block;
}

.stage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f8fa;
}

.stage-over {
   background-image: url('res/overworldBG.png');
}

.stage-dun {
   background-image: url('res/dungeonBG.png');
}

.wrap {
  display: grid;
  grid-template-columns: 120px auto 120px;
  grid-template-rows: 120px auto 120px;
  gap: 12px;
  align-items: center;
  justify-items: center;
}

button {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #cfd8df;
  background: white;
  cursor: pointer;
}

.unexplored-btn {
    background-color: #888;  /* grey */
    color: #fff;             /* white text */
    border: none;
    padding: 2px 6px;
    cursor: pointer;
}


.table-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 80px;
}

table {
  border-collapse: collapse;
  background: white;
}

td {
  border: 1px solid #e1e7ea;
  padding: 0;
}

table td {
  border: 1px solid #e1e7ea;
  padding: 0;
  width: 150px;           /* fixed width, adjust as needed */
  aspect-ratio: 1 / 1;   /* makes height equal to width */
}

table input {
  width: 100%;
  height: 100%;
  border: 0;
  padding: 8px;
  box-sizing: border-box;
}

.tc { grid-column: 2; grid-row: 1; }
.cl { grid-column: 1; grid-row: 2; }
.cc { grid-column: 2; grid-row: 2; }
.cr { grid-column: 3; grid-row: 2; }
.bc { grid-column: 2; grid-row: 3; }

.dropdown {
  border:1px solid #ccc;
  width:150px;
  cursor:pointer;
  position:relative;
  margin: 10px;
}

.dropdown img{
  width:40%;
  cursor: pointer;
  display:block;
  margin: 4px auto;
}

.options {
  display:none;
  position:absolute;
  border:1px solid #ccc;
  background:#fff;
  width:100%;
}

.options img {
  width:40%;
  cursor: pointer;
  display:block;
  margin: 4px auto;
}

.dropdowns-container {
  display: flex;
  width: 100%;
  margin: 20px 0;
}

.dropdown-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.item-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #eee;
  padding: 8px 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #ccc;
  z-index: 1000;
}

.item-footer img {
  width: 50px;
  cursor: pointer;
}

.selected-item {
  border: 3px solid #007bff;
  border-radius: 6px;
}

.cell-box {
  display: flex;
  flex-direction: column; /* keep input below images */
  gap: 4px;
}

.cell-img-container {
  display: flex;
  flex-direction: row; /* images side by side */
  gap: 2px;
  flex-wrap: wrap; /* optional: wrap to next line if too many */
  min-height: 40px;
}

.cell-img {
  min-height: 40px;
  width: 40px;        /* fixed width for side-by-side layout */
  object-fit: contain;
}
