/* =========================
   MENÚ INFERIOR – SMARTPHONE (rejilla 6×2, misma lógica que App-JP)
   ========================= */

/* Barra de bloques alineada con #app (90% / max 450px) */
.app-block-bar-wrap {
  width: 90%;
  max-width: 450px;
  margin: 0 auto;
  flex-shrink: 0;
  padding-top: 2px;
  box-sizing: border-box;
}

.app-block-bar-wrap .bottom-menu {
  width: 100%;
  max-width: none;
  margin: 2px auto 15px auto;
}

.bottom-menu {
  position: relative;
  width: 90%;
  max-width: 450px;
  margin: 2px auto 15px auto;
  padding: 10px;
  background: #1e1e1e;
  border-radius: 16px;
  z-index: 70;
}

.bottom-menu .buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 6px;
  width: 100%;
}

.bottom-menu .buttons > button:nth-child(12),
.bottom-menu .buttons > button.block-btn-final {
  grid-column: 1 / -1;
  height: auto;
  min-height: 48px;
  white-space: normal;
  line-height: 1.15;
  padding: 6px 8px;
}

.bottom-menu button {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 44px;
  /* px, não rem: a escala de letra da Samsung cortava 00-09 na grelha */
  font-size: clamp(9px, 2.35vw, 12px);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: none;
  background: #2e2e2e;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  line-height: 1.15;
  white-space: nowrap;
  padding: 0 2px;
  overflow: hidden;
  text-overflow: clip;
  letter-spacing: -0.02em;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.bottom-menu button:not(.block-btn-final) {
  font-size: clamp(9px, 2.35vw, 12px) !important;
}

.bottom-menu button .block-lock {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8px;
  line-height: 1;
  pointer-events: none;
}

.bottom-menu button .block-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
}

/* Bloque L (Le grand défi): más grande para lectura cómoda */
.bottom-menu button.block-btn-final {
  font-size: clamp(13px, 3.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.bottom-menu button:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.bottom-menu button.active {
  background: #5b93ff;
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.45), 0 1px 2px rgba(0, 0, 0, 0.25);
}

.bottom-menu button.active.block-btn-final {
  font-weight: 700;
}

.bottom-menu button.completed {
  background: #2ecc71;
  color: #0b3d1f;
}

.bottom-menu button:disabled {
  background: #555;
  color: #aaa;
  cursor: not-allowed;
}

@media (max-width: 400px) {
  .bottom-menu button:not(.block-btn-final) {
    font-size: clamp(8px, 2.2vw, 11px) !important;
    height: 38px;
    padding: 0 1px;
  }
}

@media (max-width: 330px) {
  .bottom-menu .buttons {
    gap: 4px;
  }
  .bottom-menu button {
    font-size: clamp(8px, 2.2vw, 10px) !important;
    height: 36px !important;
    padding: 0 1px;
  }
  .bottom-menu .buttons > button:nth-child(12) {
    height: auto !important;
    min-height: 44px !important;
  }
  .bottom-menu button.block-btn-final {
    font-size: clamp(12px, 3vw, 15px) !important;
  }
}
