html,
body {
  margin: 0;
  overflow: hidden;
  background: #f4f4f4;
  font-family: Arial, Helvetica, sans-serif;
  touch-action: none;
}

canvas {
  touch-action: none;
}

#panel {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 360px;
  max-height: 92vh;
  overflow-y: auto;
  background: white;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.25);
  z-index: 10;
  touch-action: auto;
}

h1 {
  margin-top: 0;
  font-size: 22px;
}

h2 {
  font-size: 16px;
  margin-bottom: 8px;
}

p, li {
  font-size: 14px;
  line-height: 1.35;
}

#paleta {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.color {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #222;
  cursor: pointer;
}

.color.activo {
  outline: 4px solid #111;
  outline-offset: 2px;
}

#colorActual,
#carasPintadas,
#contador,
#tiempo,
#estado {
  font-size: 14px;
  font-weight: bold;
  margin-top: 7px;
}

#estado {
  color: green;
}

button {
  margin-top: 10px;
  margin-right: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: white;
  cursor: pointer;
}

button:hover {
  background: #555;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 14px 0;
}

#preguntas {
  padding-left: 22px;
}

#preguntas li {
  font-size: 13px;
  margin-bottom: 8px;
}

#aviso {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #b00020;
  border: 2px solid #b00020;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: bold;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  z-index: 20;
  max-width: 650px;
  text-align: center;
}

.oculto {
  display: none;
}

@media (max-width: 700px) {
  #panel {
    width: calc(100vw - 40px);
    max-height: 42vh;
    left: 10px;
    top: 10px;
    padding: 14px;
  }

  h1 {
    font-size: 18px;
  }

  p, li {
    font-size: 13px;
  }

  .color {
    width: 32px;
    height: 32px;
  }

  #aviso {
    width: calc(100vw - 60px);
    bottom: 15px;
  }
}