/* ===== Laberinto de los Osos — estilos ===== */
.lo-wrap, .lo-wrap * { box-sizing: border-box; }

.lo-wrap {
  max-width: 860px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --lo-green: #1a7a34;
  --lo-green-dark: #0f5223;
  --lo-blue: #060097;
  --lo-blue-dark: #4169e1;
  user-select: none;
}

.lo-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 1500; /* proporción real de boardfull.webp (imagen completa, sin recortar) */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  touch-action: none;
  background: #eef1fb;
}

.lo-mask-img { display: none; }

.lo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Osos arrastrables: tamaño y posición controlados por JS (left/top en %) */
.lo-bears {
  position: absolute;
  width: 6%;
  aspect-ratio: 340 / 282;
  left: 47.57%;
  top: 55.08%;
  transform: translate(-50%, -50%);
  cursor: grab;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35));
  touch-action: none;
  will-change: left, top;
  transition: filter 0.15s ease;
  outline: none;
}
.lo-bears img {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
.lo-bears.dragging { cursor: grabbing; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.45)); }
.lo-bears:focus-visible { filter: drop-shadow(0 0 0 3px #ffd54f) drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }

/* Aviso de camino incorrecto */
.lo-toast {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translate(-50%, 20px);
  background: rgba(20, 40, 20, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  z-index: 5;
}
.lo-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Fuegos artificiales */
.lo-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 8;
}
.lo-fireworks.show { opacity: 1; }

/* Pantalla de victoria */
.lo-win {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 10, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 10;
}
.lo-win.show { opacity: 1; pointer-events: auto; }

.lo-win-card {
  background: #fffdf6;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  width: 82%;
  max-width: 320px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  transform: scale(0.85);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.lo-win.show .lo-win-card { transform: scale(1); }

.lo-win-card h2 {
  margin: 0 0 8px;
  color: var(--lo-green-dark);
  font-size: 24px;
}
.lo-win-card p {
  margin: 0 0 18px;
  color: #3a3a3a;
  font-size: 15px;
}

.lo-btn {
  display: inline-block;
  background: var(--lo-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.lo-btn:hover { background: var(--lo-green-dark); }
.lo-btn:active { transform: scale(0.97); }

.lo-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 0 4px;
}
.lo-btn-ghost {
  background: #fff;
  color: var(--lo-green-dark);
  border: 2px solid var(--lo-green);
  flex: 0 0 auto;
}
.lo-btn-ghost:hover { background: #eef7ee; }

.lo-hint {
  font-size: 13px;
  color: #555;
  line-height: 1.35;
}

.lo-btnpe {
  display: inline-block;
  background: var(--lo-blue);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.lo-btnpe:hover { background: var(--lo-blue-dark); }
.lo-btnpe:active { transform: scale(0.97); }

@media (max-width: 380px) {
  .lo-controls { flex-direction: column; align-items: flex-start; gap: 8px; }
}
