.lesson-attempt-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 6px auto 0;
  padding: 0;
  overflow-x: hidden;
}

/* The class sets display, so it would otherwise beat the user-agent [hidden] rule and leave an empty
   flex row (with its top margin) on every ordinary lesson turn. */
.lesson-attempt-actions[hidden] {
  display: none;
}

.lesson-attempt-primary,
.lesson-attempt-secondary {
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  overflow-wrap: break-word;
}

.lesson-attempt-primary {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.lesson-attempt-primary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.lesson-attempt-secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.68);
}

.lesson-attempt-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.lesson-attempt-primary:focus-visible,
.lesson-attempt-secondary:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.lesson-attempt-primary:disabled,
.lesson-attempt-secondary:disabled,
.lesson-attempt-primary[hidden],
.lesson-attempt-secondary[hidden] {
  cursor: default;
  pointer-events: none;
  opacity: 0.42;
}

/* Home-side message shown when an escape leaves the scheduler with no safe candidate.
   Calm and informational: never an error tone, never blocking. */
.home-attempt-notice {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 8px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
}

.home-attempt-notice[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .lesson-attempt-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .lesson-attempt-primary,
  .lesson-attempt-secondary {
    width: 100%;
    min-height: 44px;
  }
}
