/* R32 — comandi leggibili su smartphone, anche con testo ingrandito. */
@media (max-width: 720px) {
  .stage[data-view="ambiente"] .stage-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    height: auto;
    max-height: none;
  }

  .stage[data-model="romana"][data-view="ambiente"] .stage-actions,
  .stage[data-model="farfalla"][data-view="ambiente"] .stage-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage .stage-actions .room-color-control {
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: stretch;
  }

  .stage .stage-actions .motor-button,
  .stage .stage-actions .light-button,
  .stage .stage-actions .wall-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    width: 100%;
    min-height: 116px;
    height: auto;
    max-height: none;
    padding: 11px 7px;
    text-align: center;
    white-space: normal;
    overflow: visible;
  }

  .stage .stage-actions .light-button[hidden] {
    display: none;
  }

  .stage .stage-actions .motor-button > span:first-child,
  .stage .stage-actions .light-button > span:first-child,
  .stage .stage-actions .wall-button > span:first-child {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: 0;
    font-size: 17px;
  }

  .stage .stage-actions .motor-button > span:last-child,
  .stage .stage-actions .light-button > span:last-child,
  .stage .stage-actions .wall-button > span:last-child {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow: visible;
  }

  .stage .stage-actions button small,
  .stage .stage-actions button strong {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .stage .stage-actions button small {
    color: #6c625c;
    font-size: 10px;
    line-height: 1.3;
    letter-spacing: .02em;
  }

  .stage .stage-actions button strong {
    margin-top: 5px;
    color: #382e2c;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 700;
  }

  /* La miniatura compatta conserva i comandi nascosti; il dialogo li mostra. */
  .preview-docked .stage .stage-actions {
    display: none !important;
  }
}
