/* MASK MAKER.EXE layout */
#maker-root {
  display: flex;
  gap: 6px;
  padding: 6px;
  height: 100%;
  min-height: 0;
}

#maker-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#maker-canvas-frame {
  align-self: center;
  background: #fff;
  padding: 4px;
}
#maker-canvas {
  display: block;
  width: 340px;
  height: 340px;
  image-rendering: auto;
}

#maker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

#maker-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 0;
}

#maker-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px 2px 0 2px;
}
.mtab {
  padding: 4px 10px;
  font-size: 11px;
  background: var(--face);
  border-top: 2px solid var(--hilite);
  border-left: 2px solid var(--hilite);
  border-right: 2px solid var(--dkshadow);
  border-bottom: none;
  cursor: pointer;
  position: relative;
  top: 2px;
}
.mtab.on {
  font-weight: bold;
  top: 0;
  padding-bottom: 6px;
  z-index: 2;
}
.mtab.secret { color: #800080; font-family: 'Comic Sans MS', cursive; }

#maker-grid {
  flex: 1 1 auto;
  overflow-y: auto;
  background: #fff;
  border-top: 2px solid var(--shadow);
  border-left: 2px solid var(--shadow);
  border-right: 2px solid var(--hilite);
  border-bottom: 2px solid var(--hilite);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  z-index: 1;
}

.trait {
  width: 74px;
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  padding: 3px;
}
.trait img {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto;
  background:
    repeating-conic-gradient(#e8e8e8 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
  border: 1px solid #b0b0b0;
}
.trait span {
  font-size: 10px;
  line-height: 1.15;
  display: block;
  padding-top: 2px;
  word-break: break-word;
}
.trait:hover { border: 1px dotted #000080; }
.trait.on { border: 1px solid #000080; background: #d0e0ff; }
.trait.none img { object-fit: contain; }

.grid-note {
  flex-basis: 100%;
  font-size: 10px;
  color: #808080;
  padding: 2px;
}

/* small screens: stack */
@media (max-width: 700px) {
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 30px) !important; }
  #maker-root { flex-direction: column; }
  #maker-canvas { width: min(84vw, 300px); height: min(84vw, 300px); }
  #maker-right { min-height: 240px; }
  #wallpaper { width: 78vw; height: auto; }
  .icon { width: 72px; }
}
