.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(var(--dialog-safe-margin, 20px) + var(--app-safe-top, 0px))
    calc(var(--dialog-safe-margin, 20px) + var(--app-safe-right, 0px))
    calc(var(--dialog-safe-margin, 20px) + var(--app-safe-bottom, 0px))
    calc(var(--dialog-safe-margin, 20px) + var(--app-safe-left, 0px));
  background: rgba(0, 0, 0, 0.5);
}

.dialog {
  width: 100%;
  max-width: var(--dialog-wide-max-width, 420px);
  max-height: calc(
    var(--app-visible-height, 100dvh) -
      calc(var(--dialog-safe-margin, 20px) * 2)
  );
  overflow-y: auto;
  border-radius: var(--responsive-card-radius, 32px);
  background: var(--color-page-background, #ffffff);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  padding:
    var(--responsive-card-padding-lg, 24px)
    var(--responsive-card-padding, 18px)
    var(--responsive-card-padding, 18px);
}

.header {
  margin-bottom: var(--page-section-gap, 18px);
  text-align: left;
}

.title {
  margin: 0 0 clamp(7px, 1.481vw, 8px);
  color: var(--color-text-foreground, #171717);
  font-size: var(--responsive-page-title, 22px);
  font-weight: 700;
  line-height: 1.2;
}

.content {
  margin: 0;
  color: #393939;
  font-size: var(--responsive-body, 14px);
  line-height: 1.5;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--page-section-gap, 18px);
}

.error {
  margin: 0;
  color: #c0392b;
  font-size: var(--responsive-caption, 13px);
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: var(--spacing-md, 12px);
  width: 100%;
}

.button {
  flex: 1 1 auto;
  min-height: var(--pwa-button-height, 44px);
  border: 0;
  border-radius: var(--radius-bottom-sheet, 28px);
  font-size: var(--responsive-body, 16px);
  font-weight: 600;
  cursor: pointer;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.secondary {
  background: var(--color-text-secondary, #9e9e9e);
  color: var(--color-page-background, #ffffff);
}

.primary {
  background: linear-gradient(
    var(--color-button-gradient-start, #ff67e0),
    var(--color-button-gradient-end, #ff52a2)
  );
  color: var(--color-page-background, #ffffff);
}
