body {
  padding: 0;
  font-family: 'Droid Sans Mono', monospace;
  color: #eee;
  font-size: 0.9rem;
  height: 100vh;
  margin: 0;
  background: linear-gradient(
    to bottom,
    #0a0a0a 0%,
    #1e1e1e 30%,
    #1b1b2c 60%,
    #2e1e1e 100%
  );
  background-blend-mode: normal;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px;
  background: rgba(10, 10, 10, 0.584);
  border-top: 1px solid rgba(177, 147, 41, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10;
}

svg { 
  stroke: rgba(239, 195, 37, 0.37);
  stroke-width: 0.5; 
  stroke-dasharray: 2 4;
}

#board {
  position: absolute;
  width: 100vw;
  left: 5vw;
  right: 0;
  top: 0;
  bottom: 5vh;
  border: 0;
  overflow: hidden;

}

@keyframes motorized-jitter {
  0% { margin-top: 0px; margin-left: 0px; }
  25% { margin-top: -1px; margin-left: 1px; }
  50% { margin-top: 1px; margin-left: 0px; }
  75% { margin-top: -1px; margin-left: -1px; }
  100% { margin-top: 0px; margin-left: 0px; }
}

.lexicon {
  position: absolute;
  left: calc(var(--x) * 0.9%);
  top: calc((var(--y) * 0.9%));
  transform: translate(-50%, -50%);
  font-size: 1.8vmin; 
  line-height: 1.1;
  white-space: pre;
  font-family: 'Droid sans mono', monospace;
  text-align: center;
  color: #efc425;
  outline: none; 
  transition: transform 0.2s ease, text-shadow 1.5s ease, color 1.5s ease, transform 1.5s ease;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.lexicon.active-highlight {
  color: #e7ff0f;
  transform: translate(-50%, -50%) scale(1.6);
  text-shadow: 
    0 0 5px #bb9e38, 
    0 0 20px #efc425, 
    0 0 30px #efc425;
  z-index: 5;
  transition: transform 0.2s ease, text-shadow 0.2s ease, color 0.2s ease;
}

.lexicon.active-highlight .label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 3px); 
}

.lexicon .label {
  position: absolute;
  bottom: 5px;
  left: 0;
  opacity: 0;
  visibility: hidden;
  background-color: rgba(20, 20, 20, 0.95);
  border: 0.5px solid #555555a6;
  color: #fff;
  padding: 6px;
  border-radius: 2px;
  font-size: 0.5rem;
  font-weight: normal;
  
  pointer-events: none;
  z-index: 4;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}


#motor-planchette {
  animation: motorized-jitter 0.15s infinite linear;
  position: absolute;
  touch-action: none;
  cursor: grab;
  z-index: 4;
  background-image: url(motor-planchette-tool.png);
  background-repeat: no-repeat;
  background-size: 100%;
  width: 25vmin;
  height: 25vmin;
  left: 20%;
  top: 20%;
  transition: transform 0.2s ease;
}

#motor-planchette:active {
  cursor: grabbing;
  transition: none;
  animation: motorized-jitter 0.08s infinite linear;
}

#log-container {
  display: flex;
  gap: 5px;
  height: 100%;
  align-items: center;
}

.log-entry {
  width: 33vw;
  text-align: center;
  color: #efc425;
  animation: log-reveal 0.4s ease-out;
}

.log-entry .symbol {
  font-size: 1.1rem;
  white-space: pre;
  line-height: 0.9;
  padding: 10px 0;
  height: 50px;
}

.log-entry .label {
  font-size: 0.8rem;
}

#auto-sieve-trigger {
  background: transparent;
  border: 1px solid #6c6c6c2a;
  color: #efc425;
  padding: 10px;
  font-family: monospace;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 2.5s ease-in-out, border 0.2s, color 0.2s;
  position: fixed;
  border-radius: 100%;
  width: 80px;
  height: 80px;
  top: 10px;
  right: 10px;
  z-index: 4;
}

#auto-sieve-trigger:hover, #auto-sieve-trigger:active {
  background: #efc425;
  color: #000;
  font-size: 3rem;
  border: 1px solid #9d8016;
  scale: 0.9;
}

@keyframes log-reveal {
  0% { opacity: 0; transform: translateX(10px); color: #fff; }
  100% { opacity: 1; transform: translateX(0); color: rgba(239, 195, 37, 0.826); }
}

@media screen and (max-width: 700px) {
  footer { height: 90px; gap: 10; }
  .log-entry .symbol { font-size: 0.9rem;  line-height: 0.8rem; }
  #auto-sieve-trigger { font-size: 1.8rem; }

  .lexicon .label {
    font-size: 0.35rem;
    padding: 2px;
  }

  #motor-planchette {
    width: 20vmin;
    height: 20vmin;
  }

  .log-entry .symbol {
    font-size: 0.8rem;
    height: 40px;
  }

  .log-entry .label {
    font-size: 0.5rem;
  }
}